Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Apr 15, 2019 3:34 pm

Hi,

I'm using Spire.PDF to write some simple code to generate PDFA documents.

1. Is it possible to create a PDFA and add custom properties to it?

The following code creates a PDFA but doesn't add the custom property test-ing to the document.
If I add the custom property before changing the conformance level the property test-ing is added but the document is no longer saved as a PDFA.
Code: Select all
        Dim originalDocument As New PdfDocument
        originalDocument.LoadFromFile("...\originalDocument.pdf", FileFormat.PDF)

        Dim PDFADocument As New PdfNewDocument
        'PDFADocument.DocumentInformation.SetCustomerDefined("test", "ing")
        PDFADocument.Conformance = PdfConformanceLevel.Pdf_A1B
        For Each page As PdfPageBase In originalDocument.Pages
            Dim size As SizeF = page.Size
            Dim p As PdfPageBase = PDFADocument.Pages.Add(size, New Spire.Pdf.Graphics.PdfMargins(0))
            page.CreateTemplate().Draw(p, 0, 0)
        Next
        PDFADocument.DocumentInformation.SetCustomerDefined("test", "ing")


        PDFADocument.Save("...\PDFADocument.pdf")


Thanks,

Ryan

ryanm
 
Posts: 3
Joined: Mon Apr 15, 2019 3:19 pm

Tue Apr 16, 2019 10:47 am

Hello,

Thanks for your inquiry.
According to the specification of PDF/A, it doesn't support adding custom properties for a PDF/A file. You can verify this in Adobe Acorbat. If there is any other question, welcome to write back.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Mon Apr 22, 2019 1:41 am

ich habe ein Problem mit diese

woodiskingser
 
Posts: 1
Joined: Wed Apr 17, 2019 7:33 am

Mon Apr 22, 2019 2:17 am

Hello Woodiskingser,

Thanks for your post. What is your problem? Please share us with the details of your problem or requirement, then we will further look into it and guide you accordingly.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF