Page 1 of 1

Not Printing all pages

Posted: Wed Aug 11, 2010 6:17 pm
by smdccb
I am new to Bullzip. I have written a script to print a file through Bullzip, and it seems to run fine, except that when I look at the PDF file I created only a protion of the pages are there (56 of 83). I have increased the Ghostscripttimeout to 600 9from default of 300, but has not made any difference. Any suggestions on what to try next?
I have tried to post this before, but since I cant find my post (it doesn't show up) I am trying to post this again.

MYCODE:

Private Sub PDFBullzip()

Dim Bullzip As New Bullzip.PDFPrinterSettings
Dim PSFileName As String
Dim PDFFileName As String
Dim PDFlog As String
Dim ShellStr As String
Dim lastRow As Long
Dim PDFOk As Boolean
On Error GoTo Print_Error

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Application.CalculateBeforeSave = False

g_RecordDate2 = Format(g_RecordDate, "yyyy.mm")
g_ReportNP = g_ReportStorePath & g_BankInfo.file_path & "\reports\" & g_RecordDate2 & "_" & g_BankID & "_" & g_BankInfo.short_name
PSFileName = g_ReportNP & ".ps"
PDFFileName = g_ReportNP & ".pdf"
PDFlog = g_ReportNP & ".log"

If InStr(ActivePrinter, "Bullzip") = 0 Then
Dim StorePrinter$, PrinterChanged As Boolean
PrinterChanged = True
StorePrinter = ActivePrinter
ActivePrinter = GetFullNetworkPrintername("Bullzip")
End If

Call Bullzip.SetValue("Output", PDFFileName)
Call Bullzip.SetValue("ShowSettings", "never")
Call Bullzip.SetValue("ConfirmOverwrite", "no")
Call Bullzip.SetValue("ShowSaveAs", "never")
Call Bullzip.SetValue("Showpdf", "no")
Call Bullzip.SetValue("SuppressErrors", "yes")
Call Bullzip.SetValue("GhostscriptTimeout", "600")
Bullzip.WriteSettings (True) 'writes the settings in a runonce.ini that is immediately deleted after use.

g_AMGRWTemplate.Activate
g_AMGRWTemplate.Worksheets("control").Columns("A:EZ").AutoFit
g_AMGRWTemplate.Worksheets("branch").Columns("A:EZ").AutoFit
g_AMGRWTemplate.Worksheets("hist_data").Columns("A:EZ").AutoFit
On Error GoTo 0
On Error GoTo Print3_Error
g_AMGRWTemplate.Worksheets(g_ReportArray).Select
On Error GoTo 0
On Error GoTo Print_Error

g_AMGRWTemplate.Worksheets(g_ReportArray).PrintOut

PDFOk = True
Exit Sub

Print3_Error:
MsgBox Title:="Caution!", Prompt:="AMGRW can't print the report due to missing sheets in Master_ALCO." & vbCrLf & " Please verify every sheet in this bank's Report Profile exists in Master_ALCO." & vbCrLf & vbCrLf & "Err.Number: " & Err.Number & vbCrLf & "Err.Source: " & Err.Source & vbCrLf & "Err.Description: " & Err.description & vbCrLf & vbCrLf & "Please check error log for details.", Buttons:=vbCritical
Application.DisplayAlerts = True
PDFOk = False
Exit Sub
Print_Error:
MsgBox Title:="Caution!", Prompt:="AMGRW can't print the report through Bullzip. " & vbCrLf & vbCrLf & "Err.Number: " & Err.Number & vbCrLf & "Err.Source: " & Err.Source & vbCrLf & "Err.Description: " & Err.description, Buttons:=vbCritical
PDFOk = False
End Sub

Re: Not Printing all pages

Posted: Fri Aug 13, 2010 8:50 pm
by smdccb
After some trial and error, i discovered that the worksheets in the underlying document must all be set to the same Print Quality setting through Page Setup.
Once that was fixed, all pages printed fine.

Re: Not Printing all pages

Posted: Wed Apr 04, 2012 6:05 pm
by DebRunyan
Hi,
I am having the same problem. I am using Bullzip to create a single PDF file of statements. If I run the same statements 3 times, I get 3 different results. (I do change the Output file name.)
I use the global.ini to set Bullzip up to create just one file:
[PDF Printer]
Output=C:\Statements\<date>_Statements.pdf
ShowSettings=never
ShowPDF=no
AppendIfExists=yes

It seems that the Print Quality would be the same as all pages are being printed in the same way from the same program.
Does anyone have any suggestions?
Thanks,
Deb