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 > Sample Code
  New Posts New Posts RSS Feed - VB6 - Print PDF ’on the fly ....
  FAQ FAQ  Forum Search   Register Register  Login Login

VB6 - Print PDF ’on the fly ....

 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: VB6 - Print PDF ’on the fly ....
    Posted: 30 Dec 05 at 12:46PM
Hi,

for all they search for a sample to print any PDF Files on the fly, ....

Sample written for Visual Basic 6:
______________________________________________________
Private Sub Print_on_the_fly_Click()

' Sub to prints PDF Files on the fly without saving

Dim QP As iSed.QuickPDF

Set QP = CreateObject("iSED.QuickPDF")

' GDIPlus.dll needed that the images are printable 'on the fly
Call QP.SetGDIPlusFileName(App.Path & "\GDIPLUS.DLL")

Call QP.UnlockKey("secret")
Call QP.LoadFromFile(App.Path & "\Formular.pdf")


If QP.Encrypted = 1 Then
QP.SetPassword ("secret")
QP.Unencrypt
End If
Call QP.SetNeedAppearances(1)

Call QP.SetFormFieldValueByTitle("Datum", date)
Call QP.SetFormFieldValueByTitle("Firma", Firma.value)
Call QP.SetFormFieldValueByTitle("Name", Name.value)
Call QP.SetFormFieldValueByTitle("Strasse", Strasse.value)
Call QP.SetFormFieldValueByTitle("Ort",PLZ.value & " " & Ort.value)
Call QP.SetFormFieldValueByTitle("Tel", Telfon.value)

' UpdateApperanceStream needed for printable 'on the fly
For pdfFields = 1 To QP.FormFieldCount
Call QP.UpdateAppearanceStream(pdfFields)
Next pdfFields

Call QP.PrintDocument(QP.GetDefaultPrinterName, 1, 1, QP.PrintOptions(0, 0, "Formular"))

Set QP = Nothing
End Sub
_______________________________________________________

best regards
Devil
Back to Top
sams177 View Drop Down
Beginner
Beginner
Avatar

Joined: 21 Jul 06
Location: India
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote sams177 Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jul 06 at 5:29AM

Hi !!

  Nice coding.. 

  But I want to diaplay the page before it prints. And ask the user, whether he want to print the page or not.

  Plz post reply to this.

 

 

Regards,
Sam
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: 24 Oct 06 at 12:05PM
Originally posted by sams177 sams177 wrote:

Hi !!


Nice coding..


But I want to diaplay the page before it prints. And ask the user, whether he want to print the page or not.


Plz post reply to this.





All you you need for a "printPreview"
....
Call QP.NeedImagePreview(1)
Call QP.RenderDocumentToFile(72, 1, 1, 1, App.Path & "\Vorschau.jpg")
....

regards
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. AboutContactBlogSupportOnline Store