gnujpdf transparent colors

gnujpdf clipping fix
gnujpdf matrix number format fix
This commit is contained in:
Jindra Petřík
2021-03-17 10:03:00 +01:00
parent 4dacc10805
commit 607d8521b4
2 changed files with 17 additions and 1 deletions

View File

@@ -95,6 +95,8 @@ public class PDFPage extends PDFObject implements Serializable {
protected Vector<String> shadingResources;
protected Vector<String> extGStateResources;
/**
* The fonts associated with this page
*/
@@ -134,6 +136,7 @@ public class PDFPage extends PDFObject implements Serializable {
imageResources = new Vector<String>();
patternResources = new Vector<>();
shadingResources = new Vector<>();
extGStateResources = new Vector<>();
fonts = new Vector<PDFFont>();
procset = null;
}
@@ -450,6 +453,10 @@ public class PDFPage extends PDFObject implements Serializable {
shadingResources.add(resource);
}
public void addExtGStateResource(String resource) {
extGStateResources.add(resource);
}
/**
* This adds an object that describes a thumbnail for this page.
* <p>
@@ -590,6 +597,15 @@ public class PDFPage extends PDFObject implements Serializable {
os.write(" >> ".getBytes());
}
if (extGStateResources.size() > 0) {
os.write("/ExtGState << ".getBytes());
for (String str : extGStateResources) {
os.write(str.getBytes());
os.write(" ".getBytes());
}
os.write(" >> ".getBytes());
}
os.write(">>\n".getBytes());
// The thumbnail