Click or drag to resize

PdfCompliance Enumeration

Specifies the PDF standards compliance level.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public enum PdfCompliance


  Member nameValueDescription
Pdf170 The output file will comply with the PDF 1.7 standard.
Pdf151 Obsolete. The output file will comply with the PDF 1.5 standard.
PdfA1a2 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.
PdfA1b3 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.


Shows how to save images to PDF using JPEG encoding to decrease file size.
Document doc = new Document(MyDir + "Images.docx");

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.ImageCompression = PdfImageCompression.Jpeg;
pdfSaveOptions.DownsampleOptions.DownsampleImages = false;

doc.Save(ArtifactsDir + "PdfSaveOptions.ImageCompression.pdf", pdfSaveOptions);

PdfSaveOptions pdfSaveOptionsA1B = new PdfSaveOptions();
pdfSaveOptionsA1B.Compliance = PdfCompliance.PdfA1b;
pdfSaveOptionsA1B.ImageCompression = PdfImageCompression.Jpeg;
pdfSaveOptionsA1B.DownsampleOptions.DownsampleImages = false;
// Use JPEG compression at 50% quality to reduce file size
pdfSaveOptionsA1B.JpegQuality = 100;
pdfSaveOptionsA1B.ImageColorSpaceExportMode = PdfImageColorSpaceExportMode.SimpleCmyk;

doc.Save(ArtifactsDir + "PdfSaveOptions.ImageCompression.PDF_A_1_B.pdf", pdfSaveOptionsA1B);

PdfSaveOptions pdfSaveOptionsA1A = new PdfSaveOptions();
pdfSaveOptionsA1A.Compliance = PdfCompliance.PdfA1a;
pdfSaveOptionsA1A.ExportDocumentStructure = true;
pdfSaveOptionsA1A.ImageCompression = PdfImageCompression.Jpeg;
pdfSaveOptionsA1A.DownsampleOptions.DownsampleImages = false;

doc.Save(ArtifactsDir + "PdfSaveOptions.ImageCompression.PDF_A_1_A.pdf", pdfSaveOptionsA1A);

See Also