Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3821
  • Last Modified:

write a pdf using vb6.0

I got a task to write  a pdf file using Adobe 5.0 writer in visual basic 6.0.   In this plz tell me what code i should write for generating the shape ,gif , and data value. in vb
1 Solution
Karl Heinz KremerCommented:
You cannot do this with VB and Acrobat. You need to use a 3rd party library to create PDFs. There are several libraries available. Take a look at PDFLib (http://www.pdflib.com). You can try it for free.
The only way you can use Acrobat (and btw, there is no product named "Adobe Writer". The name of this product is just "Adobe Acrobat"), you need to write PostScript files that describe your pages and then use Distiller (which comes with the full version of Acrobat) to convert the PostScript to PDF. PostScript is a programming language, and it's much easier to hand create it than PDF. But, if you have something like the PDFLib, you don't have to use a second format.
You can write pdffiles from VB6 with Adobe Acrobat PDFWriter and throughout a third app. This really exists. As in Acrobat 4 it was standard installed but from Acrobat 5 and up, u have to do a custom install. The code use got to use, by example from excel, is the following:

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Acrobat PDFWriter", PrToFileName:=yourfilename

But to instantly write to a pdf from VB6, is indeed from a plugin as khkremer said.
It's a long way, but usefull if u dont have the plugin and want to use a lot of excell functionality.

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now