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!
Exporting FormField Fonts |
Post Reply |
Author | |
connerdk
Beginner Joined: 07 Nov 14 Location: Denmark Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 07 Nov 14 at 10:52AM |
Hi, i am using Debenu QuickPDF Library v9.16, but have testet this with v11.12 and i still have same issue.
I have a PDF with text form fields and needs to fill text with string for a certain codepage e.g. codepage 1250 and insert letter Ł. I finally got it to render correct, but when saving it to a file all standard ascii letters are shown as dots when opened in adobe reader and only the speciel letters like Ł can be read. If i use GetInstalledFontsByCodePage function and just render with the first suggested font it actually works, but it is "arabic typesettings" font which is not very readable, when trying to use another more common font like "Helvetica" or "Arial" it does not work. Also if i omit SetFormFieldFont and only use SetFormFieldStandardFont(4) // Helvetica on the form field, then it seems to write the file correct but then i can not display the speciel letters when rendering in QuickPDF.
Best regards Rune |
|
connerdk
Beginner Joined: 07 Nov 14 Location: Denmark Status: Offline Points: 6 |
Post Options
Thanks(0)
|
FQPDF.AddTrueTypeFont('Garbage-string' ,1);
returns non-zero value even though i dont have a font called 'Garbage-string' |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Conner,
First off I would suggest not using CodePages but instead set all strings as Unicode encoding. Existing fonts in a PDF file may often only contain a subset of the characters of that font. re : SetFormFieldStandardFont(4) This is a built in PDF font that that is supported by default by all PDF renderers / viewers. Unfortunately there are only 229 or so charaters in this font so most Unicode characters are not included in the font. re : Arabic - We have very limited support for Arabic in the current versions of Debenu Quick PDF Library. re : FQPDF.AddTrueTypeFont('Garbage-string' ,1); A PDF library always needs to return the closest matching font to the font requested so that at least some characters are drawn. In Debenu Quick PDF library 11.12 can you try using something like the following // Arial Unicode MS contains most characters // Create a dynamically subsetted font with Option 4. int fid1 = QP.AddTrueTypeSubsettedFont("Arial Unicode MS", "", 4); QP.SelectFont(fid1); int ffid1 = QP.AddFormFont(fid1); // formfieldId must be a valid formfield ID. ie. between 1 and QP.FormFieldCount() QP.SetFormFieldValue(formfieldId, "ФЫВАABCDEF123456") // Test drawing on the page. QP.SetOrigin(1); QP.DrawText(50, 50, "ФЫВА ABCDEF123456"); Andrew
|
|
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