com.qoppa.pdf
Class PrintSettings

java.lang.Object
  extended bycom.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 four 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_ShrinkToPage - 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_ExpandToPage - 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.

Author:
Qoppa Software

Field Summary
 boolean m_AutoRotate
           
 boolean m_CenterInPage
           
 boolean m_ExpandToMargins
           
 boolean m_ForceUserPageFormat
          Use the PageFormat set by the host application.
 boolean m_ShrinkToMargins
           
 
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 isForceUserPageFormat()
          Returns the value of the ForceUserPageFormat attribute.
 void setForceUserPageFormat(boolean forceUserPageFormat)
          Use the PageFormat set by the host application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_AutoRotate

public boolean m_AutoRotate

m_ShrinkToMargins

public boolean m_ShrinkToMargins

m_ExpandToMargins

public boolean m_ExpandToMargins

m_CenterInPage

public boolean m_CenterInPage

m_ForceUserPageFormat

public boolean m_ForceUserPageFormat
Use the PageFormat set by the host application. This attribute tells the library to use the default PageFormat set specifically by the host application before printing a document. Setting this atttribute to true overrides the default printing behaviour where the library talks to the printer to determine it's margin capabilities and then does a "best fit" of the PDF page onto the printer page.

Constructor Detail

PrintSettings

public PrintSettings()
Constructs a default PrintSettings object. The default PrintSettings object will auto-rotate, shrink to fit and center in page, 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

isForceUserPageFormat

public boolean isForceUserPageFormat()
Returns the value of the ForceUserPageFormat attribute.

Returns:
Value of m_ForceUserPageFormat

setForceUserPageFormat

public void setForceUserPageFormat(boolean forceUserPageFormat)
Use the PageFormat set by the host application. This attribute tells the library to use the default PageFormat set specifically by the host application before printing a document. Setting this atttribute to true overrides the default printing behaviour where the library talks to the printer to determine it's margin capabilities and then does a "best fit" of the PDF page onto the printer page.

Parameters:
forceUserPageFormat - The new value of the ForceUserPageFormat attribute.