Hi,
Hi Ashutosh,
Thanks for contacting support.
anshushukla.shukla:
- I have 3 charts in single input HTML file(attached).
I want to convert the Html into Single PDF File but all charts in different pages.
We have logged an investigation ticket as PDFNET-42888 in our issue tracking system for the requirement. Development team will further investigate the feasibility of the feature and as soon as we have some feedback from their side, we will inform you. Please be patient and spare us little time.
anshushukla.shukla:
I’m using HtmlFragments to read multiple html input files which contains Html Charts,
I’m able to convert those files into single pdf page/file.
But is there any way i can make borders around each chart (each chart is coming through seperate html fragment) in output Pdf file??
You can add HtmlFragment inside a table cell and set cell borders, in order to get the desired results. Please check following code snippet where I have added two different HtmlFragment(s) from different files with borders, inside a PDF.
Document doc = new Document();
Page currpage = doc.Pages.Add();
HtmlFragment htmlFrag1 = new HtmlFragment(File.ReadAllText(dataDir + "input1.html"));
HtmlFragment htmlFrag2 = new HtmlFragment(File.ReadAllText(dataDir + "input2.html"));
Table table = new Table();
table.ColumnAdjustment = ColumnAdjustment.AutoFitToWindow;
table.DefaultCellBorder = new BorderInfo(BorderSide.All, 0.5f);
table.DefaultCellPadding = new MarginInfo(2, 2, 2, 2);
Row row = table.Rows.Add();
Cell cell = row.Cells.Add();
cell.Paragraphs.Add(htmlFrag1);
row = table.Rows.Add();
cell = row.Cells.Add();
cell.Paragraphs.Add(htmlFrag2);
currpage.Paragraphs.Add(table);
doc.Save(dataDir + "HtmlFragWithBorder_out.pdf");
For your reference, I have also attached an output generated by above code.
Best Regards,
Hi Asad,

Hi Ashutosh,