How to Tell C++ To Print a PDF File

How to use Adobe Acrobat to print PDF files...

Page 1 of 1

3 Replies - 5558 Views - Last Post: 23 January 2010 - 02:50 AM Rate Topic: -----

#1 masoug  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 181
  • Joined: 30-December 09

How to Tell C++ To Print a PDF File

Post icon  Posted 21 January 2010 - 09:32 PM

Hi,

I have a constant arduous task of downloading a bunch of PDF files individually and having to open them up and print them out on my printer.

I thought since a computer is supposed to help us make life more efficient, there must be a way to make the computer do this automatically...

I have looked at some forums discussing about how C++ can start programs and print to a USB printer, but how do I tell C++ to print a PDF document, not a bunch of words? (Adobe Acrobat)...

(Don't spit out code, just help w/ some clues) :)

Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: How to Tell C++ To Print a PDF File

#2 nmeans73  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 59
  • Joined: 26-December 09

Re: How to Tell C++ To Print a PDF File

Posted 21 January 2010 - 10:33 PM

I'm not an expert, but I'm pretty sure that this would be a lot easier to accomplish using a scripting language or even a batch file.
Was This Post Helpful? 0
  • +
  • -

#3 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: How to Tell C++ To Print a PDF File

Posted 22 January 2010 - 01:23 PM

Here is something I have found:

Quote

The DDE command line parameters for Acrobat and Reader are as follows. These are unsupported but have worked for some developers.

AcroRd32.exe /p filename - executes the Reader and prints a file
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.

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

Was This Post Helpful? 0
  • +
  • -

#4 jeff666  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 193
  • Joined: 30-December 08

Re: How to Tell C++ To Print a PDF File

Posted 23 January 2010 - 02:50 AM

Which OS ?
On Windows, just use Win32 api (COM or other)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1