|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.document.PrintOptions
public class PrintOptions
This object allows you to get and set the print options for a report. This information includes: content height,
content width, driver name, page margins, paper orientation, paper size, paper source, port name, printer duplex, and printer name.
Use IPrintOptions
to access these methods.
Example:
This sample shows how to set the print options for a report with the PrintOutputController. The PrintOutputController enables you to export reports to a specific format, such as Microsoft Excel (97-2003), Rich Text Format (RTF), or PDF, and to modify various formatting options.
PrintOutputController printOutputController = clientDoc.getPrintOutputController();
IPrintOptions printOptions = printOutputController.getPrintOptions();
IPrintOptions newPrintOptions = (PrintOptions)((PrintOptions)printOptions).clone(true);
newPrintOptions.setPaperSize(PaperSize.paperLegal);
newPrintOptions.setPaperOrientation(PaperOrientation.landscape);
printOutputController.modifyPrintOptions(newPrintOptions);
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.crystaldecisions.sdk.occa.report.document.IPrintOptions |
---|
IPrintOptions.PrinterType |
Constructor Summary | |
---|---|
PrintOptions()
|
|
PrintOptions(IPrintOptions src)
|
Method Summary | |
---|---|
java.lang.Object |
clone(boolean deepClone)
|
void |
copyTo(java.lang.Object destObject,
boolean deepCopy)
|
java.lang.Object |
createMember(java.lang.String eleName,
org.xml.sax.Attributes attrs,
com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
For internal use only. |
void |
endElement(java.lang.String eleName,
java.util.Map objState)
For internal use only. |
int |
getContentHeight()
Gets the report content height. |
int |
getContentWidth()
Gets the report content width. |
boolean |
getDissociatePageSizeAndPrinterPaperSize()
Gets a value that indicates whether the report page size is dissociated from printer paper sizes. |
java.lang.String |
getDriverName()
Gets the driver name. |
IPageMargins |
getPageMargins()
Gets the page margins. |
PaperOrientation |
getPaperOrientation()
Gets the paper orientation. |
PaperSize |
getPaperSize()
Gets the paper size. |
PaperSource |
getPaperSource()
Gets the paper source. |
java.lang.String |
getPortName()
Gets the port name. |
PrinterDuplex |
getPrinterDuplex()
Gets the printer duplex. |
java.lang.String |
getPrinterName()
Gets the printer name. |
IPrintOptions.PrinterType |
getPrinterType()
Gets the type of a printer |
boolean |
hasContent(java.lang.Object srcPrintOptions)
|
void |
readElement(java.lang.String eleName,
java.lang.String sVal,
org.xml.sax.Attributes attrs,
java.util.Map objState)
For internal use only. |
void |
save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
For internal use only. |
void |
save(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
void |
saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
void |
setContentHeight(int height)
|
void |
setContentWidth(int width)
|
void |
setDissociatePageSizeAndPrinterPaperSize(boolean bDissociatePageSizeAndPrinterPaperSize)
Sets a value that indicates whether the report page size is dissociated from printer paper sizes. |
void |
setDriverName(java.lang.String driverName)
|
void |
setPageMargins(IPageMargins pageMargins)
Sets the page margins. |
void |
setPaperOrientation(PaperOrientation orientation)
Sets the paper orientation. |
void |
setPaperSize(PaperSize size)
Sets the paper size. |
void |
setPaperSource(PaperSource source)
Sets the paper source. |
void |
setPortName(java.lang.String portName)
|
void |
setPrinterDuplex(PrinterDuplex duplex)
Sets the printer duplex. |
void |
setPrinterName(java.lang.String printerName)
Sets the printer name. |
void |
setPrinterType(IPrintOptions.PrinterType type)
|
void |
startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
For internal use only. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintOptions(IPrintOptions src)
public PrintOptions()
Method Detail |
---|
public void setContentWidth(int width)
public void setContentHeight(int height)
public void setDriverName(java.lang.String driverName)
public void setPortName(java.lang.String portName)
public void setPrinterType(IPrintOptions.PrinterType type)
public IPrintOptions.PrinterType getPrinterType()
IPrintOptions
Gets the type of a printer
getPrinterType
in interface IPrintOptions
IPrintOptions.PrinterType
public java.lang.String getDriverName()
IPrintOptions
Gets the driver name.
getDriverName
in interface IPrintOptions
public java.lang.String getPortName()
IPrintOptions
Gets the port name.
getPortName
in interface IPrintOptions
public void setPrinterName(java.lang.String printerName)
IPrintOptions
Sets the printer name.
setPrinterName
in interface IPrintOptions
printerName
- the name of the printer to be setpublic void setPageMargins(IPageMargins pageMargins)
IPrintOptions
Sets the page margins.
Note: As of the Report Application Server 12 SDK, the
PrintOutputController.modifyPageMargins
method must be used to set all page margins to the default value 0. Attempts to set all page margins to 0 using the
PrintOutputController.modifyPrintOptions
method are ignored.
setPageMargins
in interface IPrintOptions
pageMargins
- the IPageMargins
object whose properties will be setpublic void setPaperOrientation(PaperOrientation orientation)
IPrintOptions
Sets the paper orientation.
setPaperOrientation
in interface IPrintOptions
orientation
- the PaperOrientation
object whose properties will be setpublic void setPaperSize(PaperSize size)
IPrintOptions
Sets the paper size.
setPaperSize
in interface IPrintOptions
size
- the PaperSize
object whose properties will be setpublic void setPaperSource(PaperSource source)
IPrintOptions
Sets the paper source.
setPaperSource
in interface IPrintOptions
source
- the PaperSource
object whose properties will be setpublic void setPrinterDuplex(PrinterDuplex duplex)
IPrintOptions
Sets the printer duplex.
setPrinterDuplex
in interface IPrintOptions
duplex
- the PrinterDuplex
object whose properties will be setpublic void setDissociatePageSizeAndPrinterPaperSize(boolean bDissociatePageSizeAndPrinterPaperSize)
IPrintOptions
Sets a value that indicates whether the report page size is dissociated from printer paper sizes. Setting this property to true allows you to control the height and width of the report independent of the paper size specified. This can be useful when the report is viewed electronically, such as on a Web Site. Note: Set to true if using custom page sizes for web-based pagination.
setDissociatePageSizeAndPrinterPaperSize
in interface IPrintOptions
bDissociatePageSizeAndPrinterPaperSize
- true to dissociate, false otherwisepublic java.lang.String getPrinterName()
IPrintOptions
Gets the printer name.
getPrinterName
in interface IPrintOptions
public IPageMargins getPageMargins()
IPrintOptions
Gets the page margins.
getPageMargins
in interface IPrintOptions
IPageMargins
objectpublic int getContentWidth()
IPrintOptions
Gets the report content width.
getContentWidth
in interface IPrintOptions
public int getContentHeight()
IPrintOptions
Gets the report content height.
getContentHeight
in interface IPrintOptions
public PaperOrientation getPaperOrientation()
IPrintOptions
Gets the paper orientation.
getPaperOrientation
in interface IPrintOptions
PaperOrientation
objectpublic PaperSize getPaperSize()
IPrintOptions
Gets the paper size.
getPaperSize
in interface IPrintOptions
PaperSize
objectpublic PaperSource getPaperSource()
IPrintOptions
Gets the paper source.
getPaperSource
in interface IPrintOptions
PaperSource
objectpublic PrinterDuplex getPrinterDuplex()
IPrintOptions
Gets the printer duplex.
getPrinterDuplex
in interface IPrintOptions
PrinterDuplex
objectpublic boolean getDissociatePageSizeAndPrinterPaperSize()
IPrintOptions
Gets a value that indicates whether the report page size is dissociated from printer paper sizes.
getDissociatePageSizeAndPrinterPaperSize
in interface IPrintOptions
True
if report page size is dissociated from printer paper sizes, and false
otherwise.public java.lang.Object clone(boolean deepClone)
public boolean hasContent(java.lang.Object srcPrintOptions)
public void copyTo(java.lang.Object destObject, boolean deepCopy)
public java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
For internal use only.
public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
For internal use only.
public void save(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void saveContents(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void endElement(java.lang.String eleName, java.util.Map objState)
For internal use only.
public void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
For internal use only.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |