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

im getting an error when saving to this pdf

$
0
0
Im getting an error when writing to the pdf on this code.
On the attached files.
Using version 7 of aspose.pdf , it is hanging on the  pdf.Save(ms);


            var pdf = new Pdf();
            var section = pdf.Sections.Add();

            using (StreamReader r = File.OpenText(fileToCombine))
            {
                var htmlText = replaceUnsupportedFontsInHTMLText(r.ReadToEnd());
                var text2 = new Text(section, htmlText);
                text2.IsHtmlTagSupported = true;
                section.Paragraphs.Add(text2);
            }
          
                var ms = new MemoryStream();
                pdf.Save(ms);
                var pdfDocument = new Document(ms);
                foreach (Page page in pdfDocument.Pages)
                {
                    document.Pages.Add(page);
                }

When i download version 9
it is not hanging but it breaking on    document.Pages.Add(page);
saying:
{"At most 4 elements (for any collection) can be viewed in evaluation mode."}


Viewing all articles
Browse latest Browse all 3131

Trending Articles