Hi,
with this c# code
private static void PDF()
{
string fn = “d:\test.pdf”;
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document();
{
Page page = pdfDocument.Pages.Add();
HtmlFragment htmlFragment = new HtmlFragment(getHTML());
page.Paragraphs.Add(htmlFragment);
pdfDocument.ProcessParagraphs();
}
pdfDocument.Save(fn);
pdfDocument = null; //force to reopen the pdf
if (pdfDocument == null)
pdfDocument = File.Exists(fn) ? new Aspose.Pdf.Document(fn) : new Aspose.Pdf.Document();
{
Page page = pdfDocument.Pages[pdfDocument.Pages.Count];
HtmlFragment htmlFragment = new HtmlFragment(getHTML());
//if the pdfDocument is reopen this Paragraph is over the first ;
//if we use the same pdfDocument this Paragraph is after the first
page.Paragraphs.Add(htmlFragment);
pdfDocument.ProcessParagraphs();
}
pdfDocument.Save(fn);
}
I try to add a HTML paragraph after others HTML paragraphs in a reopen pdf document
and the text is put on top of page not after last paragraph of page and the text overlaying other texts
What can I do to add the HtmlFragment after last text of page in case the PDF is reopen.
thank you
Ciprian