vb6- sometimes white pdf when printing jpg

About the programming interface for the virtual PDF printer driver.

Moderator: jr

vb6- sometimes white pdf when printing jpg

Postby CarlosCB » Fri Jul 26, 2013 1:33 pm

I have this example:

dim Util as Object, Settings as Object
Dim ImpreAntes As String
Dim sPrinterName As String
Dim prtidx As Integer

ImpreAntes = Printer.DeviceName

Set Util = CreateObject(Bullzip.PDFUtil)
sPrinterName = Util.defaultprintername

Rem -- Configure the PDF print job
Set Settings = CreateObject(Bullzip.PDFSettings)
Settings.Printername = sPrinterName
Settings.SetValue "Output", "C:\SALIDA.PDF"
Settings.SetValue "ConfirmOverwrite", "no"
Settings.SetValue "ShowSaveAS", "never"
Settings.SetValue "ShowSettings", "never"
Settings.SetValue "ShowPDF", "no"
Settings.SetValue "RememberLastFileName", "no"
Settings.SetValue "RememberLastFolderName", "no"
Settings.WriteSettings True

prtidx = PrinterIndex(sPrinterName)
Set Printer = Printers(prtidx)
Printer.PaintPicture Picture1.Picture, 0, 0, Printer.Width, Printer.Height
Printer.NewPage
Printer.EndDoc

Dim runonce As String
runonce = Settings.GetSettingsFilePath(True)
Util.WaitForFile runonce, 500
prtidx = PrinterIndex(ImpreAntes)



It's fine, but in other PC this code sometimes only output a pdf with one black page and no error in log file.

Can you help me, please :wink:
CarlosCB
 
Posts: 1
Joined: Fri Jul 26, 2013 1:03 pm

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron