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!
![]() |
Print diacritics |
Post Reply ![]() |
Author | |
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() Posted: 19 Jun 14 at 1:51PM |
Hi.
I have a problem with the print original. When you load a form (LoadFromFile), writing to one of the items (SetFormFieldValueByTitle) as a form "ěščřžýáíé" Save (SaveToFile), everything is fine.
But if I print the form (PrintDocument) and missing features "ěčř". Can you advise? Thanks Pavel Addendum: If you use command instead of the PrintDocument API function ShellExecute (0, "print", "test.pdf", "", "", 1) printing is fine. Edited by doktor.pj - 19 Jun 14 at 6:11PM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3524 |
![]() ![]() ![]() ![]() ![]() |
Hi Doktor ;-)
I can't read your used special characters here in your post. Please read here about the function SetFormFieldValueByTitle: http://www.debenu.com/docs/pdf_library_reference/SetFormFieldValueByTitle.php You're using special characters and perhaps you don't use WideString? Additionally you should read and use SetNeedAppearances: http://www.debenu.com/docs/pdf_library_reference/SetNeedAppearances.php Knowing a bit about FlattenFormField should be good, too: http://www.debenu.com/docs/pdf_library_reference/FlattenFormField.php Starting at page 32 of the developer guide: http://www.debenu.com/docs/pdf_library_developer_guide/debenu_quick_pdf_library_10_developer_guide.pdf ... you'll find several samples for your first steps with forms. Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
Thank you for your response.
I tried to go through the above commands and settings as well as various examples but the result is still the same. ![]() If you were in a previous post unreadable and national characters join in pictures. How it should look: http://ulozto.cz/xQq4gHXu/screen-ok-jpg This will print: http://ulozto.cz/x77bvpdL/screen-bad-jpg Pavel Edited by doktor.pj - 23 Jun 14 at 11:51AM |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
How about trying the new render engine in version 10.x.
Wheeley |
|
![]() |
|
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
I tried, unfortunately with the same result as in version 10.12 and at 10.15.
Pavel |
|
![]() |
|
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
Question:
if you make a new PDF file using Debenu ... after writing, reading, and attempt to print, and then everything is OK? |
|
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 |
|
![]() |
|
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
I do not know. Let me try it. So far I only wrote to the existing form and then printed out.
Pavel |
|
![]() |
|
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
So I tried the example from the documentation...
loPDFLib.SetOrigin(1) loPDFLib.DrawText(100, 100, "ěščřžýáíé") loPDFLib.SaveToFile("d:\test.pdf") ... and the result is still the same ie. some characters are missing. In this case, the characters are missing already saved in PDF. - However, if the above example will fulfill the orders AddTrueTypeFont and SelectFont (see below), everything is fine. loPDFLib.SetOrigin(1) lnFontID=loPDFLib.AddTrueTypeFont('Arial CE {1250}', 1) loPDFLib.SelectFont(lnFontID) loPDFLib.DrawText(100, 100, "ěščřžýáíé") loPDFLib.SaveToFile("d:\test.pdf") lcPrinter=loPDFLib.NewCustomPrinter(loPDFLib.GetDefaultPrinterName) loPDFLib.PrintDocument(lcPrinter, 1, 1, 0) - So I finally tried out for field txtName change the font to Arial and use commands AddTrueTypeFont and SelectFont (see below). Unfortunately, in the press are again some characters omitted. loPDFLib.LoadFromFile("c:\form.pdf", "") lnFontID=loPDFLib.AddTrueTypeFont('Arial CE {1250}', 1) loPDFLib.SelectFont(lnFontID) loPDFLib.SetFormFieldValueByTitle("txtName", "ěščřžýáíé") So the question probably sounds as txtName entry form impose font Arial CE. Appendix: Command GetFormFontName I found that Arial is the first index So I tried SetFormFieldFont command to set the appropriate font for the item txtName but I failed. When I command SaveToFile order form so it is okay i diacritics font is changed to Arial but when printing problem again. Pavel Edited by doktor.pj - 24 Jun 14 at 11:18AM |
|
![]() |
|
doktor.pj ![]() Beginner ![]() Joined: 19 Jun 14 Location: Czech Republic Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
Solved!
I had to add some command AddFormFont and here is all of it: loPDFLib.LoadFromFile("c:\form.pdf", "") lnFontID=loPDFLib.AddTrueTypeFont('Arial CE {1250}', 1) lnIndex=loPDFLib.AddFormFont(lnFontID) FOR f=1 TO loPDFLib.FormFieldCount() loPDFLib.SetFormFieldFont(f, lnIndex) ENDFOR loPDFLib.SetFormFieldValueByTitle("txtName", "ěščřžýáíé") FOR f=1 TO loPDFLib.FormFieldCount() loPDFLib.UpdateAppearanceStream(f) ENDFOR lcPrinter=loPDFLib.NewCustomPrinter(loPDFLib.GetDefaultPrinterName) loPDFLib.PrintDocument(lcPrinter, 1, loPDFLib.PageCount, 0) Thanks for mLipok push in the right direction! Pavel Edited by doktor.pj - 24 Jun 14 at 1:28PM |
|
![]() |
|
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
You're welcome - neighbor (I'm Polish).
|
|
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