public class PdfCompliance
extends java.lang.Object
Examples:
Shows how to set the PDF standards compliance level of saved PDF documents.
Document doc = new Document(getMyDir() + "Images.docx");
// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
// Note that some PdfSaveOptions are prohibited when saving to one of the standards and automatically fixed.
// Use IWarningCallback to know which options are automatically fixed.
PdfSaveOptions saveOptions = new PdfSaveOptions();
// Set the "Compliance" property to "PdfCompliance.PdfA1b" to comply with the "PDF/A-1b" standard,
// which aims to preserve the visual appearance of the document as Aspose.Words convert it to PDF.
// Set the "Compliance" property to "PdfCompliance.Pdf17" to comply with the "1.7" standard.
// Set the "Compliance" property to "PdfCompliance.PdfA1a" to comply with the "PDF/A-1a" standard,
// which complies with "PDF/A-1b" as well as preserving the document structure of the original document.
// Set the "Compliance" property to "PdfCompliance.PdfUa1" to comply with the "PDF/UA-1" (ISO 14289-1) standard,
// which aims to define represent electronic documents in PDF that allow the file to be accessible.
// Set the "Compliance" property to "PdfCompliance.Pdf20" to comply with the "PDF 2.0" (ISO 32000-2) standard.
// Set the "Compliance" property to "PdfCompliance.PdfA4" to comply with the "PDF/A-4" (ISO 19004:2020) standard,
// which preserving document static visual appearance over time.
// Set the "Compliance" property to "PdfCompliance.PdfA4Ua2" to comply with both PDF/A-4 (ISO 19005-4:2020)
// and PDF/UA-2 (ISO 14289-2:2024) standards.
// Set the "Compliance" property to "PdfCompliance.PdfUa2" to comply with the PDF/UA-2 (ISO 14289-2:2024) standard.
// This helps with making documents searchable but may significantly increase the size of already large documents.
saveOptions.setCompliance(pdfCompliance);
doc.save(getArtifactsDir() + "PdfSaveOptions.Compliance.pdf", saveOptions);
| Modifier and Type | Field and Description |
|---|---|
static int |
length |
static int |
PDF_17
The output file will comply with the PDF 1.7 (ISO 32000-1) standard.
|
static int |
PDF_20
The output file will comply with the PDF 2.0 (ISO 32000-2) standard.
|
static int |
PDF_A_1_A
The output file will comply with the PDF/A-1a (ISO 19005-1) standard.
|
static int |
PDF_A_1_B
The output file will comply with the PDF/A-1b (ISO 19005-1) standard.
|
static int |
PDF_A_2_A
The output file will comply with the PDF/A-2a (ISO 19005-2) standard.
|
static int |
PDF_A_2_U
The output file will comply with the PDF/A-2u (ISO 19005-2) standard.
|
static int |
PDF_A_3_A
The output file will comply with the PDF/A-3a (ISO 19005-3) standard.
|
static int |
PDF_A_3_U
The output file will comply with the PDF/A-3u (ISO 19005-3) standard.
|
static int |
PDF_A_4
The output file will comply with the PDF/A-4 (ISO 19005-4:2020) standard.
|
static int |
PDF_A_4_F
The output file will comply with the PDF/A-4f (ISO 19005-4:2020) standard.
|
static int |
PDF_A_4_UA_2
The output file will comply with both PDF/A-4 (ISO 19005-4:2020) and PDF/UA-2 (ISO 14289-2:2024) standards.
|
static int |
PDF_UA_1
The output file will comply with the PDF/UA-1 (ISO 14289-1) standard.
|
static int |
PDF_UA_2
The output file will comply with the PDF/UA-2 (ISO 14289-2:2024) standard.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String pdfComplianceName) |
static java.lang.String |
getName(int pdfCompliance) |
static int[] |
getValues() |
static java.lang.String |
toString(int pdfCompliance) |
public static int PDF_17
public static int PDF_20
public static int PDF_A_1_A
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int PDF_A_1_B
public static int PDF_A_2_A
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int PDF_A_2_U
public static int PDF_A_3_A
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int PDF_A_3_U
public static int PDF_A_4
public static int PDF_A_4_F
public static int PDF_A_4_UA_2
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int PDF_UA_1
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int PDF_UA_2
Remarks:
Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
public static int length