Author: ssteiner
Date: Mon Apr 28 12:54:29 2014
New Revision: 1590619
URL: http://svn.apache.org/r1590619
Log:
FOP-2337 Remove xobj type=form
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java?rev=1590619&r1=1590618&r2=1590619&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java Mon Apr
28 12:54:29 2014
@@ -45,7 +45,7 @@ public class PDFResources extends PDFDic
/**
* /Font objects keyed by their internal name
*/
- protected Map<String, PDFFont> fonts = new LinkedHashMap<String,
PDFFont>();
+ protected Map<String, PDFDictionary> fonts = new LinkedHashMap<String,
PDFDictionary>();
/**
* Set of XObjects
@@ -76,6 +76,8 @@ public class PDFResources extends PDFDic
/** Named properties */
protected Map<String, PDFReference> properties = new LinkedHashMap<String,
PDFReference>();
+ private PDFResources parent;
+
/**
* create a /Resources object.
*
@@ -87,13 +89,29 @@ public class PDFResources extends PDFDic
setObjectNumber(objnum);
}
+ public void setParentResources(PDFResources p) {
+ parent = p;
+ }
+
+ public PDFResources getParentResources() {
+ return parent;
+ }
+
/**
* add font object to resources list.
*
* @param font the PDFFont to add
*/
public void addFont(PDFFont font) {
- this.fonts.put(font.getName(), font);
+ fonts.put(font.getName(), font);
+ }
+
+ public void addFont(String name, PDFDictionary font) {
+ fonts.put(name, font);
+ }
+
+ public Map<String, PDFDictionary> getFonts() {
+ return fonts;
}
/**
@@ -220,12 +238,17 @@ public class PDFResources extends PDFDic
}
private void populateDictionary() {
- if (!this.fonts.isEmpty()) {
+ if (!this.fonts.isEmpty() || (parent != null &&
!parent.getFonts().isEmpty())) {
PDFDictionary dict = new PDFDictionary(this);
/* construct PDF dictionary of font object references */
- for (Map.Entry<String, PDFFont> entry : fonts.entrySet()) {
+ for (Map.Entry<String, PDFDictionary> entry : fonts.entrySet()) {
dict.put(entry.getKey(), entry.getValue());
}
+ if (parent != null) {
+ for (Map.Entry<String, PDFDictionary> entry :
parent.getFonts().entrySet()) {
+ dict.put(entry.getKey(), entry.getValue());
+ }
+ }
put("Font", dict);
}
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java?rev=1590619&r1=1590618&r2=1590619&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
Mon Apr 28 12:54:29 2014
@@ -486,6 +486,13 @@ public class PDFContentGenerator {
restoreGraphicsState();
}
+ public void placeImage(AffineTransform at, String stream) {
+ saveGraphicsState();
+ concatenate(at);
+ add(stream);
+ restoreGraphicsState();
+ }
+
/**
* Places a previously registered image at a certain place on the page,
* bracketing it as a marked-content sequence.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]