org.foray.pdf.object
Class PDFResources

java.lang.Object
  extended by org.foray.pdf.object.PDFObject
      extended by org.foray.pdf.object.PDFResources

public class PDFResources
extends PDFObject

class representing a /Resources object. /Resources object contain a list of references to the fonts for the document


Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFResources(PDFDocument doc)
          Create a /Resources object.
 
Method Summary
 void addFont(PDFFont font)
          Add a font object to resources list.
 void addPattern(PDFPattern pattern)
          Add a pattern to the resources list.
 void addShading(PDFShading shading)
          Add a shading to the resources list.
 void addXObject(PDFXObject xObject)
          Add an x object to the resources list.
 String toPDF()
          Generates the PDF text necessary to represent the object, returning it as a String.
 
Methods inherited from class org.foray.pdf.object.PDFObject
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFResources

public PDFResources(PDFDocument doc)
Create a /Resources object.

Parameters:
doc - The parent PDF document.
Method Detail

addFont

public void addFont(PDFFont font)
Add a font object to resources list.

Parameters:
font - The PDFFont to add.

addXObject

public void addXObject(PDFXObject xObject)
Add an x object to the resources list.

Parameters:
xObject - The x object to add.

addShading

public void addShading(PDFShading shading)
Add a shading to the resources list.

Parameters:
shading - The shading to add.

addPattern

public void addPattern(PDFPattern pattern)
Add a pattern to the resources list.

Parameters:
pattern - The pattern to add.

toPDF

public String toPDF()
Description copied from class: PDFObject
Generates the PDF text necessary to represent the object, returning it as a String.

Returns:
The PDF text necessary to represent the object.


Copyright © 2017. All rights reserved.