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 - change FormField font
  FAQ FAQ  Forum Search   Register Register  Login Login

change FormField font

 Post Reply Post Reply
Author
Message
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post Topic: change FormField font
    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.
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 15 at 9:20AM
I have primary problem with Czech characters, which I need to fill.
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 15 at 11:42AM
plain text
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post 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 SelectFont with the return value of AddOpenTypeFontFromFile to call it. So is AddOpenTypeFontFromFile  giving a return value of 0 or SetFormFieldFont?
Back to Top
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post 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 GetFormFontCount before and after AddOpenTypeFontFromFile to see if the available index count increases?
Back to Top
redak105 View Drop Down
Beginner
Beginner


Joined: 18 Mar 15
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote redak105 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 15 at 2:53PM
Ok good luck.
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post 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
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