Hello aspose support,
i`ve a problem converting a aspose document to ZugFerd format.
Aspose.PDF for .Net
Version 25.4.0
This line throws the folling exception:
pdf_file1.Convert(new MemoryStream(), PdfFormat.ZUGFeRD, ConvertErrorAction.Delete);
Exeption:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Aspose.Pdf.Forms.SignatureField.#=zXZEzrYTz7fsb(String #=zxwkCiQ_kP98x, #=zUwv3bMxuM8Cq_GwXTl_WSKOxJj7L$lQNgA== #=zwBl9M1M_Q$Ah)
bei Aspose.Pdf.Forms.SignatureField.#=zbzMfhq5JJr56()
bei Aspose.Pdf.Facades.PdfFileSignature.GetSignatureNames(Boolean onlyActive)
bei Aspose.Pdf.Facades.PdfFileSignature.GetSignNames(Boolean onlyActive)
bei Aspose.Pdf.Facades.PdfFileSignature.ContainsSignature()
bei #=zzFblxOlNtqCiJiDMEgFOvde3eggbS1ZmFNw7$F4n05CqCj7DEocGw1A=.#=zxXA2lu5uMJLM()
bei #=zzFblxOlNtqCiJiDMEgFOvde3eggbS1ZmFNw7$F4n05CqCj7DEocGw1A=.#=z4KNVXImMqmBo()
bei #=zzFblxOlNtqCiJiDMEgFOvde3eggbS1ZmFNw7$F4n05CqCj7DEocGw1A=.#=zcmQE7WQ=()
bei #=zkJrYNhVG0Lc$8YGa_5NFo0xZODxTQMrhEKG7Edjb2sjZzgR5ekAruwg=.#=zkL6WBoA=()
bei #=zzFblxOlNtqCiJiDMEgFOvde3eggbS1ZmFNw7$F4n05CqCj7DEocGw1A=.#=zb8QgZN0=(XmlTextWriter #=zCWDDP$Y=, PdfFormat #=zT4sUpgE=, Document #=zcEvbIbo=, Boolean #=zs$4QT7T9bYaD, ConvertErrorAction #=zhSB3zIY=)
bei Aspose.Pdf.Document.#=zzFxYPrY=(XmlTextWriter #=zCWDDP$Y=, PdfFormat #=zT4sUpgE=, Boolean #=zs$4QT7T9bYaD, ConvertErrorAction #=zhSB3zIY=)
bei Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
What im doing?
I have a folder full of pdfs.
The first pdf is alreday a zugferd pdf.
Now i add all the following pdfs to the first pdf like this:
pdf_file1.Pages.Add(pdf_file2.Pages);
After that i check if the first pdf is really a zugferd pdf like this:
if (pdf_file1.EmbeddedFiles.Count > 0)
if (attachment != null && attachment.Name.EndsWith(“.xml”))
{…
After that i try to convert and save the pdf.
pdf_file1.Convert(new MemoryStream(), PdfFormat.ZUGFeRD, ConvertErrorAction.Delete);
pdf_file1.Save(Path.Combine(destination, name));
But sometimes (not always) the convert crashes.
It would be great if you could help me.
Kind regards,
Oliver