Class ConversionOptions
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.pdfa.conversion.ConversionOptions
-
public class ConversionOptions extends NativeObject
The PDF/A conversion options
The options for the conversion of documents using the converter's methodConverter.convert(com.pdftools.pdfa.validation.AnalysisResult, com.pdftools.pdf.Document, com.pdftools.sys.Stream)
-
-
Constructor Summary
Constructors Constructor Description ConversionOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Conformance
getConformance()
The minimal target conformance (Getter)boolean
getCopyMetadata()
Whether to copy metadata (Getter)double
getImageQuality()
Image quality of recompressed images (Getter)void
setConformance(Conformance value)
The minimal target conformance (Setter)void
setCopyMetadata(boolean value)
Whether to copy metadata (Setter)void
setImageQuality(double value)
Image quality of recompressed images (Setter)-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getConformance
public Conformance getConformance()
The minimal target conformance (Getter)
If a conformance is set, it is used as the minimal target conformance. The PDF/A version of the conformance must match the PDF/A version of the analysisOptions of
pdftools.pdfa.validation.Validator.analyze
. If the conformance level cannot be achieved, the conversion will abort with the errorConformanceException
. If a higher conformance level can be achieved, it is used automatically.If
null
is used, the optimal conformance determined in the analysis (i.e.pdftools.pdfa.validation.AnalysisResult.getRecommendedConformance
) is used. It is highly recommended to usenull
.Default value:
null
-
setConformance
public void setConformance(Conformance value)
The minimal target conformance (Setter)
If a conformance is set, it is used as the minimal target conformance. The PDF/A version of the conformance must match the PDF/A version of the analysisOptions of
pdftools.pdfa.validation.Validator.analyze
. If the conformance level cannot be achieved, the conversion will abort with the errorConformanceException
. If a higher conformance level can be achieved, it is used automatically.If
null
is used, the optimal conformance determined in the analysis (i.e.pdftools.pdfa.validation.AnalysisResult.getRecommendedConformance
) is used. It is highly recommended to usenull
.Default value:
null
-
getCopyMetadata
public boolean getCopyMetadata()
Whether to copy metadata (Getter)
Copy document information dictionary and XMP metadata. Default:true
.
-
setCopyMetadata
public void setCopyMetadata(boolean value)
Whether to copy metadata (Setter)
Copy document information dictionary and XMP metadata. Default:true
.
-
getImageQuality
public double getImageQuality()
Image quality of recompressed images (Getter)
The image quality for images that use a prohibited lossy compression type and must be recompressed. Supported values are
0.01
to1.0
. A higher value means better visual quality at the cost of a larger file size. Recommended values range from0.7
to0.9
.Example: JPX (JPEG2000) is not allowed in PDF/A-1. If a PDF contains a JPX compressed image, its compression type must be altered. Thus the image is converted to an image with JPEG compression using the image quality defined by this property. Copy document information dictionary and XMP metadata. Default value:
0.8
-
setImageQuality
public void setImageQuality(double value)
Image quality of recompressed images (Setter)
The image quality for images that use a prohibited lossy compression type and must be recompressed. Supported values are
0.01
to1.0
. A higher value means better visual quality at the cost of a larger file size. Recommended values range from0.7
to0.9
.Example: JPX (JPEG2000) is not allowed in PDF/A-1. If a PDF contains a JPX compressed image, its compression type must be altered. Thus the image is converted to an image with JPEG compression using the image quality defined by this property. Copy document information dictionary and XMP metadata. Default value:
0.8
- Throws:
java.lang.IllegalArgumentException
- The given value is smaller than0.1
or greater than1
.
-
-