Print Page | Close Window

change FormField 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=3090
Printed Date: 27 Sep 24 at 3:03PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: change FormField font
Posted By: redak105
Subject: change FormField font
Date Posted: 18 Mar 15 at 2:46PM
Hello,
I am filling forms in pdf. I want use my own font as substitution for formfield form. I am loadingthis font with AddOpenTypeFontFromFile and calling SetFormFieldFont and SetFormFieldStandardFont with this font ref. This function return value 0, which is not set.
When I cal name of GetFormFieldFontName font is still old one and fields are empty after FlattenFormField.

Can you help me? I am using Debenu Quick PDF on Mac and Xcode.



Replies:
Posted By: AndyD
Date Posted: 19 Mar 15 at 8:48AM
Good morning, I am not sure if this relates to the problem I had, but I was working on a project to fill form fields with rich text so I could use my own fonts, bold, italic etc. I found that when I used FlattenFormField it was also emptying the contents. Instead I used SetFormFieldReadOnly so that the contents remained.


Posted By: redak105
Date Posted: 19 Mar 15 at 9:04AM
I find recently, that I think font is loaded, but it cant set to formfields. Because setters returns me always value 0.


Posted By: redak105
Date Posted: 19 Mar 15 at 9:20AM
I have primary problem with Czech characters, which I need to fill.


Posted By: AndyD
Date Posted: 19 Mar 15 at 11:40AM
Is the text you are adding to the form field being done programatically rather than direct in the pdf?
If so, is it plain text or rich text?


Posted By: redak105
Date Posted: 19 Mar 15 at 11:42AM
plain text


Posted By: AndyD
Date Posted: 19 Mar 15 at 11:51AM
Ok thank you, that rules out one problem I was having, I was using truetypefont not opentype font.
 But looking at the requirements for AddOpenTypeFontFromFile it says to use http://www.debenu.com/docs/pdf_library_reference/SelectFont.php" rel="nofollow -


Posted By: redak105
Date Posted: 19 Mar 15 at 11:56AM
I can open it and select it. Select return 1. But problem is set to form field which return me 0.
I don't know of any other possibility ho to change font in form field.


Posted By: AndyD
Date Posted: 19 Mar 15 at 12:12PM
From what I can see, SetFormFieldStandardFont just uses a choice of 14 standard system fonts, whereas SetFormFieldFont will just use an index number. Have you tried running http://www.debenu.com/docs/pdf_library_reference/GetFormFontCount.php" rel="nofollow -


Posted By: redak105
Date Posted: 19 Mar 15 at 1:32PM
I seen part of error between comments I have uncommented SetFormFieldStandardFont.
Now it is setting font. I need only find right settings.


Posted By: AndyD
Date Posted: 19 Mar 15 at 2:53PM
Ok good luck.


Posted By: mLipok
Date Posted: 20 Mar 15 at 6:45PM
try here

http://www.quickpdf.org/forum/topic2923.html


-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600



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