public class PrintSettings extends Object
Modifier and Type | Field and Description |
---|---|
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_PrintFormFields
This flag tells the library whether to print form fields when sending
the PDF content to a printer.
|
boolean |
m_PrintFormsOnly
Deprecated.
|
boolean |
m_PrintPageContents
This flag tells the library whether to print page contents when sending
the PDF content to a printer.
|
boolean |
m_QoppaDialog
Sets the value of the Qoppa print dialog flag.
|
boolean |
m_ScaleImagesToOutput
This flag is using when printing images.
|
boolean |
m_ShrinkToMargins
Flag used to shrink the output to fit the printer margins.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getPrintableRectangle(int pageIndex)
Returns the area to print.
|
boolean |
isPrintAnnotations()
Returns the value of the print annotations flag.
|
boolean |
isPrintFormFields()
Returns the value of the print form fields flag.
|
boolean |
isPrintFormsOnly()
Deprecated.
Use m_PrintFormFields = true and m_PrintPageContents = false instead.
|
boolean |
isPrintPageContents()
Returns the value of the page contents flag.
|
boolean |
isQoppaPrintDialog()
Returns the value of the Qoppa print dialog flag.
|
boolean |
isScaleImagesToOutput()
Returns the value of the flag that controls whether images are resized
to their output size by the library or by the printer / printer driver.
|
void |
setPrintableRectangle(int pageIndex,
Rectangle2D rect)
Sets the area to print.
|
void |
setPrintAnnotations(boolean printAnnotations)
Sets the value of the print annotations flag.
|
void |
setPrintFormFields(boolean print)
Sets the value of the print form fields flag.
|
void |
setPrintFormsOnly(boolean print)
Deprecated.
Use m_PrintFormFields = true and m_PrintPageContents = false instead.
|
void |
setPrintPageContents(boolean print)
Sets the value of the print page contents flag.
|
void |
setQoppaPrintDialog(boolean qoppaDialog)
Sets the value of the Qoppa print dialog flag.
|
void |
setScaleImagesToOutput(boolean scaleImagesToOutput)
this method sets the value of the flag that controls whether the library resizes
images to the output size and DPI when printing, or if images are sent to the printer
in their original size, an the printer or printer driver resizes them.
In most cases, having the library rescale the image will produce better quality, but will take more processing power to print. |
public boolean m_AutoRotate
public boolean m_ShrinkToMargins
public boolean m_ExpandToMargins
public boolean m_CenterInPage
public boolean m_PrintAnnotations
public boolean m_PrintPageContents
public boolean m_PrintFormFields
@Deprecated public boolean m_PrintFormsOnly
public boolean m_QoppaDialog
public boolean m_ScaleImagesToOutput
public PrintSettings()
public PrintSettings(boolean autoRotate, boolean shrinkToMargins, boolean expandToMargins, boolean centerInPage)
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.public PrintSettings(PrintSettings init)
init
- Object to use to initialize the new PrintSettings.public boolean isPrintAnnotations()
public void setPrintAnnotations(boolean printAnnotations)
printAnnotations
- The new value of the print annotations flag.public boolean isPrintFormFields()
public void setPrintFormFields(boolean print)
print
- The new value of the print form fields flag.public boolean isPrintPageContents()
public void setPrintPageContents(boolean print)
print
- The new value of the print page contents flag.public void setPrintableRectangle(int pageIndex, Rectangle2D rect)
pageIndex
- The index of the page. Page index starts at 0.rect
- The area to print.public Rectangle2D getPrintableRectangle(int pageIndex)
pageIndex
- The index of the page. Page index starts at 0.public void setQoppaPrintDialog(boolean qoppaDialog)
qoppaDialog
- The value of the custom dialog flag.public boolean isQoppaPrintDialog()
public void setScaleImagesToOutput(boolean scaleImagesToOutput)
scaleImagesToOutput
- public boolean isScaleImagesToOutput()
@Deprecated public boolean isPrintFormsOnly()
@Deprecated public void setPrintFormsOnly(boolean print)
print
- The value of the print form fields only flag.