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 > General Discussion
  New Posts New Posts RSS Feed - Whats wrong -> PrintDocument ?
  FAQ FAQ  Forum Search   Register Register  Login Login

Whats wrong -> PrintDocument ?

 Post Reply Post Reply
Author
Message
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Topic: Whats wrong -> PrintDocument ?
    Posted: 15 Dec 05 at 10:33AM
Hi,    
two things, ... first of all, if its possible to communicate in any language ? (i.e. German )    
I have a little problem to print out a document with the following sytanx: (i.e. VB6)

'...
I = QP.GetDefaultPrinterName
Call QP.PrintDocument(I, 1, 1, 0)
'...    

Document was printed but all Images and all FormFields are empty. The Document has no premission. When I save first the Document and openend a second time with a other call, the Documnet was right. But I need the function to print on the fly, ...
Have anyone any Ideas ?    

Thanks
Devil
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: 16 Dec 05 at 2:03AM
Hi "Devil" ;-)
It's my experience that (to avoid compatibility problems with newest pdf-versions) it's often a solution to save and reload the pdf-file for better results.
If you wanna do it "on the fly" you can use this idea, too. ...In this case don't use SaveToFile and LoadFromFile. There're functions (for delphi only) like SaveToStream / SaveToString and LoadFromStream / LoadFromString.
You should prefer to read and write in english here if you want any help. The QuickPDF-users are all over the world - only less in germany (i fear) ;-)
Cheers,
Ingo

Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 2:05AM
@Admin

It seems that I post in the wrong thread,
could you please move to "I need help - I can help" thread.

Thanks
Devil

>>> MOVED AS REQUESTED.

Edited by Michel_K17
Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 2:47AM
Hi Ingo,

thx for answering, ...
I use the iSED.dll with VB6 and Adobe V.5, ....
The methode I write is by the way not the best, but it runs !
Makes it sense to use the iSED.dll or better use another dll.
I read some threads about the confusion with iSED/ Sedtech.
There no way to become some better support for this dll ?

Devil
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: 16 Dec 05 at 3:14AM
Hi!
I'm only using the dcu-components (delphi). Support or not - the wide range of functions and the price is the best you can get.
Anyway it's always the same: This dll or another one? It depends on what you wanna do and which functions you need.
A problem could be in the near future the further developing on the library... but perhaps this will be one of our tasks here in this forum.
Cheers,
Ingo

Back to Top
szelkye View Drop Down
Beginner
Beginner


Joined: 15 Dec 05
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote szelkye Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 9:05AM

I tried following the advice of this thread but I'm still having a problem.  The Content of the FormFields are empty for my document.  Here is some VB code

 

iSed.UnlockKey ISED_QUICKPDFKEY
    lOutDoc = iSed.NewDocument()
   
    iSed.LoadFromFile (sSourcePDFFile)
    lFormDoc = iSed.SelectedDocument
   
    For Each sFieldName In mcolFieldVals.Keys
        On Error Resume Next
        iSed.SetFormFieldValueByTitle sFieldName, mcolFieldVals(sFieldName)
        On Error GoTo 0
    Next
    iSed.SelectDocument lOutDoc
    iSed.MergeDocument lFormDoc
    iSed.DeletePages 1, 1
    iSed.CompressContent
    iSed.SetNeedAppearances 1
   
    sFileName = getTempPDFFile()
   
    iSed.SaveToFile sFileName
    iSed.LoadFromFile (sFileName)
   
    'iSed.PrintDocument iSed.GetDefaultPrinterName, 1, iSed.PageCount, 0
    iSed.PrintDocument iSed.GetDefaultPrinterName, 2, 2, 0 'this is just for debugging so only 1 page prints...

 

If I load the file (sFileName) in Acrobat right after its saved here, the form fields are there so I don't know.

Please any help would be greatly appreciated.



Edited by szelkye
Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 9:27AM
Hi Ingo,
thus you mean it are worthwhile yourself this DLL nevertheless to use/buy.
Which I need of these DLL am actually not very much...
A function who open an existing pdf knows their text fields fills out and send the whole on a printer ...
I can realize so far everything with these DLL, up to the deficiency with that expressions.
Unfortunately it seems so for it that no has a correct solution to the hand to solve this problem in VB6 ...

Devil
Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 9:42AM
Hi Szelkye,

my first Idea was:

' PDF-Bestellformular öffnen
' und Daten aus den Stammdaten entnehmen

Dim QP As iSED.QuickPDF
Set QP = CreateObject("iSED.QuickPDF")
Call QP.UnlockKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") 'secret
Call QP.LoadFromFile(App.Path & "\Bestellformular.pdf")
If QP.Encrypted = 1 Then
QP.SetPassword ("XXXXXXX") 'secret
QP.Unencrypt
End If
Call QP.SetNeedAppearances(1)

Call QP.SetFormFieldValueByTitle("Datum", date)
Call QP.SetFormFieldValueByTitle("Firma", GetIniString("Stammdaten", "Firma", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Name", GetIniString("Stammdaten", "Zusatz", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Strasse", GetIniString("Stammdaten", "Strasse", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Ort", GetIniString("Stammdaten", "PLZ", ja, (App.Path & "\" & App.EXEName & ".ini")) & " " & GetIniString("Stammdaten", "Ort", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Tel", GetIniString("Stammdaten", "Phone", ja, (App.Path & "\" & App.EXEName & ".ini")) & " " & GetIniString("Stammdaten", "Fax", ja, (App.Path & "\" & App.EXEName & ".ini")))


I = QP.GetDefaultPrinterName
Call QP.PrintDocument(I, 1, 1, 0)

Set QP = Nothing

End Sub                  


All text fields are empty and the Image are missing also on the expressions.I think which I simply a mistake in reasoning in the code have or simply only something forgot...

Devil
Back to Top
szelkye View Drop Down
Beginner
Beginner


Joined: 15 Dec 05
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote szelkye Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 10:49AM
Devil:  You did mostly the same thing I did.  You said in your first post that when you saved the document and opened again that it was okay.  I don't see that in your code.  I tried to do the same thing but I had no success.
Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 05 at 12:49PM
Sorry,

the Code is the one I tried to use for it, but work not right.

The Code I used is the following one:

Dim QP As iSED.QuickPDF
Set QP = CreateObject("iSED.QuickPDF")
Call QP.UnlockKey(XXXXXXXXXXXXXXXXX)
Call QP.LoadFromFile(App.Path & "\Bestellformular.pdf")
If QP.Encrypted = 1 Then
QP.SetPassword ("XXXXXXX")
QP.Unencrypt
End If
Call QP.SetNeedAppearances(1)


Call QP.SetFormFieldValueByTitle("Datum", date)
Call QP.SetFormFieldValueByTitle("Firma", GetIniString("Stammdaten", "Firma", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Name", GetIniString("Stammdaten", "Zusatz", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Strasse", GetIniString("Stammdaten", "Strasse", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Ort", GetIniString("Stammdaten", "PLZ", ja, (App.Path & "\" & App.EXEName & ".ini")) & " " & GetIniString("Stammdaten", "Ort", ja, (App.Path & "\" & App.EXEName & ".ini")))
Call QP.SetFormFieldValueByTitle("Tel", GetIniString("Stammdaten", "Phone", ja, (App.Path & "\" & App.EXEName & ".ini")) & " " & GetIniString("Stammdaten", "Fax", ja, (App.Path & "\" & App.EXEName & ".ini")))



Call QP.SaveToFile(App.Path & "\export\" & "0815-20051215.pdf")


Set QP = Nothing

Call ShellExecute(hWnd, "Print", App.Path & "\export\" & "0815-20051215.pdf", "", "", 0)


Devil
Back to Top
Devil View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Dec 05
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Devil Quote  Post ReplyReply Direct Link To This Post Posted: 30 Dec 05 at 12:50PM
Hi,

here you can find the solution / a sample for the problem,

VB6 - Print on the fly, ...

best regrads
Devil
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. About — Contact — Blog — Support — Online Store