|
|||||||||
| 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, IPrintOptions.ScaleOptionType |
| 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. |
boolean |
getCenter()
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. |
boolean |
getFitHorizontalPages()
For internal use only |
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()
For internal use only |
IPrintOptions.ScaleOptionType |
getScaleOption()
For internal use only |
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 |
setCenter(boolean center)
For internal use only |
void |
setContentHeight(int height)
For internal use only |
void |
setContentWidth(int width)
For internal use only |
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)
For internal use only |
void |
setFitHorizontalPages(boolean fitHorizontalPages)
For internal use only |
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)
For internal use only |
void |
setPrinterDuplex(PrinterDuplex duplex)
Sets the printer duplex. |
void |
setPrinterName(java.lang.String printerName)
Sets the printer name. |
void |
setPrinterType(IPrintOptions.PrinterType type)
For internal use only |
void |
setScaleOption(IPrintOptions.ScaleOptionType scale)
For internal use only |
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
getPrinterType in interface IPrintOptionspublic java.lang.String getDriverName()
IPrintOptionsGets the driver name.
getDriverName in interface IPrintOptionspublic java.lang.String getPortName()
IPrintOptionsGets the port name.
getPortName in interface IPrintOptionspublic void setPrinterName(java.lang.String printerName)
IPrintOptionsSets the printer name.
setPrinterName in interface IPrintOptionsprinterName - the name of the printer to be setpublic void setPageMargins(IPageMargins pageMargins)
IPrintOptionsSets 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 IPrintOptionspageMargins - the IPageMargins object whose properties will be setpublic void setPaperOrientation(PaperOrientation orientation)
IPrintOptionsSets the paper orientation.
setPaperOrientation in interface IPrintOptionsorientation - the PaperOrientation object whose properties will be setpublic void setPaperSize(PaperSize size)
IPrintOptionsSets the paper size.
setPaperSize in interface IPrintOptionssize - the PaperSize object whose properties will be setpublic void setPaperSource(PaperSource source)
IPrintOptionsSets the paper source.
setPaperSource in interface IPrintOptionssource - the PaperSource object whose properties will be setpublic void setPrinterDuplex(PrinterDuplex duplex)
IPrintOptionsSets the printer duplex.
setPrinterDuplex in interface IPrintOptionsduplex - the PrinterDuplex object whose properties will be setpublic void setDissociatePageSizeAndPrinterPaperSize(boolean bDissociatePageSizeAndPrinterPaperSize)
IPrintOptionsSets 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 IPrintOptionsbDissociatePageSizeAndPrinterPaperSize - true to dissociate, false otherwisepublic java.lang.String getPrinterName()
IPrintOptionsGets the printer name.
getPrinterName in interface IPrintOptionspublic IPageMargins getPageMargins()
IPrintOptionsGets the page margins.
getPageMargins in interface IPrintOptionsIPageMargins objectpublic int getContentWidth()
IPrintOptionsGets the report content width.
getContentWidth in interface IPrintOptionspublic int getContentHeight()
IPrintOptionsGets the report content height.
getContentHeight in interface IPrintOptionspublic PaperOrientation getPaperOrientation()
IPrintOptionsGets the paper orientation.
getPaperOrientation in interface IPrintOptionsPaperOrientation objectpublic PaperSize getPaperSize()
IPrintOptionsGets the paper size.
getPaperSize in interface IPrintOptionsPaperSize objectpublic PaperSource getPaperSource()
IPrintOptionsGets the paper source.
getPaperSource in interface IPrintOptionsPaperSource objectpublic PrinterDuplex getPrinterDuplex()
IPrintOptionsGets the printer duplex.
getPrinterDuplex in interface IPrintOptionsPrinterDuplex objectpublic boolean getDissociatePageSizeAndPrinterPaperSize()
IPrintOptionsGets a value that indicates whether the report page size is dissociated from printer paper sizes.
getDissociatePageSizeAndPrinterPaperSize in interface IPrintOptionsTrue if report page size is dissociated from printer paper sizes, and false otherwise.public void setScaleOption(IPrintOptions.ScaleOptionType scale)
IPrintOptions
setScaleOption in interface IPrintOptionspublic IPrintOptions.ScaleOptionType getScaleOption()
IPrintOptions
getScaleOption in interface IPrintOptionspublic void setCenter(boolean center)
IPrintOptions
setCenter in interface IPrintOptionspublic boolean getCenter()
IPrintOptions
getCenter in interface IPrintOptionspublic void setFitHorizontalPages(boolean fitHorizontalPages)
IPrintOptions
setFitHorizontalPages in interface IPrintOptionspublic boolean getFitHorizontalPages()
IPrintOptions
getFitHorizontalPages in interface IPrintOptionspublic 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 | ||||||||