Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - HTML to PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

HTML to PDF

 Post Reply Post Reply
Author
Message
waynefulcher View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Jun 08
Location: United States
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote waynefulcher Quote  Post ReplyReply Direct Link To This Post Topic: HTML to PDF
    Posted: 09 Aug 12 at 11:01PM
Can anyone tell me if I have a program that reads the text from an HTML file, If there is any way at all to use QuickPDF (I am on 8.16) to convert the HTML to a PDF... heres the catch. I want to specify a "pagesize" like "letter" then I want the function to automatically create enough pages in the PDF to render all of the HTML in porportion. I see the DrawHTML() method but if the rendered HTML is so long it takes 10 pages to draw it all then how do I handle that?
 
If there is no simple one call method to do this is there some work-a-round?
 
Thanks Wayne
 
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 20 Aug 12 at 12:44PM
Wayne,

This code might be useful

            QP.NewDocument();
            QP.SetOrigin(1);

            string s = File.ReadAllText("input.html");

            QP.DrawBox(10, 10, 300, 500, 0);
            string overflow = QP.DrawHTMLTextBox(10, 10, 300, 500, s);

            while (overflow != "")
            {
                QP.NewPage();
                QP.DrawBox(10, 10, 300, 500, 0);
                overflow = QP.DrawHTMLTextBox(10, 10, 300, 500, overflow);
            }

            QP.SaveToFile("out.pdf");

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store