Not Printing all pages

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Not Printing all pages

Postby smdccb » Wed Aug 11, 2010 3:34 pm

I am new to Bullzip, I have created a VB script to print a document through Bullzip, and it runs fine except that it only prints 56 pages of 83... when the dialogue box comes up during the print function, it looks like it ia printing them all, but when AI look at the ooutput only 56 pages are in the PDF document. Is there a page limit?
I am running Excel 2003 on a Windows 7 OS.
Thanks in advance for any help you can give me.

my code:

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
smdccb
 
Posts: 3
Joined: Wed Aug 11, 2010 3:24 pm

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron