com.aspose.words

Class PdfCompliance

  • java.lang.Object
    • com.aspose.words.PdfCompliance
public class PdfCompliance 
extends java.lang.Object

Utility class containing constants. Specifies the PDF standards compliance level.

Example:

Demonstrates how to save images to PDF using JPEG encoding to decrease file size.
Document doc = new Document(getMyDir() + "SaveOptions.PdfImageCompression.rtf");

PdfSaveOptions options = new PdfSaveOptions();

options.setImageCompression(PdfImageCompression.JPEG);
options.setPreserveFormFields(true);

doc.save(getMyDir() + "\\Artifacts\\SaveOptions.PdfImageCompression Out.pdf", options);

PdfSaveOptions optionsA1B = new PdfSaveOptions();
optionsA1B.setCompliance(PdfCompliance.PDF_A_1_B);
optionsA1B.setImageCompression(PdfImageCompression.JPEG);
optionsA1B.setJpegQuality(100); // Use JPEG compression at 50% quality to reduce file size.

doc.save(getMyDir() + "\\Artifacts\\SaveOptions.PdfImageComppression PDF_A_1_B Out.pdf", optionsA1B);

Field Summary
static final intPDF_15 = 0
The output file will comply with the PDF 1.5 standard.
static final intPDF_A_1_A = 1
The output file will comply with the PDF/A-1a standard. This level includes all the requirements of PDF/A-1b and additionally requires that document structure be included (also known as being "tagged"), with the objective of ensuring that document content can be searched and repurposed.
static final intPDF_A_1_B = 2
The output file will comply with the PDF/A-1b standard. PDF/A-1b has the objective of ensuring reliable reproduction of the visual appearance of the document.
 

    • Field Detail

      • PDF_15 = 0

        public static final int PDF_15
        The output file will comply with the PDF 1.5 standard.
      • PDF_A_1_A = 1

        public static final int PDF_A_1_A
        The output file will comply with the PDF/A-1a standard. This level includes all the requirements of PDF/A-1b and additionally requires that document structure be included (also known as being "tagged"), with the objective of ensuring that document content can be searched and repurposed. Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.
      • PDF_A_1_B = 2

        public static final int PDF_A_1_B
        The output file will comply with the PDF/A-1b standard. PDF/A-1b has the objective of ensuring reliable reproduction of the visual appearance of the document.