Package com.lowagie.text.xml.xmp
Class XmpWriter
java.lang.Object
com.lowagie.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 TypeFieldDescriptionprotected StringThe about string that goes into the rdf:Description tags.protected charThe end attribute.protected intYou can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline.static final StringString used to fill the extra space.static final StringA possible charset for the XMP.static final StringA possible charset for the XMP.static final StringA possible charset for the XMP.static final StringA possible charset for the XMP.protected OutputStreamWriterThe writer to which you can write bytes for the XMP stream.static final StringProcessing Instruction required at the start of an XMP streamstatic final StringProcessing Instruction required at the end of an XMP stream for XMP streams that are read onlystatic final StringProcessing Instruction required at the end of an XMP stream for XMP streams that can be updated -
Constructor Summary
ConstructorsConstructorDescriptionCreates an XmpWriter.XmpWriter(OutputStream os, PdfDictionary info, int PdfXConformance) XmpWriter(OutputStream os, String utfEncoding, int extraSpace) Creates an XmpWriter.XmpWriter(OutputStream os, Map info) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an rdf:Description.voidaddRdfDescription(String xmlns, String content) Adds an rdf:Description.voidclose()Flushes and closes the XmpWriter.voidvoidSets the XMP to read-only
-
Field Details
-
UTF8
A possible charset for the XMP.- See Also:
-
UTF16
A possible charset for the XMP.- See Also:
-
UTF16BE
A possible charset for the XMP.- See Also:
-
UTF16LE
A possible charset for the XMP.- See Also:
-
EXTRASPACE
String used to fill the extra space.- See Also:
-
extraSpace
protected 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
protected char endThe end attribute.
-
-
Constructor Details
-
XmpWriter
Creates an XmpWriter.- Parameters:
os-utfEncoding-extraSpace-- Throws:
IOException
-
XmpWriter
Creates an XmpWriter.- Parameters:
os-- Throws:
IOException
-
XmpWriter
- Parameters:
os-info-- Throws:
IOException
-
XmpWriter
- Parameters:
os-info-- Throws:
IOException
-
-
Method Details
-
setReadOnly
public void setReadOnly()Sets the XMP to read-only -
setAbout
- Parameters:
about- The about to set.
-
addRdfDescription
Adds an rdf:Description.- Parameters:
xmlns-content-- Throws:
IOException
-
addRdfDescription
Adds an rdf:Description.- Parameters:
s-- Throws:
IOException
-
close
Flushes and closes the XmpWriter.- Throws:
IOException
-