- 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();