Welcome Guest Search | Active Topics | Sign In | Register

Bullet display error Options
Brian
Posted: Monday, October 10, 2011 7:09:06 PM
Rank: Member
Groups: Member

Joined: 10/10/2011
Posts: 13
I am converting a webpage URL to a PDF and after the first page, the bullets stop displaying. They display on the webpage but not the PDF. What could be causing this?

Here's the code I'm using:

Code: C#
string url = "http://corememberguide.hostplus.staging.clickdm.com.au/pdf/pdf-fees-and-costs";
            var doc = new PdfDocument();

            HtmlToPdf.Options.AutoFitX = HtmlToPdfAutoFitMode.None;
            //HtmlToPdf.Options.ZoomLevel = .8f;

            // Setting header and footer format
            //HtmlToPdf.Options.HeaderHtmlFormat = "";
            HtmlToPdf.Options.FooterHtmlFormat = "We're here to help - call 1300 HOST<strong>PLUS</strong> (1300 467 875), 8am - 8pm, Monday to Friday or visit hostplus.com.au";

            SizeF pageSize = PdfPageSizes.A4;
            float marginLeft = 2;
            float marginTop = 1;
            float marginRight = 2;
            float marginBottom = 1;

            HtmlToPdf.Options.PageSize = pageSize;
            HtmlToPdf.Options.OutputArea = new RectangleF(
                marginLeft,
                marginTop,
                pageSize.Width - marginLeft - marginRight,
                pageSize.Height - marginTop - marginBottom);



            HtmlToPdfResult result = HtmlToPdf.ConvertUrl(url, doc);

            // Now search for all elements with class name set to "sflistTitle"
            HtmlElement[] elements = result.HtmlDocument.GetElementsByClassName("sflistTitle");

            // Create a bookmark for each of these elements
            foreach (HtmlElement element in elements)
            {
                // Skip invisible elements
                if (!element.IsVisible)
                {
                    continue;
                }

                // Create the bookmark
                PdfBookmark bookmark = element.CreateBookmark();
                doc.Bookmarks.Add(bookmark);

                //To create child bookmarks, create a new 
                //PdfBookmark object and then add it to the
                //parent bookmark's ChildNodes collection
            }


            doc.Save(@"c:\temp\EssentialObjectsUrl.pdf");
eo_support
Posted: Monday, October 10, 2011 7:19:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This appears to be a bug. We are looking into it and will get back to you as soon as we find anything.

Thanks!
eo_support
Posted: Thursday, October 13, 2011 5:07:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have posted a new build that should fix this problem. Please see your private message for the download location.

Thanks!
Brian
Posted: Thursday, October 13, 2011 8:00:54 PM
Rank: Member
Groups: Member

Joined: 10/10/2011
Posts: 13
It looks like that build fixed the problem. Thanks!
eo_support
Posted: Thursday, October 13, 2011 8:06:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You are very welcome. Please feel free to let us know if you see any other issues.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.