Printing Adobe Acrobat .PDF Files Through VB Code

Printing Adobe Acrobat .PDF Files Through VB Code

Post by Andrew Peski » Thu, 16 May 2002 00:48:18



About once a week, we need to print out about 30 separate Adobe Acrobat
.PDF Files.  It is a real pain to open, print, close each one of them.
I have been asked to write a small application which will automate this
task?

My question is, is there any way to print a .PDF File without actually
opening Acrobat?  Is there a way to open Acrobat as an object in your VB

app and then control it through code?  Any anyone help with what I am
trying to do?  A small VB code example would be greatly appreciated.

Thank in Advance.

Andrew

 
 
 

Printing Adobe Acrobat .PDF Files Through VB Code

Post by Rod Webste » Thu, 16 May 2002 20:00:21


Commercial solutions exist and a combination of pdfOutputPro and
BatchMeister (part of pdfToolBox) from www.callas.de will allow you to
implement a hot folder solution. Then, just drop the PDF files into a folder
and they will be printed.

Alternatively, the following Borland C++ Code does it using the Operating
System procedures without delving into the Acrobat API. It might not be the
least resource hungry solution but does that matter for 30 files a week?
(This snippet processes all PDF files in a folder)

                if (FindFirst(Path, iAttributes, sr) == 0){
                        do{
                                count ++;
                                sprintf(runpath,"%s%s",buf,sr.Name.c_str());
// This is the Fully Qualified file name
                                hView = ShellExecute(Application->Handle,
"print", runpath, NULL, NULL, SW_HIDE);

                        }
                        while (FindNext(sr) == 0);
                }
                FindClose(sr);

Rod Webster


> About once a week, we need to print out about 30 separate Adobe Acrobat
> .PDF Files.  It is a real pain to open, print, close each one of them.
> I have been asked to write a small application which will automate this
> task?

> My question is, is there any way to print a .PDF File without actually
> opening Acrobat?  Is there a way to open Acrobat as an object in your VB

> app and then control it through code?  Any anyone help with what I am
> trying to do?  A small VB code example would be greatly appreciated.

> Thank in Advance.

> Andrew



 
 
 

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

I need to print PDF documents in legal size paper (HP4050 2 tray
printer) but it comes out in a letter size and shrinked even after
setting the printer default to a legal paper.

I am using avDoc.PrintPages command in a VB subroutine.

Please tell me if the print property can be set in VB codes and how.

thanks

Sent via Deja.com http://www.deja.com/
Before you buy.

2. HyperSPI on Alpha dumping

3. VB Code to print PDF file in a legal size paper

4. Looking for large screens

5. Acrobat 4 Reader can't accurately print Acrobat PDF files

6. OT: XP & HiperThreading

7. problem printing n-up PDF with acrobat reader 3.02, adobe PS drivers 4.24 (Win 98)

8. AMD Athlon 1.4 MHz and Windows 2000 pro

9. Printing pdf with Adobe Acrobat

10. Product: Adobe Acrobat/Problem: Annotating PDF Files

11. Product:Adobe Acrobat/Problem:Annotating PDF Files

12. Adobe Acrobat 2.1 Compression Options for PDF files