Hi,
As bookmarks in conversion from html to pdf is not working properly, I'm trying to use another approach using sections and Aspose.Pdf.Generator.ListType.TableOfContents to generate a pdf document within it's Table of contents.
The problem I have now is related to Sections in the pdf document, I need to add the content of an html file inside the section of the pdf document, looking into the documentation I found this approach:
Aspose.Pdf.Generator.Section sec1 = pdf.Sections.Add();
FileStream fstream;
fstream = new FileStream("D:/ArchivosEjemplo/Resultados/Doc/Example.html", FileMode.Open);
Aspose.Pdf.Generator.DocumentAttachment DocStreamAttachment = new Aspose.Pdf.Generator.DocumentAttachment();
pdf.DocumentAttachments.Add(DocStreamAttachment);
DocStreamAttachment.DocumentAttachmentStream = fstream;
DocStreamAttachment.DocumentAttachmentContentType = "html";
sec1.Paragraphs.Add(DocStreamAttachment);
pdf.Save("d:/Multiple_TOC.pdf");
But the content of the .html file is not loaded into the pdf file generated.
Could you please help me with this approach? Thanks in advance, best regards
Maria