3.) Found a semi-solution for this issue. Performing a OptimizeResources on the document before a Convert resulted in a lower result file size (15kb to 845kb in my case).
I am afraid I am unable to find multipart.pdf file in earlier posts. Can you please again try attaching the document.Nathan.Ramirez:1.) I need to verify if a PDF document is digitally signed. When I use the code snippet below I receive a Null Reference Exception on the fileSignature.ContainsSignature call. In fact when I debug I can see that a lot of the PDFFileSignature properties have a null reference exception. I have attached the document I’ve been using for this test (dsigned.pdf).Aspose.Pdf.Document pdffDocument = new Aspose.Pdf.Document(inputFileName);Aspose.Pdf.Facades.PdfFileSignature fileSignature = new Aspose.Pdf.Facades.PdfFileSignature();bool isSigned = false;fileSignature.BindPdf(pdffDocument);if (fileSignature.ContainsSignature()){isSigned = true;}fileSignature.Close();Hi Nathan,Thanks for contacting support.I have tested the scenario and have managed to reproduce the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-40313 in our issue tracking system.Nathan.Ramirez:2.) The documents I’ve been testing with all fail the validation functions that Aspose uses; Pdf.Document.IsPdfaCompliant and Pdf.Document.Validate. Does Aspose convert not address these compliance issues. How can I look to correct them. I’ve attached document I’ve been using for this issue (Standard.pdf).The resource PDF file is not PDF/A compliant. However I have tested the scenario of PDF to PDF/A_1b conversion and as per my observations, the resultant file is not PDF/A_1b compliant. For the sake of correction, I have separately logged this problem
as PDFNEWNET-40314 in our issue tracking system.Nathan.Ramirez:4.) When trying to optimize and save the attached document (multipart.pdf) I’m getting a “Object reference not set to an instance of an object.” error during the Pdf.Document.Save(). Code snippet below.Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inputFileName);pdfDocument.Convert(“log.xml”, format, ConvertErrorAction.Delete);pdfDocument.OptimizeResources(new Aspose.Pdf.Document.OptimizationOptions(){LinkDuplcateStreams = true,RemoveUnusedObjects = true,RemoveUnusedStreams = true,CompressImages = true});pdfDocument.Save(outputFileName);I’m using Aspose.Pdf v11.0Thank you in advance for any help you can provide.
Hi Nathan,Nathan.Ramirez:4.) When trying to optimize and save the attached document (multipart.pdf) I'm getting a "Object reference not set to an instance of an object." error during the Pdf.Document.Save(). Code snippet below.Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inputFileName);pdfDocument.Convert("log.xml", format, ConvertErrorAction.Delete);pdfDocument.OptimizeResources(new Aspose.Pdf.Document.OptimizationOptions(){LinkDuplcateStreams = true,RemoveUnusedObjects = true,RemoveUnusedStreams = true,CompressImages = true});pdfDocument.Save(outputFileName);
Hi Nayyer,
Thanks for all the help so far. Can you take a look at the Double.pdf issue again. I downloaded and tested using the Aspose.Pdf 11.3 and am still getting a null reference error. I’ve attached the code and stack trace for this.
It also may be of note that this neither passes compliance validation nor does it present itself as Pdf-a when opened.
Thank you so much.
Hi Nathan,
Hello,
I was wondering if any corrections have been made in response to the issues in this thread?
PDFNEWNET-40313
PDFNEWNET-40314
PDFNEWNET-40338
Thank you
Hi Nathan,
Hello, and thank you for your time.
This is in reference to PDFNEWNET-40338. I’m wondering if there’s anything I can do to the document on my side to help resolve the issue?
Hi Nathan,
The issues you have found earlier (filed as PDFNET-40313) have been fixed in Aspose.PDF for .NET 19.4.