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 - Form field and greek fonts issue
  FAQ FAQ  Forum Search   Register Register  Login Login

Form field and greek fonts issue

 Post Reply Post Reply
Author
Message
stakon View Drop Down
Team Player
Team Player


Joined: 09 Oct 09
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote stakon Quote  Post ReplyReply Direct Link To This Post Topic: Form field and greek fonts issue
    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.
Back to Top
stakon View Drop Down
Team Player
Team Player


Joined: 09 Oct 09
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote stakon Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 10 at 8:42AM
-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.



Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 10 at 8:10PM
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
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