We encountered a problem while adding an HtmlFragment in the header of each page of a PDF document obtained by converting a PPT to PDF (see the attached blank.pptx).
Here are the details: 1. We are using Aspose.Slides version 16.3.0.0 and Aspose.Pdf version 11.4.0.0 2. Here is the code:
//input contains the power point file data var presentation = new Presentation(input); presentation.Save(output, SaveFormat.Pdf);
…
var pdfDocument = new PdfDocument(output); for (int i = 1; i <= pdfDocument.Pages.Count; i++) { var hf = new AsposePdf.HeaderFooter { Margin = new MarginInfo(40, 0, 40, 0) }; var html = new HtmlFragment("") { Margin = new MarginInfo(0, 0, 0, 40) }; headerData.CurrentPage++; hf.Paragraphs.Add(html); pdfDocument.Pages[i].Header = hf; } pdfDocument.Save(stream);
3. Here is the stack trace:
at . . ( iFont, & pdfFont, String& fontResKey) at . . ( iFont, Boolean isEmbedded, Boolean isSubset, String writtenText, noCharacterAction, & encodedString) at . . ( , Boolean , Boolean , String , ) at Aspose.Pdf.Text.TextState.set_Font(Font value) at Aspose.Pdf.Text.TextState. (TextState , ) at Aspose.Pdf.Text.TextSegment. ( ) at Aspose.Pdf.Text.TextBuilder.AppendText(TextFragment , Int32 , Boolean ) at . . (Aspose.Foundation5550483.ApsGlyphs ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCompositeNode.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCanvas.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCompositeNode.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCanvas.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCompositeNode.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsPage.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCompositeNode.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCanvas.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsCompositeNode.Accept( ) at Aspose.Rendering.Aspose.Foundation5550483.ApsPage.Accept( ) at . .Convert(Aspose.Foundation5550483.ApsNode , RectangleF ) at Aspose.Pdf.Page.Accept(Aspose.Foundation5550483.ApsNode , RectangleF , Boolean , Boolean , Boolean ) at Aspose.Pdf.HtmlFragment. (RectangleF , Aspose.Foundation5550483.ApsPage , Page , RectangleF ) at Aspose.Pdf.HtmlFragment.Process(Double& , Double& , Boolean , Double , Double , List`1 , Page , MarginInfo , Table ) at . .Process() at Aspose.Pdf.Page. () at Aspose.Pdf.Document.ProcessParagraphs() at Aspose.Pdf.Document.Save(Stream output)
Thanks for your inquiry. I am afraid it seems your source PPTX file is corrupt as it shows 0 KB file size. We will appreciate it if you please resend it, so we will look into it and will guide you accordingly.
Thanks for sharing the source file again. I have
tested your scenario with shared document using Aspose.Pdf for .NET 11.6.0 and noticed ArgumentNullException. For further investigation, I have logged
an issue in our issue tracking system asPDFNEWNET-40832and also linked your request to it. We
will keep you updated via this thread regarding the issue status.
As we recently have noticed earlier reported issue, so its pending for review and is not yet resolved. However the product team will surely consider investigating/fixing it as per development schedule and as soon as we have some definite updates regarding its resolution, we will let you know. Please be patient and spare us little time. We are sorry for this delay and inconvenience.
I am afraid the earlier reported issue is still pending for review as the team has been busy fixing other previously reported issues. However, I have shared your concerns with product team and as soon as we have some definite updates regarding its resolution, we will let you know.
We are really sorry for this delay and inconvenience.
Thanks for your patience. I have checked the status of the logged issue and I am sorry that it is not resolved yet. The product team has been busy in fixing other high priority issues in the queue. However I have recorded your concerns and raised your issue to next level. I am sure that relevant team will look into this as soon as possible and start initial investigation for the issue as per their development plan. Please be patient and spare us a little time. We will definitely let you know once we have some updates in this regard.
gwert:
Can we at least get help and find a workaround for this issue?
At my end I will try to test the scenario again with latest releases of the API’s and will update you shortly.
I have tested the scenario with latest versions of the APIs (i.e Aspose.Pdf for .NET 17.6, Aspose.Slides for .NET 17.5) and observed that the issue has not been resolved yet. Though we have escalated the priority level of the issue and intimated the development team about your concerns. As soon as we have some significant updates in this regard, we will let you know. We greatly appreciate your patience and comprehension in this regard. Please spare us little time.