Print Page | Close Window

Multiple PDF pages from long Unicode String

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3743
Printed Date: 22 Nov 24 at 7:28PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Multiple PDF pages from long Unicode String
Posted By: DevTech
Subject: Multiple PDF pages from long Unicode String
Date 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!



Replies:
Posted By: Ingo
Date 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



Posted By: tfrost
Date 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.


Posted By: DevTech
Date Posted: 19 Sep 19 at 8:13PM
That's a great idea tfost. Thank you!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk