How to print PDF silently

How to print PDF silently

Post by Roger Dougla » Sat, 19 Jul 2003 05:50:01



This might seem an odd request, but we need a way to print PDF files from
within an application (.Net C#) silently to a printer of the user's
choosing.  That is, no popup dialog to be shown, preferably not even the
printer dialog (we will tell 'it' where to print to.

There appear to be a couple ways:
1) command line run AcroRd32.exe with the filename.
But this leaves AcroRd sitting in memory gobbling up a HUGE number of Mbs,
and it appears in the Taskbar for the user.

2) run it inside a browser. But that seems like a kludge.

Requirements are:
- small foot print as it will need to work inside a Citrix environment.
- the usual, fast, reliable, cheap.
- a print server would be acceptable, but prefer a client-only solution.

A search on Google has found few tools - can anyone introduce me to more??
Silently print PDF from within a browser:

http://cwashington.netreach.net/depo/view.asp?Index=793&ScriptType=js...

Print PDF in batch mode from command line:

http://www.pdfzone.com/toolbox/pdprint.html

Two products that MIGHT do the trick here:

http://www.activepdf.com/en/Products

Any hints appreciated.

Thanks, Roger.

 
 
 

How to print PDF silently

Post by Alex Cherepano » Sat, 19 Jul 2003 07:12:23



> This might seem an odd request, but we need a way to print PDF files from
> within an application (.Net C#) silently to a printer of the user's
> choosing.

Consider Ghostscript. http://www.artifex.com

Quote:> - small foot print as it will need to work inside a Citrix environment.

About 5MB for the interpreter + VM used by PS program
   + raster buffer if any

Quote:> - the usual, fast, reliable, cheap.

Transparency still need some work, the rest is fine.
Ghostscript is available as free software and as OEM product.

Quote:> - a print server would be acceptable, but prefer a client-only solution.

It can be run on the client or on the server.

 
 
 

How to print PDF silently

Post by Roger Dougla » Sat, 19 Jul 2003 13:25:15


Thanks for this, I have found answers elsewhere - although with
side-effects.

AcroRd32.exe filename - Executes the Reader and displays a file.

Other options for the command line are:
AcroRd32.exe /p filename - Executes the Reader and prints a file.
    /n Launch a separate instance of the Acrobat application, even if one is
currently open.
    /s Open Acrobat, suppressing the splash screen.
    /o Open Acrobat, suppressing the open file dialog.
    /h Open Acrobat in hidden mode.
AcroRd32.exe /t path printername drivername portname - Initiates
Acrobat Reader, prints a file while suppressing the Acrobat print dialog
box, then terminates Reader.

The four parameters of the /t option evaluate to path, printername,
drivername, and portname (all strings).
printername - The name of your printer.
drivername - Your printer driver's name. Whatever appears in the Driver Used
box when you view your printer's properties.
portname - The printer's port. portname cannot contain any "/" characters;
if it does, output is routed to the default port for that printer.
You get at these quite easily in .Net programmatically.

If using Acrobat, substitute Acrobat.exe in place of AcroRd32.exe in the
command lines.

However, this does NOT seem to close the reader after it has finished...

Chow.



> > This might seem an odd request, but we need a way to print PDF files
from
> > within an application (.Net C#) silently to a printer of the user's
> > choosing.
> Consider Ghostscript. http://www.artifex.com

> > - small foot print as it will need to work inside a Citrix environment.
> About 5MB for the interpreter + VM used by PS program
>    + raster buffer if any

> > - the usual, fast, reliable, cheap.
> Transparency still need some work, the rest is fine.
> Ghostscript is available as free software and as OEM product.

> > - a print server would be acceptable, but prefer a client-only solution.
> It can be run on the client or on the server.

 
 
 

How to print PDF silently

Post by Philip A. Vito » Mon, 21 Jul 2003 00:30:17




Quote:> Thanks for this, I have found answers elsewhere - although with
> side-effects.

> AcroRd32.exe filename - Executes the Reader and displays a file.

> Other options for the command line are:
> AcroRd32.exe /p filename - Executes the Reader and prints a file.
>     /n Launch a separate instance of the Acrobat application, even if one is
> currently open.
>     /s Open Acrobat, suppressing the splash screen.
>     /o Open Acrobat, suppressing the open file dialog.
>     /h Open Acrobat in hidden mode.
> AcroRd32.exe /t path printername drivername portname - Initiates
> Acrobat Reader, prints a file while suppressing the Acrobat print dialog
> box, then terminates Reader.
> If using Acrobat, substitute Acrobat.exe in place of AcroRd32.exe in the
> command lines.

> However, this does NOT seem to close the reader after it has finished...

> Chow.

I think /h will close acroread after the print job completes.

--  
Philip A. Viton
Ohio State University

 
 
 

1. Win32 script/utility to print PDF silently and exit Acrobat?

Some Windows applications -- but *not* Acrobat or Acrobat Reader -- can
accept a command-line that makes them print a document and then exit,
without displaying any dialog boxes or anything else on screen.

Unfortunately, Acrobat and Acrobat Reader can *almost* do this, but not
quite. If you run the command

    acrobat.exe /p /h filename.pdf

Acrobat (or AcroRd32) will print the file without displaying anything on
screen, but will leave an icon on the Windows taskbar. If you run this
command in the background (while working in full-screen DOS, for example)
the foreground application will be interrupted, and you will be brought to
the Windows desktop. (The parameter /t .... is sometimes reported to work
completely silently, but unfortunately it also leaves an icon on the
taskbar.)

Is there a utility or script that can will take a PDF filename as a
parameter, print it *invisibly* rom Acrobat or AcroRd32 (whichever happens
to be the default file handler for PDF files),and then close Acrobat or
AcroRd32, without ever taking the focus away from whatever application is
running in the foreground?

What I hope exists is a program or script that could be posted publicly and
distributed to non-technical users who can't be expected to edit a script or
know the full path of Acrobat or AcroRd32 -- it would simply be something
they could use without any customizing.

Many thanks for any information.

Edward Mendelson
Contributing Editor
PC Magazine

2. What is the best way to do this dynamic UI?

3. Problems printing silently pdf files with Acrobat Reader v5.0

4. Learning sparc/solaris

5. Newbie question: Silently batch printing PDF files

6. fopen() and UNC pathnames

7. Silently print pdf files

8. SHOCKING NEWS!!! Bill imposes new limits on Internet posts!!

9. PDF Print Defaulting / Forcing Color Print - Xerox Tektronix Phaser 850DP

10. Still can't print Encrypted PDF w/ Print = Fully Allowed

11. Print: How to print a PDF file that is protected.

12. Cannot print to a pdf file with Distiller print driver

13. Print property (paper size) setup in VB code for PDF file print