Package com.aowagie.text.xml.xmp
Class XmpWriter
java.lang.Object
com.aowagie.text.xml.xmp.XmpWriter
With this class you can create an Xmp Stream that can be used for adding
Metadata to a PDF Dictionary. Remark that this class doesn't cover the
complete XMP specification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The about string that goes into the rdf:Description tags.private final char
The end attribute.private final int
You can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline.(package private) static final String
String used to fill the extra space.private static final String
A possible charset for the XMP.private final OutputStreamWriter
The writer to which you can write bytes for the XMP stream.(package private) static final String
Processing Instruction required at the start of an XMP streamprivate static final String
Processing Instruction required at the end of an XMP stream for XMP streams that are read only(package private) static final String
Processing Instruction required at the end of an XMP stream for XMP streams that can be updated -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates an XmpWriter.XmpWriter
(OutputStream os, PdfDictionary info, int PdfXConformance) private
XmpWriter
(OutputStream os, String utfEncoding, int extraSpace) Creates an XmpWriter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an rdf:Description.void
close()
Flushes and closes the XmpWriter.void
-
Field Details
-
UTF8
A possible charset for the XMP. -
EXTRASPACE
String used to fill the extra space.- See Also:
-
extraSpace
private final int extraSpaceYou can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline. -
writer
The writer to which you can write bytes for the XMP stream. -
about
The about string that goes into the rdf:Description tags. -
XPACKET_PI_BEGIN
Processing Instruction required at the start of an XMP stream- Since:
- iText 2.1.6
- See Also:
-
XPACKET_PI_END_W
Processing Instruction required at the end of an XMP stream for XMP streams that can be updated- Since:
- iText 2.1.6
- See Also:
-
XPACKET_PI_END_R
Processing Instruction required at the end of an XMP stream for XMP streams that are read only- Since:
- iText 2.1.6
- See Also:
-
end
private final char endThe end attribute.- See Also:
-
-
Constructor Details
-
XmpWriter
Creates an XmpWriter.- Parameters:
os
-utfEncoding
-extraSpace
-- Throws:
IOException
-
XmpWriter
Creates an XmpWriter.- Parameters:
os
- output stream to set- Throws:
IOException
- Exception with a IO error
-
XmpWriter
- Parameters:
os
- output stream to setinfo
- info to setPdfXConformance
- pdf to set- Throws:
IOException
- Exception with a IO error
-
-
Method Details
-
setAbout
- Parameters:
about
- The about to set.
-
addRdfDescription
Adds an rdf:Description.- Parameters:
s
- schema to set- Throws:
IOException
- Exception with a IO error
-
close
Flushes and closes the XmpWriter.- Throws:
IOException
- Exception with a IO error
-