Convert html/text/xml files to PDF using Aspose.PDF for .NET in C#

hi. do you have a api that will allow me to create new PDF, add some existing files to it (html, pdf, txt, xml, …) and save it all together as one PDF file.



thank you

Hi Nermin,

Thanks for contacting support.

In order to accomplish your requirement of generating concatenated PDF file, you need to first convert TXT, XML, HTML etc files to PDF format and then concatenate them using Aspose.Pdf for .NET.

For more information, please visit

hi,



I converted HTML file to PDF. attached is original html and generated PDF files. my code looks like:

var htmloptions = new HtmlLoadOptions(folderPath);

var doc = new DocumentPDF(htmlFileName, htmloptions); // Load HTML file

doc.Save(pdfFileName); // Save HTML file





the problem is with TOC. pdf tried to generate toc based on html file, but it does not work. when I click on link it prompts me to allow navigation, which I do … but it does not work.



my next question is how do I disable this TOC funcionality so internal hyperlinks wonlt be set?



can you also take a look at pages 5 and 6 in PDF generated. it does not look ok.



thank you

hepek:
hi,

I converted HTML file to PDF. attached is original html and generated PDF files. my code looks like:
var htmloptions = new HtmlLoadOptions(folderPath);
var doc = new DocumentPDF(htmlFileName, htmloptions); // Load HTML file
doc.Save(pdfFileName); // Save HTML file

the problem is with TOC. pdf tried to generate toc based on html file, but it does not work. when I click on link it prompts me to allow navigation, which I do … but it does not work.

Hi Nermin,

Thanks for sharing the resource file.


I have tested the scenario and have managed to reproduce the same problem. For the sake of correction, I have logged it as PDFNEWNET-40406 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

hepek:
my next question is how do I disable this TOC funcionality so internal hyperlinks wonlt be set?

can you also take a look at pages 5 and 6 in PDF generated. it does not look ok.

thank you

I am afraid the feature to remove/disable hyperlinks inside PDF file is currently not supported. However we already have logged this requirement as PDFNEWNET-36764 in our issue tracking system. We will further look into the details of this requirement and as soon as we have some further updates, we will let you know. We are sorry for this inconvenience.