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.

Fri Oct 24, 2014 7:17 am

What is the recommended way to convert an existing pdf to pdf/a? Is the following code enough?

Code: Select all
PdfDocument docInput = new PdfDocument(@"C:\test\input.pdf");
PdfDocument docOutput = new PdfDocument(PdfConformanceLevel.Pdf_A1B);
docOutput.InsertPageRange(docInput , 0, docInput.Pages.Count - 1);
docOutput.SaveToFile(@"C:\test\output.pdf", FileFormat.PDF);
docOutput.Close();
docInput.Close();

sikke.kooistra@avanade.com
 
Posts: 33
Joined: Fri Jun 27, 2014 1:39 pm

Fri Oct 24, 2014 7:35 am

Hello,

Thanks for your inquiry.
Yes, your codes are enough, if there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support tem
User avatar

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

Return to Spire.PDF