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!
![]() |
change FormField font |
Post Reply ![]() |
Author | |
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() 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. |
|
![]() |
|
AndyD ![]() Senior Member ![]() ![]() Joined: 30 Apr 13 Location: UK Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
I find recently, that I think font is loaded, but it cant set to formfields. Because setters returns me always value 0.
|
|
![]() |
|
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
I have primary problem with Czech characters, which I need to fill.
|
|
![]() |
|
AndyD ![]() Senior Member ![]() ![]() Joined: 30 Apr 13 Location: UK Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
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?
|
|
![]() |
|
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
plain text
|
|
![]() |
|
AndyD ![]() Senior Member ![]() ![]() Joined: 30 Apr 13 Location: UK Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
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 SelectFont with the return value of AddOpenTypeFontFromFile to call it. So is AddOpenTypeFontFromFile giving a return value of 0 or SetFormFieldFont?
|
|
![]() |
|
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
AndyD ![]() Senior Member ![]() ![]() Joined: 30 Apr 13 Location: UK Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
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 GetFormFontCount before and after AddOpenTypeFontFromFile to see if the available index count increases?
|
|
![]() |
|
redak105 ![]() Beginner ![]() Joined: 18 Mar 15 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
I seen part of error between comments I have uncommented SetFormFieldStandardFont.
Now it is setting font. I need only find right settings. |
|
![]() |
|
AndyD ![]() Senior Member ![]() ![]() Joined: 30 Apr 13 Location: UK Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
Ok good luck.
|
|
![]() |
|
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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