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!
![]() |
Form field and greek fonts issue |
Post Reply ![]() |
Author | |
stakon ![]() Team Player ![]() Joined: 09 Oct 09 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() Posted: 17 Jun 10 at 8:00AM |
Good day!
I have some experience with the QuickPDF library from some projects in the past, but i've never needed (until now) the forms/fields functionality. So here are some problems i encountered: First of all it was a bit confusing to find which fonts are used within the forms. The forms were created with Adobe Acrobat 9 Pro Extended. In each field we set the font to Arial. By editing the form with Acrobat viewer it was possible to enter greek text. Now i try to add text with the QuickPDF in a field. My first try: simply add a string value in a field pdf_dll->SetNeedAppearances(1);//when loading the document //for the field i , I do the following: pdf_dll->UpdateAppearanceStream(i); pdf_dll->SetFormFieldValue(i,str);//i set a value in the field .... //Save document If the str value is english text everything is fine. If i try to pass greek text, nonsense is written in the field. My second try: i add and embed a new font and use it instead of the one used by the form creator. pdf_dll->SetNeedAppearances(1);//when loading the document //for the field i , I do the following: int form_font = pdf_dll->AddTrueTypeFont("Arial {1253}",1);//Add a greek arial font and embed it int res = pdf_dll->AddFormFont(form_font);//Add the font in the form. res returned is the number of fonts available in the form (also the index of this lastly-added font. pdf_dll->SetFormFieldFont(i,res ); pdf_dll->UpdateAppearanceStream(i); pdf_dll->SetFormFieldValue(i,str);//i set a value in the field .... //Save document By using this the results are weird. I can see greek text by using the QuickPDF viewing capabilities (RenderToDC) but when opening with Adobe Acrobat, the field shows nothing! Thanx in advance for any guidance upon the issue, stakon Note: I am developing in C++ the 7.18 dll version of the library. |
|
![]() |
|
stakon ![]() Team Player ![]() Joined: 09 Oct 09 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() |
-bump
It has been several months since i first posted this, so i bring it once again to your attention in case someone can provide some help. |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
Two things to try.
1. Try a later version of the library like 7.21. 2. Make sure the string you pass to the DLL which sets the value is formatted as UTF-8. Wheeley |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store