Print Page | Close Window

Issues with text length on DrawText Function

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3793
Printed Date: 26 Apr 24 at 3:00PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Issues with text length on DrawText Function
Posted By: LaGatorVII
Subject: Issues with text length on DrawText Function
Date Posted: 08 Mar 20 at 10:57PM
I am having issues where the library seems to silently crash when the text I am sending reaches a certain length. I am declaring the library, opening an existing .pdf and adding text. Code is C++.

This code works fine: 
String s_string = "1234 1234 1234 1234 1234 1234";
BSTR bstr_string = WideString(s_string);
DPL.DrawText(254, 242, bstr_string);
DPL.SaveToFile(file);

This code gives no error but the file is never saved:
String s_string = "1234 1234 1234 1234 1234 1234 1234";
BSTR bstr_string = WideString(s_string);
DPL.DrawText(254, 242, bstr_string);
DPL.SaveToFile(file);

Any help appreciated. This just doesn't make any sense to me. 





Replies:
Posted By: Ingo
Date Posted: 09 Mar 20 at 11:03AM
Hi LaGatorVII,

the reason for your issue shouldn't have to do with the additional "1234" ;-)
Perhaps you can post the complete relevant code and var-definitions starting from try/load up to save/free?
Do you draw to the same file or are there different files... some with write protection and some without...?

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: LaGatorVII
Date Posted: 09 Mar 20 at 11:44AM
Ingo, 

Thank you for your reply. The bottom line is that the extra 1234 is the issue. The code is exactly the same but for that difference. 

I was able use this same code perfectly fine with a newer version of the C++ compiler. So my problem is solved by the brute force of splitting the program into a data app and a pdf builder app that uses the new compiler. 

Thanks, 

LaGatorVII




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