Package net.atthegate.server.service.pdf
Class PDFobj
java.lang.Object
net.atthegate.server.service.pdf.PDFobj
Used to create Java or .NET objects that represent the objects in PDF document.
See the PDF specification for more information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(byte[] content, Map<Integer, PDFobj> objects) void
addPrefixContent
(byte[] content, Map<Integer, PDFobj> objects) Adds new content object before the existing content objects.addResource
(CoreFont coreFont, Map<Integer, PDFobj> objects) void
addResource
(Font font, Map<Integer, PDFobj> objects) void
addResource
(Image image, Map<Integer, PDFobj> objects) getContentsObject
(Map<Integer, PDFobj> objects) byte[]
getData()
Returns the uncompressed stream data.getDict()
Returns the object dictionary.protected int
protected int
int
getObjectNumbers
(String key) float[]
getResourcesObject
(Map<Integer, PDFobj> objects) Returns the dictionary value for the specified key.void
void
setGraphicsState
(GraphicsState gs, Map<Integer, PDFobj> objects) protected void
setNumber
(int number) protected void
setStream
(byte[] stream) protected void
setStream
(byte[] pdf, int length)
-
Field Details
-
number
protected int number -
offset
protected int offset -
dict
-
stream_offset
protected int stream_offset -
stream
protected byte[] stream -
data
protected byte[] data -
gsNumber
protected int gsNumber
-
-
Constructor Details
-
PDFobj
public PDFobj(int offset) Used to create Java or .NET objects that represent the objects in PDF document. See the PDF specification for more information. Also see Example_19.- Parameters:
offset
- the object offset in the offsets table.
-
PDFobj
protected PDFobj()
-
-
Method Details
-
getNumber
public int getNumber() -
getDict
Returns the object dictionary.- Returns:
- the object dictionary.
-
setDict
-
getData
public byte[] getData()Returns the uncompressed stream data.- Returns:
- the uncompressed stream data.
-
setStream
protected void setStream(byte[] pdf, int length) -
setStream
protected void setStream(byte[] stream) -
setNumber
protected void setNumber(int number) -
getValue
Returns the dictionary value for the specified key.- Parameters:
key
- the specified key.- Returns:
- the value.
-
getObjectNumbers
-
getPageSize
public float[] getPageSize() -
getLength
-
getLength
-
getContentsObject
-
getResourcesObject
-
addResource
-
addResource
-
addResource
-
addContent
-
addPrefixContent
Adds new content object before the existing content objects. The original code was provided by Stefan Ostermann author of ScribMaster and HandWrite Pro. Additional code to handle PDFs with indirect array of stream objects was written by EDragoev.- Parameters:
content
-objects
-
-
setGraphicsState
-