We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com


I am trying to save a pdf file with the PdfA1 option, but whenever I use the Aspose.Pdf ( ) Convert method, I get an EndOfStreamException: Unable to read beyond the end of the stream. The same error happens when I use the validate method.

MemoryStream ms = new MemoryStream();

auditDoc.Save(ms, SaveFormat.Pdf);

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(ms);
MemoryStream logStream = new MemoryStream();

// bool validated = pdfDocument.Validate(logStream, PdfFormat.PDF_A_1A);
pdfDocument.Convert(logStream, PdfFormat.PDF_A_1A, ConvertErrorAction.None);

When I use this variant in Aspose.Words (, I can save the file, but using a validator tool, the generated pdf file has many issues and is marked as not PDF-A1 compliant.

MemoryStream ms = new MemoryStream();
PdfSaveOptions options = new PdfSaveOptions();
options.SaveFormat = SaveFormat.Pdf;
options.Compliance = PdfCompliance.PdfA1a;
auditDoc.Save(ms, new PdfSaveOptions());

I need either one of those variants to generate me a valid pdf-A document.

Hi Niels,

Thanks for your inquriy. We will appreciate it if you please share your sample source document here, so we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,