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 > General Discussion
  New Posts New Posts RSS Feed - Multiple PDF pages from long Unicode String
  FAQ FAQ  Forum Search   Register Register  Login Login

Multiple PDF pages from long Unicode String

 Post Reply Post Reply
Author
Message
DevTech View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Sep 19
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote DevTech Quote  Post ReplyReply Direct Link To This Post Topic: Multiple PDF pages from long Unicode String
    Posted: 17 Sep 19 at 10:28PM
I'd like to feed a long (multiple pages worth) string into 

qp->DrawTextBox(30,30,600,700, sLongString.w_str(), 1);

and have it create as many PDF pages as needed. But it only adds text to one page. Even if i use something like

qp->NewPages(5); 

Is this possible?

PS. Ive tried this too

qp->DrawText(30,300, sLongString.w_str());

Thanks!


Edited by DevTech - 17 Sep 19 at 10:28PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3029
Post Options Post Options   Thanks (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 Sep 19 at 9:20PM
Hi Dev,

the library (and i think all the competitors as well) and the filetype pdf is page based.
What you can do is separate the long text into parts with your own algorithm and then try it again but "page by page".

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 255
Post Options Post Options   Thanks (1) Thanks(1)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 19 Sep 19 at 12:23PM
Since I see you are not using wrapping, DrawTextBox (with option 1) returns the number of lines actually inserted in the box, so you should be able to strip these off your string and put the remainder on a new page, until you are done. There are functions to determine the extent which would be inserted on wrapped and HTML text, but it's then a little harder to work out where to break your text in this case.
Back to Top
DevTech View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Sep 19
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote DevTech Quote  Post ReplyReply Direct Link To This Post Posted: 19 Sep 19 at 8:13PM
That's a great idea tfost. Thank you!
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