 |
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: batch printing pdf's
Never tried to do what you're wanting, but here's some general info on what is in Adobe Acrobat (no specifics, since I don't do what you are wanting):
The full version of Adobe Acrobat has the acrobat distiller that can "watch folders" and creating PDF files. It watches folders for postscript files (And others). I've never used it.
Adobe itself has a batch processing option where you can use the prdefined, or create a new. One of the options that can be used is "print". Again, I've never used, but you might find details on Adobe's site.
Offhand though, if you have the funds for it, I'd buy the full version anyway. Nothing else, it can save paper (documents saved as a PDF file are printed to it, so you save via printing [it's a PDF printer]). Which is helpful, especially if you set the default printer to Adobe's.
|
|
20-11-2002 at 07:53 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: batch printing pdf's
Do a search for checking print jobs (the code is somewhere, can't remember offhand, may be on www.andreavb.com actually)
Enumerate the print jobs, then send the reports one after another, AFTER the prior has completed, or hit a "printing" status.
IE: 'Not actual code, just an example
Private Sub Print()
SendFirstReport
Do
Do
DoEvents
Loop Until PrintJob("Name of report")="Printing" ' OR "Completed", or Doesn't exist
SendNextReport
Loop Until AllReportsSent
End Sub
|
[Edited by JLRodgers on 10-12-2002 at 01:42 PM GMT]
|
|
10-12-2002 at 07:42 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: batch printing pdf's
What's below wouldn't be optimized, but would give you an idea
' the JobDesc() array is public, so you have access to it here
Private Enum ePrintStatus
PS_PRINTING
PS_WAITING
PS_NOTEXIST
End Enum
Private CurrentPrintDocument As String
' With the code that is at andreavb
Private Function PrintStatus(ByVal JobName As String) As ePrintStatus
Dim i As Integer
' Default
PrintStatus = PS_NOTEXIST
If GetPrinterQueue("PrinterName") > 0 Then 'Jobs exist
For i = LBound(JobsDesc()) To UBound(JobsDesc())
If JobsDesc(i).pDocument = JobName Then
' Below isn't actual code for the line, not sure what the status
' return will look like for which
If JobsDesc(i).Status = Print_Status_Code Then
PrintStatus = PS_PRINTING
Else
PrintStatus = PS_WAITING
End If
End If
Next
End If
End Function
' Not actual code, but to show how to use
Private Sub PrintDocument()
CodeTo_SendFirstReport ' store document name in CurrentPrintDocument
Do
Do
DoEvents
Loop Until PrintStatus(CurrentPrintDocument) = PS_NOTEXIST
CodeTo_SendNextReport ' store document name in CurrentPrintDocument
Loop Until AllReportsSent
End Sub
|
|
|
11-12-2002 at 06:12 PM |
|
|
|
|
 |
 |