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 - Issues with text length on DrawText Function
  FAQ FAQ  Forum Search   Register Register  Login Login

Issues with text length on DrawText Function

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


Joined: 04 Dec 18
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote LaGatorVII Quote  Post ReplyReply Direct Link To This Post Topic: Issues with text length on DrawText Function
    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. 


Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
LaGatorVII View Drop Down
Beginner
Beginner


Joined: 04 Dec 18
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote LaGatorVII Quote  Post ReplyReply Direct Link To This Post 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

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