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 - Print diacritics
  FAQ FAQ  Forum Search   Register Register  Login Login

Print diacritics

 Post Reply Post Reply
Author
Message
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Topic: Print diacritics
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 14 at 9:34PM
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

Back to Top
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jun 14 at 11:35AM
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. Cry What can I possibly even try?

If you were in a previous post unreadable and national characters join in pictures.


Pavel


Edited by doktor.pj - 23 Jun 14 at 11:51AM
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jun 14 at 10:47PM
How about trying the new render engine in version 10.x.

Wheeley
Back to Top
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jun 14 at 7:11AM
I tried, unfortunately with the same result as in version 10.12 and at 10.15.
Pavel
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: 24 Jun 14 at 9:55AM
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
Back to Top
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jun 14 at 10:18AM
I do not know. Let me try it. So far I only wrote to the existing form and then printed out.
Pavel
Back to Top
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jun 14 at 10:52AM
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
Back to Top
doktor.pj View Drop Down
Beginner
Beginner


Joined: 19 Jun 14
Location: Czech Republic
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote doktor.pj Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jun 14 at 11:37AM
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
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: 24 Jun 14 at 7:05PM
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
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