Hello,
When trying to convert a PDF to a new format with the following C# line:
Document doc = new Document(fullFilePath); bool success = doc.Convert(new MemoryStream(), PdfFormat.PDF_A_1A, ConvertErrorAction.Delete);
I got the following error:
ERROR 2020-01-28 11:11:49,821 135413ms LogHelper LogException - Unexpected exception while process eleve with NBDS ID = 02304065 : Object reference not set to an instance of an object.
Stack trace : at #=zQJkE9Lf6vNZzWxdK0PxKoNHBTW$xjlgi69b6AiT71lv4ok8y6g==.#=zxB$rhOgXDAU9(#=zRMjdLi$0x6oAw08qE5aSmPxnXRDPx5AoGtcGwE31DZU5 #=z14jXrl8=, #=zHLWW2byG7BaesBhZQERbj6lipKwL5vNaqDL4v8lzQpmT #=zZVVNJMAUIaV0yF0uWA==, Resources #=zLBqwSTs=)
at #=zQJkE9Lf6vNZzWxdK0PxKoNHBTW$xjlgi69b6AiT71lv4ok8y6g==.#=zxB$rhOgXDAU9(#=zRMjdLi$0x6oAw08qE5aSmPxnXRDPx5AoGtcGwE31DZU5 #=z14jXrl8=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zsXhYfl4=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zsXhYfl4=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zkNlYWlM=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.Visit(Page page)
at #=zToxjQLUXKtzCGBHprUvZHcOAXXCAJ6ED4rtgmEwdSVdJlxILOy0YMPM=.#=zsXp2gpI2dDv1(String #=zoyszHzXrc4th, String #=zWjO1lFYFIC1A)
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zvlwfVNH2wHUQ()
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zSe$wFGbpKcRl()
at #=zToxjQLUXKtzCGBHprUvZHcOAXXCAJ6ED4rtgmEwdSVdJlxILOy0YMPM=.#=zFBEhJcE=()
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zkNlYWlM=(XmlTextWriter #=z3436xhQ=, PdfFormat #=zZTydn1M=, Document #=z_R$Qewk=, Boolean #=zXwi2sefbEagR, ConvertErrorAction #=zMpL7e7A=)
at Aspose.Pdf.Document.#=zkwsBd5Q=(XmlTextWriter #=z3436xhQ=, PdfFormat #=zZTydn1M=, Boolean #=zXwi2sefbEagR, ConvertErrorAction #=zMpL7e7A=)
at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
at ELCA.CRM.SISE.Common.PdfHelper.ConvertToPdfA(String fullFilePath, String fullTargetFilePath) in C:\Users\drs\PdfHelper.cs:line 62
at ELCA.CRM.SISE.ArchiveEleve.Program.ProcessEleves(List`1 eleves) in C:\Users\drs\Program.cs:line 177System.NullReferenceException: Object reference not set to an instance of an object.
at #=zQJkE9Lf6vNZzWxdK0PxKoNHBTW$xjlgi69b6AiT71lv4ok8y6g==.#=zxB$rhOgXDAU9(#=zRMjdLi$0x6oAw08qE5aSmPxnXRDPx5AoGtcGwE31DZU5 #=z14jXrl8=, #=zHLWW2byG7BaesBhZQERbj6lipKwL5vNaqDL4v8lzQpmT #=zZVVNJMAUIaV0yF0uWA==, Resources #=zLBqwSTs=)
at #=zQJkE9Lf6vNZzWxdK0PxKoNHBTW$xjlgi69b6AiT71lv4ok8y6g==.#=zxB$rhOgXDAU9(#=zRMjdLi$0x6oAw08qE5aSmPxnXRDPx5AoGtcGwE31DZU5 #=z14jXrl8=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zsXhYfl4=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zsXhYfl4=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.#=zkNlYWlM=(Page #=zlkdvl1c=, OperatorCollection #=zvY61pUg=, Resources #=zLBqwSTs=)
at Aspose.Pdf.ImagePlacementAbsorber.Visit(Page page)
at #=zToxjQLUXKtzCGBHprUvZHcOAXXCAJ6ED4rtgmEwdSVdJlxILOy0YMPM=.#=zsXp2gpI2dDv1(String #=zoyszHzXrc4th, String #=zWjO1lFYFIC1A)
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zvlwfVNH2wHUQ()
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zSe$wFGbpKcRl()
at #=zToxjQLUXKtzCGBHprUvZHcOAXXCAJ6ED4rtgmEwdSVdJlxILOy0YMPM=.#=zFBEhJcE=()
at #=zOru0ILM6VHVpDB_3zRdS2E5c9KmM9I0ja9afLjXR0Oq6MetpC6B9M3U=.#=zkNlYWlM=(XmlTextWriter #=z3436xhQ=, PdfFormat #=zZTydn1M=, Document #=z_R$Qewk=, Boolean #=zXwi2sefbEagR, ConvertErrorAction #=zMpL7e7A=)
at Aspose.Pdf.Document.#=zkwsBd5Q=(XmlTextWriter #=z3436xhQ=, PdfFormat #=zZTydn1M=, Boolean #=zXwi2sefbEagR, ConvertErrorAction #=zMpL7e7A=)
at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
at ELCA.CRM.SISE.Common.PdfHelper.ConvertToPdfA(String fullFilePath, String fullTargetFilePath) in C:\Users\drs\PdfHelper.cs:line 62
at ELCA.CRM.SISE.ArchiveEleve.Program.ProcessEleves(List`1 eleves) in C:\Users\drs\Program.cs:line 177
Any ideas? I’m working on making the PDF available for everyone - it contains private information.
But if in the meantime someone has already experienced similar issue, thanks in advance.
Best regards,
Danny Rodrigues