create pdf programmatically in vb

  • Follow


I simply want to automate the process of creating a pdf file. I want to 
print an excel sheet to pdf, like I normally would do on paper. But when I 
try to use the Adobe pdf printer, always the print dialog shows up. How can 
I suppress this and set the filename in my vb application?
I am looking for a solution for ages now, there are tons of things I can do 
using several sdk's, but not the most simple thing like creating a pdf file.

One method I found is:
Dim bla As New PDFMAKERAPILib.PDFMakerDriver
bla.ExecPDFMaker "d:\test.pdf", ???, True, True

But what is this parameter ??? supposed to be?

Thanks, Ray 


0
Reply ano 1/17/2007 8:01:50 PM

On Wed, 17 Jan 2007 21:01:50 +0100, ano nym wrote in comp.text.pdf:

>I simply want to automate the process of creating a pdf file. I want to 
>print an excel sheet to pdf, like I normally would do on paper. But when I 
>try to use the Adobe pdf printer, always the print dialog shows up. How can 
>I suppress this and set the filename in my vb application?
>I am looking for a solution for ages now, there are tons of things I can do 
>using several sdk's, but not the most simple thing like creating a pdf file.
>
>One method I found is:
>Dim bla As New PDFMAKERAPILib.PDFMakerDriver
>bla.ExecPDFMaker "d:\test.pdf", ???, True, True
>
>But what is this parameter ??? supposed to be?

I suggest you use the PDFDistiller object and its FileToPDF method. I've
published some skeleton code in some microsoft.public.* newsgroups:
<http://groups.google.fi/groups?threadm=081401c3820b%241ed766b0%24a101280a%40phx.gbl>
<http://groups.google.fi/groups?selm=1g9h11hp4hp219h5hja6f36ksbphgi89hr%404ax.com>

-- 
Michael Bednarek   http://mbednarek.com/   "POST NO BILLS"
0
Reply Michael 1/18/2007 7:27:49 AM


"ano nym" <ano.nym@nowhere.com> wrote:

>I simply want to automate the process of creating a pdf file. I want to 
>print an excel sheet to pdf, like I normally would do on paper. But when I 
>try to use the Adobe pdf printer, always the print dialog shows up. How can 
>I suppress this and set the filename in my vb application?
>I am looking for a solution for ages now, there are tons of things I can do 
>using several sdk's, but not the most simple thing like creating a pdf file.

Did you try the Acrobat SDK? It is generally a recipe for disaster to
try and automate Acrobat without following the SDK, especially using
"discovered" objects like those for PDFMaker.

With Acrobat 7 and later, the Distiller API includes a method to
specifically set the filename for the Adobe PDF printer.
----------------------------------------
Aandi Inston  
Please support usenet! Post replies and follow-ups, don't e-mail them.

0
Reply quite 1/18/2007 9:12:33 AM

2 Replies
667 Views

(page loaded in 0.046 seconds)

Similiar Articles:













7/20/2012 4:22:05 PM


Reply: