Hello,
Hi Jeroen,
// Load the file<o:p></o:p>
Aspose.Cells.Workbook book = new Aspose.Cells.Workbook(myDir+"Xlsx+-+1w.xlsx");
// Convert it directly
book.Save(myDir + "Xlsx+-+1w_cells.pdf", new Aspose.Cells.PdfSaveOptions() { Compliance = Aspose.Cells.Rendering.PdfCompliance.PdfA1b });
// Convert to a TIFF, and then a PDF/A
using (MemoryStream stream = new MemoryStream())
{
Aspose.Cells.ImageSaveOptions options = new Aspose.Cells.ImageSaveOptions(Aspose.Cells.SaveFormat.TIFF);
options.ImageOrPrintOptions.TiffCompression = Aspose.Cells.Rendering.TiffCompression.CompressionLZW;
book.Save(stream, options);
Bitmap bmp = new Bitmap(stream);
Aspose.Pdf.Document pdf = new Aspose.Pdf.Document();
Aspose.Pdf.Page page = pdf.Pages.Add();
page.PageInfo.Margin.Bottom = 0;
page.PageInfo.Margin.Top = 0;
page.PageInfo.Margin.Left = 0;
page.PageInfo.Margin.Right = 0;
page.CropBox = new Aspose.Pdf.Rectangle(0, 0, bmp.Width, bmp.Height);
Aspose.Pdf.Image img = new Aspose.Pdf.Image();
page.Paragraphs.Add(img);
img.ImageStream = stream;
bool success = pdf.Convert(myDir+"Convert Log.xml", Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);
pdf.Save(myDir+"Xlsx+-+1w_pdf.pdf");
}
Ah, that explains a lot. We thought that, since PDA/A is an ISO standard, there is but a single way to conform to it. Apparently, there are multiple interpretations possible, or some of the tools are simply wrong.
Hi Jeroen,
Hi Jeroen,
Hi Tilal,
Hi Eric,
Thanks for your inquiry. I have tested the compliance of your shared PDF document with Adobe Acrobat XI preflight and found that it is not PDFA1a compliant document. Please find attached screenshot for the reference.
Moreover, you are using a quite old version of Aspose.Pdf .Net i.e.9.0 for the conversion. It is recommend to use latest version of Aspose.Pdf for .NET, as later versions have number of fixes and enhancements. Hopefully it will resolve the issue. However if the issue still persist then please share your source PDF document here, we will look into it and guide you accordingly.
We are sorry for the inconvenience caused.
Best Regards,