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.

Wed Oct 12, 2016 10:04 pm

Hello,

We're having some troubles when converting a PDF file to Pdf_A1B.

Code: Select all
private PdfNewDocument ConvertPdfToDifferentStandard(PdfDocument originalDocument, PdfConformanceLevel level, string convertedFilePath, string convertedFileName)
        {
            var document = new PdfNewDocument(level);

            foreach (PdfPageBase pdfPage in originalDocument.Pages)
            {
                var size = pdfPage.Size;
                var convertedPage = document.Pages.Add(size, new PdfMargins(0));

                pdfPage.CreateTemplate().Draw(convertedPage, 0, 0);
            }

            document.Save(Path.Combine(convertedFilePath, convertedFileName));

            return document;
        }



After saving the pdf, the property document.Conformance is equal to PdfConformanceLevel.None
Even if I set the property to PdfConformanceLevel.Pdf_A1B, after
Code: Select all
document.Save(Path.Combine(convertedFilePath, convertedFileName));
the value is lost which doesn't allow me to unit test the result


When we tried to convert to Pdf_A1A, the document is saved but it is not recognized as PDF/ A document


I enclosed the PDF we are using (original: PDF Test avec une signature.pdf), the Pdf_A1A (PdfTestAvecUneSignature - A1A) and Pdf_A1B (PdfTestAvecUneSignature - A1B) versions

Thanks in advance.

MarcRoulleau
 
Posts: 6
Joined: Tue Oct 04, 2016 3:51 pm

Thu Oct 13, 2016 6:47 am

Dear MarcRoulleau,

Thanks for your detailed information.
I tested the Pdf_A1B (PdfTestAvecUneSignature - A1B) file with the latest Spire.PDF Pack(Hot Fix) Version:3.8.8, it can return correct value, you can check the screenshot I attached.
Also, I have noticed the PDF_A1A issue, and posted it to our Dev team. Once there is any progress, we will let you know. Sorry for inconvenience.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Oct 28, 2020 1:37 am

Hi,

Glad to inform you we have revised specification on PDF A1A. Welcome to download and use Spire.PDF Pack(Hot Fix) Version:6.10.9
Our website link:https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
NuGet link:https://www.nuget.org/packages/Spire.PDF/6.10.9

Besides, please use following code to convert to PDF A1A.

Code: Select all
            PdfStandardsConverter converter = new PdfStandardsConverter(File);
            converter.ToPdfA1A(outputFile);


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF