public class PclSaveOptions extends FixedPageSaveOptions
SaveFormat.PCL format.
To learn more, visit the Specify Save Options documentation article.
Examples:
Shows how to rasterize complex elements while saving a document to PCL.
Document doc = new Document(getMyDir() + "Rendering.docx");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setSaveFormat(SaveFormat.PCL);
saveOptions.setRasterizeTransformedElements(true);
doc.save(getArtifactsDir() + "PclSaveOptions.RasterizeElements.pcl", saveOptions);
| Modifier and Type | Method and Description |
|---|---|
void |
addPrinterFont(java.lang.String fontFullName,
java.lang.String fontPclName)
Adds information about font that is uploaded to the printer by manufacturer.
|
java.lang.String |
getFallbackFontName()
Name of the font that will be used if no expected font is found in printer and built-in fonts collections.
|
boolean |
getRasterizeTransformedElements()
Gets a value determining whether or not complex transformed elements should be rasterized before saving to PCL document.
|
int |
getSaveFormat()
Specifies the format in which the document will be saved if this save options object is used.
|
void |
setFallbackFontName(java.lang.String value)
Name of the font that will be used if no expected font is found in printer and built-in fonts collections.
|
void |
setRasterizeTransformedElements(boolean value)
Sets a value determining whether or not complex transformed elements should be rasterized before saving to PCL document.
|
void |
setSaveFormat(int value)
Specifies the format in which the document will be saved if this save options object is used.
|
assertValidIdPrefix, equals, getColorMode, getJpegQuality, getMetafileRenderingOptions, getNumeralFormat, getOptimizeOutput, getPageSavingCallback, getPageSet, isValidIdPrefix, setColorMode, setJpegQuality, setMetafileRenderingOptions, setNumeralFormat, setOptimizeOutput, setPageSavingCallback, setPageSetcreateSaveOptions, createSaveOptions, getAllowEmbeddingPostScriptFonts, getCustomTimeZoneInfo, getDefaultTemplate, getDml3DEffectsRenderingMode, getDmlEffectsRenderingMode, getDmlRenderingMode, getExportGeneratorName, getImlRenderingMode, getMemoryOptimization, getPrettyFormat, getProgressCallback, getTempFolder, getUpdateAmbiguousTextFont, getUpdateCreatedTimeProperty, getUpdateFields, getUpdateLastPrintedProperty, getUpdateLastSavedTimeProperty, getUseAntiAliasing, getUseHighQualityRendering, setAllowEmbeddingPostScriptFonts, setCustomTimeZoneInfo, setDefaultTemplate, setDml3DEffectsRenderingMode, setDmlEffectsRenderingMode, setDmlRenderingMode, setExportGeneratorName, setImlRenderingMode, setMemoryOptimization, setPrettyFormat, setProgressCallback, setTempFolder, setUpdateAmbiguousTextFont, setUpdateCreatedTimeProperty, setUpdateFields, setUpdateLastPrintedProperty, setUpdateLastSavedTimeProperty, setUseAntiAliasing, setUseHighQualityRenderingpublic int getSaveFormat()
SaveFormat.PCL.
Examples:
Shows how to rasterize complex elements while saving a document to PCL.
Document doc = new Document(getMyDir() + "Rendering.docx");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setSaveFormat(SaveFormat.PCL);
saveOptions.setRasterizeTransformedElements(true);
doc.save(getArtifactsDir() + "PclSaveOptions.RasterizeElements.pcl", saveOptions);
getSaveFormat in class SaveOptionsint value. The returned value is one of SaveFormat constants.public void setSaveFormat(int value)
SaveFormat.PCL.
Examples:
Shows how to rasterize complex elements while saving a document to PCL.
Document doc = new Document(getMyDir() + "Rendering.docx");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setSaveFormat(SaveFormat.PCL);
saveOptions.setRasterizeTransformedElements(true);
doc.save(getArtifactsDir() + "PclSaveOptions.RasterizeElements.pcl", saveOptions);
setSaveFormat in class SaveOptionsvalue - The corresponding int value. The value must be one of SaveFormat constants.public boolean getRasterizeTransformedElements()
true.
Remarks:
PCL doesn't support some kind of transformations that are used by Aspose Words. E.g. rotated, skewed images and texture brushes. To properly render such elements rasterization process is used, i.e. saving to image and clipping. This process can take additional time and memory. If flag is set to false, some content in output may be different as compared with the source document.
Examples:
Shows how to rasterize complex elements while saving a document to PCL.
Document doc = new Document(getMyDir() + "Rendering.docx");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setSaveFormat(SaveFormat.PCL);
saveOptions.setRasterizeTransformedElements(true);
doc.save(getArtifactsDir() + "PclSaveOptions.RasterizeElements.pcl", saveOptions);
public void setRasterizeTransformedElements(boolean value)
true.
Remarks:
PCL doesn't support some kind of transformations that are used by Aspose Words. E.g. rotated, skewed images and texture brushes. To properly render such elements rasterization process is used, i.e. saving to image and clipping. This process can take additional time and memory. If flag is set to false, some content in output may be different as compared with the source document.
Examples:
Shows how to rasterize complex elements while saving a document to PCL.
Document doc = new Document(getMyDir() + "Rendering.docx");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setSaveFormat(SaveFormat.PCL);
saveOptions.setRasterizeTransformedElements(true);
doc.save(getArtifactsDir() + "PclSaveOptions.RasterizeElements.pcl", saveOptions);
value - A value determining whether or not complex transformed elements should be rasterized before saving to PCL document.public void addPrinterFont(java.lang.String fontFullName,
java.lang.String fontPclName)
Remarks:
There are 52 fonts that are to be built in any printer according to Pcl specification. However manufactures can add some other fonts to their devices.
Examples:
Shows how to get a printer to substitute all instances of a specific font with a different font.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getFont().setName("Courier");
builder.write("Hello world!");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.addPrinterFont("Courier New", "Courier");
// When printing this document, the printer will use the "Courier New" font
// to access places where our document used the "Courier" font.
doc.save(getArtifactsDir() + "PclSaveOptions.AddPrinterFont.pcl", saveOptions);
fontFullName - Full name of the font (e.g. "Times New Roman Bold Italic").fontPclName - Name of the font that is used in Pcl document.public java.lang.String getFallbackFontName()
Remarks:
If no fallback is found, a warning is generated and "Arial" font is used.
Examples:
Shows how to declare a font that a printer will apply to printed text as a substitute should its original font be unavailable.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getFont().setName("Non-existent font");
builder.write("Hello world!");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setFallbackFontName("Times New Roman");
// This document will instruct the printer to apply "Times New Roman" to the text with the missing font.
// Should "Times New Roman" also be unavailable, the printer will default to the "Arial" font.
doc.save(getArtifactsDir() + "PclSaveOptions.SetPrinterFont.pcl", saveOptions);
String value.public void setFallbackFontName(java.lang.String value)
Remarks:
If no fallback is found, a warning is generated and "Arial" font is used.
Examples:
Shows how to declare a font that a printer will apply to printed text as a substitute should its original font be unavailable.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getFont().setName("Non-existent font");
builder.write("Hello world!");
PclSaveOptions saveOptions = new PclSaveOptions();
saveOptions.setFallbackFontName("Times New Roman");
// This document will instruct the printer to apply "Times New Roman" to the text with the missing font.
// Should "Times New Roman" also be unavailable, the printer will default to the "Arial" font.
doc.save(getArtifactsDir() + "PclSaveOptions.SetPrinterFont.pcl", saveOptions);
value - The corresponding String value.