Printing from a PDF
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
29-10-21 11:54 AM
Good morning all,
We've run into an issue when printing a PDF. Currently, this is our approach:

We then have a global wait (currently 15 seconds) for this process to run before killing Acrobat. However, we're not getting any confirmation that the print has actually completed in this timeframe, and files are as a result intermittently not appearing on the printer.
Is there another approach that I'm unable to think of currently? We need to reliably know that Acrobat has opened and sent the file to the printer, and that the print controller has registered that an item is to be added to the print queue before terminating the process.
Open to any and all suggestions!
------------------------------
John Hammond
------------------------------
We've run into an issue when printing a PDF. Currently, this is our approach:
We then have a global wait (currently 15 seconds) for this process to run before killing Acrobat. However, we're not getting any confirmation that the print has actually completed in this timeframe, and files are as a result intermittently not appearing on the printer.
Is there another approach that I'm unable to think of currently? We need to reliably know that Acrobat has opened and sent the file to the printer, and that the print controller has registered that an item is to be added to the print queue before terminating the process.
Open to any and all suggestions!
------------------------------
John Hammond
------------------------------
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
29-10-21 12:15 PM
I've never used it, but it looks like .Net offers functionality in the System.Printing namespace, for example the GetPrintJobInfoCollection method. Maybe you could employ that in a code stage and create the looping 'has it worked?' check you describe?
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
29-10-21 01:04 PM
Hi John, thanks for getting back to me.
Would that be reliable on a network printer? I'm not knowledgeable myself on .NET myself. It looks like our print queue doesn't consistently contain the file name, which might put up another hurdle?
------------------------------
John Hammond
------------------------------
Would that be reliable on a network printer? I'm not knowledgeable myself on .NET myself. It looks like our print queue doesn't consistently contain the file name, which might put up another hurdle?
------------------------------
John Hammond
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
30-10-21 06:28 AM
You can do something like this by extending the code stage:
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification Developer
Amazon
------------------------------
------------------------------
Dim pdf = GetDocument(Handle, Document Name)
pdf.PrintOut(Background:=False)
pdf = Nothing
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification Developer
Amazon
------------------------------
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification Developer
Amazon
------------------------------
