PDA

View Full Version : ActiveX - print only from VB


SammB
November 1st, 2007, 02:45 PM
I am trying to print existing PDF files using VB. I put an instance of the OCX on a seperate form with no other controls. I OpenFile() and the image appears. If I PrintFile (with dialog), it prints fine. If I PrintSilent or PrintSilentByName, a document gets spooled to the printer with either 460 or 852 bytes (not big enough!) and I get a blank page.

Can someone tell me the easiest way to just print a PDF file to a specific printer with no dialog? Does the OCX control need to be visible? Does the form it is on need to be visible?

I was using the Adobe SDK, but it was so slow and a memory hog. I use FoxitReader and would like to use its rendering engine in my program.

Thanks.

SammB
November 1st, 2007, 04:09 PM
I just downloaded the version 2. Wow. BIG improvement. Kudos to the developers!

Unfortunately...
When I printed existing PDF files with the old one, there was no watermark, and this one prints a fairly large and ugly red one. Normally I wouldn't have a problem with it, since this is a single-user in-house program that I have written, but it is so big and in just the right place that it obscures a critical portion of the particular documents I need to print. I am printing our engineering drawings to go out on the shop floor and the watermark displays right over the top of the important drawing information. Is it necessary to be so big and obnoxious? Could it print on the edge somewhere out of the way? I know that you will say that I should register it, but for what I need it for, the price was WAY out-of-line. I bought Adobe's Acrobat cheaper than that! All I need is a way to print PDFs.