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 - DrawHTMLTextBox not rendering ol/ul/li
  FAQ FAQ  Forum Search   Register Register  Login Login

DrawHTMLTextBox not rendering ol/ul/li

 Post Reply Post Reply
Author
Message
equick View Drop Down
Beginner
Beginner


Joined: 18 Aug 13
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote equick Quote  Post ReplyReply Direct Link To This Post Topic: DrawHTMLTextBox not rendering ol/ul/li
    Posted: 18 Aug 13 at 3:53AM
ol/ul/li code are not rendering with DrawHTMLTextBox. The other supported HTML tags (e.g., b, i, em, sup, sub, etc) in Appendix A are working. Here's the snippet of code that I'm trying to work with:
With objPDF
strHTML = "<ul><li>item 1</li><li>item 2</li><li>item 3</li></ul>"
Call .SetTextAlign(intAlignment)
Call .SetHTMLNormalFont("Default", intFont)
Call .SetHTMLBoldFont("Default", intFontBold)
Call .SetHTMLItalicFont("Default", intFontItalic)
Call .DrawHTMLTextBox(intX, intY, intWidth, intHeight, strHTML)
End With
Am I missing something? Any help would be appreciated. Thank you in advance!


Edited by equick - 18 Aug 13 at 3:53AM
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 (1) Thanks(1)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 19 Aug 13 at 1:15AM
equick,

The following code is working correctly for me in QPL 8.16, 9.12 and 9.15.

        QP.SetOrigin(1);   // Added

        string strHTML = "<ul><li>item 1</li><li>item 2</li><li>item 3</li></ul>";
        QP.SetTextAlign(0);
QP.SetHTMLNormalFont("Default", 4);
        QP.SetHTMLBoldFont("Default", 5);
QP.SetHTMLItalicFont("Default", 6);
QP.SetHTMLBoldItalicFont("Default", 7);
        QP.DrawHTMLTextBox(20, 20, 200, 200, strHTML);

        QP.SaveToFile("out.pdf");

Andrew.

Back to Top
equick View Drop Down
Beginner
Beginner


Joined: 18 Aug 13
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote equick Quote  Post ReplyReply Direct Link To This Post Posted: 19 Aug 13 at 4:17AM
Thank you for the response Andrew. Is there a known old bug for the <ol> or the <ul> tags? Could the bug be specific to VBScript ASP? I tried using your code but the <ol> and <ul> tags still do not render properly. It looks like the <li> tags are rendering but I don't get the numbers or bullet points for <ol> and <ul>, respectively. I'm using QPL 5.11. I currently can't upgrade as I'm managing an existing system.

Sample output (notice the lack of numbers for <ol> or bullet points for <ul>):
Item 1
Item 2
Item 3
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 (1) Thanks(1)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 19 Aug 13 at 5:21AM

equick,

QPL 5.11 is very, very old and way before my time.  I suspect there could have been bugs in that part of the library as there have been a few changes in QPL 7 and 8 in the HTML functions.

The library has evolved a lot over the last few years and it would be too difficult to track down a bug that is this old.

Andrew.
Back to Top
equick View Drop Down
Beginner
Beginner


Joined: 18 Aug 13
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote equick Quote  Post ReplyReply Direct Link To This Post Posted: 19 Aug 13 at 5:24AM
OK, but you don't see anything majorly wrong with how I'm doing this right? Is there an alternate way of rendering the HTML that I might be overlooking, which may render the <ol> and <ul> properly? If I'm not using it wrong, then I'll agree with you and assume it is because we are running a very old version of the QPL.
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 (1) Thanks(1)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 20 Aug 13 at 7:32AM
equick,

I don't think there would be any other way to achieve this.  The code is as simple as it gets and the QPL HTML parser is pretty basic so it is unlikely there would be any type of workaround.  QPL 5.11 was back in the early days of Quick PDF library development.

Andrew.
Back to Top
equick View Drop Down
Beginner
Beginner


Joined: 18 Aug 13
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote equick Quote  Post ReplyReply Direct Link To This Post Posted: 20 Aug 13 at 3:26PM
OK, thank you for your help Andrew.
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