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 Dec 01, 2014 2:13 am

Hello,

This is my code:

Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();

doc.LoadFromFile(source);
doc.PDFStandard.Conformance = Spire.Pdf.PdfConformanceLevel.Pdf_A1B;
doc.SaveToFile(destination, Spire.Pdf.FileFormat.PDF);
doc.Close();
doc.Dispose();
doc = null;

I have a problem, when I run this code with the free version(FreeSpire.PDF.3.0) from nuget gallery I can see everything is ok, because when I open the file with acrobat show me a message warning about pdf/a claims compliance, but when I use the trial version 3.2.0 and open the document acrobat doesn´t show me any warning, its correct this behavior?, I need to buy your product, but I need ensure it´s going to work ok before.

Regards,

Javier

javargas
 
Posts: 2
Joined: Mon Dec 01, 2014 1:31 am

Mon Dec 01, 2014 6:28 am

Hello,

Thanks for your inquiry.
Actrually, the generated result via the free version is not correct as it is too older, Everything is subject to the trial version, and the way to convert to pdf/a you used is not correct. Please use the following method. Sorry that make you misunderstand.
Code: Select all
PdfDocument OriginalDoc = new PdfDocument();
OriginalDoc.LoadFromFile("Original.pdf");
PdfNewDocument newDOC = new PdfNewDocument();
newDOC.Conformance = PdfConformanceLevel.Pdf_A1B;
foreach (PdfPageBase page in OriginalDoc.Pages)
            {
                float pageWidth = page.Size.Width + OriginalDoc.PageSettings.Margins.Left + OriginalDoc.PageSettings.Margins.Right;
                float pageHeight = page.Size.Height + OriginalDoc.PageSettings.Margins.Top + OriginalDoc.PageSettings.Margins.Bottom;
                PdfPageBase p = newDOC.Pages.Add(new SizeF(pageWidth, pageHeight));
                page.CreateTemplate().Draw(p, 0, 0);
            }
      newDOC.Save("result.pdf");

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Dec 02, 2014 3:03 am

Hi Gary,

It's works like a charm, but I have another problem. I opened the pdf file resulting and tried to verify conformance with adobe acrobat pro but the verification failed.

Regards,

Javier

javargas
 
Posts: 2
Joined: Mon Dec 01, 2014 1:31 am

Tue Dec 02, 2014 6:35 am

Hello,

Thanks for your response.
I have noticed the issue you mentioned, which has been transferred to our Dev team, once there are any progress, we will let you know.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Jan 15, 2015 8:14 am

Hello,

Sorry for long silence. The issue has been resolved, and the newest hotfix has just been released, please download and try Spire.PDF Pack(Hot Fix) Version:3.2.60
If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team​
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDF