Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Losing content when adding pages from one document to another

$
0
0
I've only just started evaluating Aspose.pdf  so might be missing something obvious.

When I add an HTML fragment in a paragraph to a document and save that document it works fine.

However, when I add the pages of that document to another document the new document is blank:

        'add HTML as per ASPOSE EXAMPLE
        Dim doc As Document = New Document()
        Dim page As Page = doc.Pages.Add()
        Dim h As HtmlFragment = New HtmlFragment("<b>TEST</i></b>")
        page.Paragraphs.Add(h)

        'this works as expected
        'doc.save("output.pdf")


        'create a new document and add the pages
        Dim pd As New Aspose.Pdf.Document()
        pd.Pages.Add(doc.Pages)

        'doesn't display HTML fragment
        pd.Save("output.pdf")



Viewing all articles
Browse latest Browse all 3131

Trending Articles