Print Page | Close Window

Form Field Font

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=3305
Printed Date: 29 Apr 24 at 12:25AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Form Field Font
Posted By: eborger
Subject: Form Field Font
Date Posted: 12 Apr 16 at 3:44PM
I am not being able to set the font of a new form field, I used :

NewFormField
SetFormFieldBounds
AddFormFont         (Arial)
SetFormFieldFont   (Arial)
SetFormFieldTextSize  (10) 

and the new field is not displaying the text properly !

any help ???



Replies:
Posted By: Ingo
Date Posted: 13 Apr 16 at 10:08PM
Hi eborger,

you should post your relevant code snippet - so the users here have a chance to point you into the right direction ;-)
We had a similar thread few days ago:
http://www.quickpdf.org/forum/setting-fontstyle-in-formfields_topic3295.html
Inside the listed guids you'll find answers.


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



Posted By: eborger
Date Posted: 26 Apr 16 at 2:24PM
I read all the examples, and did everything according to the docs, but all I get are dots inside the form field.
If I use helvetica it works, but with arial or courier it does not !!!!

the code I posted is a snippet of my code, I am using the DLL version and all works fine, except for this !


Posted By: Ingo
Date Posted: 26 Apr 16 at 5:11PM
Hi eborger,

if it's your code snippet then it's clear that Arial won't work
and if you've read already the docs then you know why ;-)
You have to add Arial physically to the library 'cause it's not inside the lib:
AddTrueTypeFontFromFile
Please keep in mind that not all fonts are working with unicode.
For Arial for example there's a special "Arial Unicode MS"...
QuickPDF uses strings as unicode...





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



Posted By: eborger
Date Posted: 26 Apr 16 at 8:31PM
I did add Arial to fonts, sorry it's not included in the code because it was done before, I use Arial for other texts also.....


Posted By: eborger
Date Posted: 26 Apr 16 at 8:32PM
I do not use unicode, my encoding is CD1252.


Posted By: eborger
Date Posted: 26 Apr 16 at 8:32PM
I mean CP1252


Posted By: eborger
Date Posted: 26 Apr 16 at 8:35PM
I can send you the PDF, you can see the Arial font in the properties.


Posted By: Ingo
Date Posted: 26 Apr 16 at 10:29PM
Hi,

it's the last time i'm answering regarding this issue...
CP1252 is single byte english encoding. Some call it ANSI.
But QuickPDF deals with unicode and not ANSI.
CP1252 is represented by a single byte for each letter - unicode is represented by two bytes.
I think there's your problem.
It depends on your programming language.
If there's no real unicode support perhaps you can convert it (this is possible in VB6 for example).
Here you can find a mapping table CP1252/unicode:
http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT
If you read in the reference about SetFormFieldValue...
http://www.debenu.com/docs/pdf_library_reference/SetFormFieldValue.php
...you see that unicode is needed.
Perhaps it's possible for you to upload the pdf anywhere and post the link here...



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




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