public class PSRenderingUtil extends Object
Modifier and Type | Method and Description |
---|---|
int |
getLanguageLevel()
Indicates the selected PostScript language level.
|
org.apache.fop.render.ps.PSRenderingMode |
getRenderingMode()
Returns the rendering mode.
|
boolean |
isAcrobatDownsample() |
boolean |
isAutoRotateLandscape()
Indicates whether landscape pages are rotated.
|
boolean |
isDSCComplianceEnabled() |
boolean |
isOptimizeResources()
Indicates whether PostScript resources are optimized in a second pass over the document.
|
boolean |
isSafeSetPageDevice()
Indicates whether the "safe setpagedevice" mode is active.
|
void |
setAcrobatDownsample(boolean b) |
void |
setAutoRotateLandscape(boolean value)
Controls whether landscape pages should be rotated.
|
void |
setDSCComplianceEnabled(boolean value)
Sets whether or not the safe set page device macro should be used
(as opposed to directly invoking setpagedevice) when setting the
PostScript page device.
|
void |
setLanguageLevel(int level)
Sets the PostScript language level.
|
void |
setOptimizeResources(boolean value)
Controls whether PostScript resources are optimized in a second pass over the document.
|
void |
setRenderingMode(org.apache.fop.render.ps.PSRenderingMode renderingMode)
Sets the rendering mode.
|
void |
setSafeSetPageDevice(boolean value)
Sets whether or not PostScript Document Structuring Conventions (DSC) compliance are
enforced.
|
static void |
writeEnclosedExtensionAttachment(org.apache.xmlgraphics.ps.PSGenerator gen,
PSExtensionAttachment attachment)
Formats and writes a PSExtensionAttachment to the output stream.
|
static void |
writeEnclosedExtensionAttachments(org.apache.xmlgraphics.ps.PSGenerator gen,
Collection attachmentCollection)
Formats and writes a Collection of PSExtensionAttachment instances to
the output stream.
|
static void |
writeSetupCodeList(org.apache.xmlgraphics.ps.PSGenerator gen,
List setupCodeList,
String type)
Formats and writes a List of PSSetupCode instances to the output stream.
|
public static void writeSetupCodeList(org.apache.xmlgraphics.ps.PSGenerator gen, List setupCodeList, String type) throws IOException
gen
- the PS generatorsetupCodeList
- a List of PSSetupCode instancestype
- the type of code sectionIOException
- if an I/O error occurs.public static void writeEnclosedExtensionAttachments(org.apache.xmlgraphics.ps.PSGenerator gen, Collection attachmentCollection) throws IOException
gen
- the PS generatorattachmentCollection
- a Collection of PSExtensionAttachment instancesIOException
- if an I/O error occurs.public static void writeEnclosedExtensionAttachment(org.apache.xmlgraphics.ps.PSGenerator gen, PSExtensionAttachment attachment) throws IOException
gen
- the PS generatorattachment
- an PSExtensionAttachment instanceIOException
- if an I/O error occurs.public void setSafeSetPageDevice(boolean value)
It can cause problems (unwanted PostScript subsystem initgraphics/erasepage calls) on some printers when the pagedevice is set. If this causes problems on a particular implementation then use this setting with a 'false' value to try and minimize the number of setpagedevice calls in the PostScript document output.
Set this value to false if you experience unwanted blank pages in your PostScript output.
value
- boolean value (default is true)public boolean isSafeSetPageDevice()
setSafeSetPageDevice(boolean)
for more information.public void setDSCComplianceEnabled(boolean value)
This option is a useful option when you want to guard against the possibility of invalid/unsupported PostScript key/values being placed in the page device.
value
- setting to false and the renderer will make a
standard "setpagedevice" call, setting to true will make a safe set page
device macro call (default is false).public boolean isDSCComplianceEnabled()
public void setAutoRotateLandscape(boolean value)
value
- true to enable the rotationpublic boolean isAutoRotateLandscape()
public void setLanguageLevel(int level)
level
- the PostScript language level (Only 2 and 3 are currently supported)public int getLanguageLevel()
public void setAcrobatDownsample(boolean b)
public boolean isAcrobatDownsample()
public void setOptimizeResources(boolean value)
value
- true to enable resource optimizationpublic boolean isOptimizeResources()
public void setRenderingMode(org.apache.fop.render.ps.PSRenderingMode renderingMode)
renderingMode
- the rendering modepublic org.apache.fop.render.ps.PSRenderingMode getRenderingMode()
Copyright © 2025 Apache Software Foundation. All rights reserved.