Class PDFDocument
java.lang.Object
de.erichseifert.vectorgraphics2d.SizedDocument
de.erichseifert.vectorgraphics2d.pdf.PDFDocument
- All Implemented Interfaces:
Document
Represents a
Document
in the Portable Document Format (PDF).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private final Stream
Cross-reference table ("xref").private static final String
private static final String
private static final String
private static final double
Constant to convert values from millimeters to PostScript®/PDF units (1/72th inch).private Resources
private final Stack
<GraphicsState> Mapping of stroke endcap values from Java to PDF.Mapping of line join values for path drawing from Java to PDF.private boolean
-
Constructor Summary
ConstructorsConstructorDescriptionPDFDocument
(CommandSequence commands, PageSize pageSize, boolean compressed) -
Method Summary
Modifier and TypeMethodDescriptionprivate DefaultPDFObject
private DefaultPDFObject
addDictionary
(Map<String, Object> dict) private DefaultPDFObject
private DefaultPDFObject
private DefaultPDFObject
private PDFObject
addPageTree
(DefaultPDFObject catalog, List<PDFObject> pages) private void
applyStateCommands
(List<Command<?>> commands) void
close()
private GraphicsState
private int
private byte[]
getOutput
(GraphicsState state, Resources resources, boolean first) private static byte[]
private byte[]
private static byte[]
getOutput
(AffineTransform transform) private byte[]
private byte[]
private static byte[]
private static byte[]
private int
getVersion
(PDFObject object) Returns the version of the specified object.private Stream
initPage()
Initializes the document and returns aStream
representing the contents.protected static byte[]
protected static byte[]
serialize
(TrueTypeFont font) private byte[]
private void
private byte[]
byte[]
private byte[]
private byte[]
void
writeTo
(OutputStream out) Methods inherited from class de.erichseifert.vectorgraphics2d.SizedDocument
getPageSize, isCompressed
-
Field Details
-
CHARSET
- See Also:
-
HEADER
- See Also:
-
FOOTER
- See Also:
-
EOL
- See Also:
-
MM_IN_UNITS
private static final double MM_IN_UNITSConstant to convert values from millimeters to PostScript®/PDF units (1/72th inch).- See Also:
-
STROKE_ENDCAPS
Mapping of stroke endcap values from Java to PDF. -
STROKE_LINEJOIN
Mapping of line join values for path drawing from Java to PDF. -
objects
-
crossReferences
Cross-reference table ("xref"). -
contents
-
resources
-
images
-
states
-
transformed
private boolean transformed
-
-
Constructor Details
-
PDFDocument
-
-
Method Details
-
getCurrentState
-
initPage
Initializes the document and returns aStream
representing the contents.- Returns:
Stream
to which the contents are written.
-
setFont
-
addObject
-
addCatalog
-
addPageTree
-
addPage
-
addDictionary
-
addObject
-
writeTo
- Throws:
IOException
-
getId
-
getVersion
Returns the version of the specified object.- Parameters:
object
-PDFObject
whose version should be determined.- Returns:
- Version number.
-
toBytes
-
toBytes
-
serialize
-
serialize
-
toBytes
-
serialize
-
toBytes
-
applyStateCommands
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
close
public void close()
-