I can't convert my pdf file patate_13_2015-01-14.pdf to pdf/a correctly.
If you check the original file, it contains in the right top corner a red box with a text... when we convert it to pdf/a (patate_result.pdf), the red box has disappeared.
Here's the code we used :
- Code: Select all
PdfDocument originalDoc = new PdfDocument();
originalDoc.LoadFromFile("C:\\Projets\\pdfa\\patate_13_2015-01-14.pdf");
//originalDoc.LoadFromFile("C:\\Projets\\pdfa\\test-tanya.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("C:\\Projets\\pdfa\\patate.pdf");
System.Diagnostics.Process.Start("C:\\Projets\\pdfa\\patate.pdf");
Can you help us please?
Thanks in advance.