com.qoppa.pdf
Class PrintSettings

java.lang.Object
  extended by com.qoppa.pdf.PrintSettings

public class PrintSettings
extends Object

This object controls the behaviour of the library when sending a PDF document to the printer. The object has five flags that can be set:

m_AutoRotate - Will rotate the printout to match the width and length with the paper. When this flag is on, the library will ignore the portrait / landscape setting set by the user.

m_ShrinkToMargins - Will shrink pages so that they fit in the paper. This flag has no effect if the pages in a document are smaller than the paper they are being printed on.

m_ExpandToMargins - Will expand pages to fill the paper they are being printed on. This flag has no effect if the pages in a document are larger than the paper they are being printed on.

m_CenterInPage - Will center the page in the paper. This flag has no effect if the pages in a document are larger than the paper they are being printed on. m_PrintAnnotations - Will print annotations when sending PDF content to the printer.

Author:
Qoppa Software

Field Summary
 boolean m_AutoRotate
          Flag used to auto-rotate the document when printing.
 boolean m_CenterInPage
          Flag used to center the output on the printed page.
 boolean m_ExpandToMargins
          Flag used to expand the output to the printer margins.
 boolean m_PrintAnnotations
          This flag tells the library whether to print annotations when sending the PDF content to a printer.
 boolean m_ShrinkToMargins
          Flag used to shrink the output to fit the printer margins.
 
Constructor Summary
PrintSettings()
          Constructs a default PrintSettings object.
PrintSettings(boolean autoRotate, boolean shrinkToMargins, boolean expandToMargins, boolean centerInPage)
          Constructs a new PrintSettings object and initializes each of its variables to the parameters.
PrintSettings(PrintSettings init)
          Constructs a new PrintSettings object and initializes to init.
 
Method Summary
 boolean isPrintAnnotations()
          Returns the value of the print annotations flag.
 void setPrintAnnotations(boolean printAnnotations)
          Sets the value of the print annotations flag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_AutoRotate

public boolean m_AutoRotate
Flag used to auto-rotate the document when printing. When this flag is set to true, the library will compare the PDF page to the printer page and find a best fit, to match landscape to landscape and portrait to portrait.


m_ShrinkToMargins

public boolean m_ShrinkToMargins
Flag used to shrink the output to fit the printer margins. When this flag is set to true, and the PDF content is larger than the printable margins on the printer, the output will be scaled down to fit within the printer margins.


m_ExpandToMargins

public boolean m_ExpandToMargins
Flag used to expand the output to the printer margins. When this flag is set to true, and the PDF content is smaller than the printable area on the printer, the output will be scaled up to fill the printable area on the printer page.


m_CenterInPage

public boolean m_CenterInPage
Flag used to center the output on the printed page. When this flag is set to true, and the PDF content is smaller than the printable area, the output will be centered on the printed page. This flag has no effect if the PDF content is larger than the printable area or if the expand to margins flag is set to true.


m_PrintAnnotations

public boolean m_PrintAnnotations
This flag tells the library whether to print annotations when sending the PDF content to a printer.

Constructor Detail

PrintSettings

public PrintSettings()
Constructs a default PrintSettings object. The default PrintSettings object will auto-rotate, shrink to margins, center in page, and print annotations, but will not expand the content to fit to the margins.


PrintSettings

public PrintSettings(boolean autoRotate,
                     boolean shrinkToMargins,
                     boolean expandToMargins,
                     boolean centerInPage)
Constructs a new PrintSettings object and initializes each of its variables to the parameters.

Parameters:
autoRotate - Sets the auto rotate flag.
shrinkToMargins - Sets the shrink to page flag.
expandToMargins - Sets the expand to page flag.
centerInPage - Sets the center in page flag.

PrintSettings

public PrintSettings(PrintSettings init)
Constructs a new PrintSettings object and initializes to init.

Parameters:
init - Object to use to initialize the new PrintSettings.
Method Detail

isPrintAnnotations

public boolean isPrintAnnotations()
Returns the value of the print annotations flag. This flag determines whether annotations on a PDF document will be printed.

Returns:
The value of the print annotations flag.

setPrintAnnotations

public void setPrintAnnotations(boolean printAnnotations)
Sets the value of the print annotations flag. This flag determines whether annotations on a PDF document will be printed.

Parameters:
printAnnotations - The new value of the print annotations flag.