PDF Component Recommendation
Hello all,
My company has a procedure database. The procedures only apply to certain plants that we have. I've written a program to keep track of whcih procedures are attached to which plant. The program that we were using to do this previously was using the reporting feature of Access. We had to make the report, then save it as a PDF. For 15+ plants, this was time consuming. This is where my program came in. It was designed to handle all of this printing autmatically, but I don't have a way to make and export that report anymore.
I need to be able to make a report similar to Crystal Reports but export it in a PDF. I can code the report manually if need be, so that I don't have specific sections and divisions displaying data based on the database like Crystal Reports does, but rather I have a form like a Microsoft Word macro that I could write and would input the data into the software.
Anyone have any good suggestions for a good control or coding references?
Re: PDF Component Recommendation
There is a VB6 PDF control that you can add to any of your VB6 applications. Have you tried using it to do anything with PDF files? It's a little nebulous, but please look it over. I have found it to be rather flexible, once you get the hang of it.
Re: PDF Component Recommendation
you can print to any pdf printer driver
i use CutePdf, but pdfcreator allows more control
Re: PDF Component Recommendation
That's true westconn. As of now that might work, but if I ever decide to run this on anyone else's computer, that might be a problem. I like to keep my projects as self-contained as possible.
Code_Doc:
I haven't tried using it at all. What's the component name? Where can I learn about it?
Re: PDF Component Recommendation
The control name is AcroPDF1. It's near the top of the VB6 components list (AcroPDF.dll).
With a little effort, I've been able to configure it to have the look and feel of the Acrobat Reader. ;)
1 Attachment(s)
Re: PDF Component Recommendation
Am I missing something?Attachment 65508
Re: PDF Component Recommendation
Quote:
Originally Posted by drag0n_45
That's it. Whale of a long control description. ;)
Also, search this site for PDF. For awhile there were lots of people playing with this beast.
Re: PDF Component Recommendation
I checked out that PDF control. It looks like it's just for reading and displaying PDF's, not for making them. I might need to do that PDF printer driver thing, but then I'd have to specify each file name in the printer's open file dialog and the printer each time. Does anyone know of a way to create PDF's not just view then, or maybe there's a way to automate that printing process?
Re: PDF Component Recommendation
I found this and installed it - it's retardedly complicated. This might take awhile for me to figure out. If anyone's ever heard anything or used the library let me know....
Re: PDF Component Recommendation
Quote:
Originally Posted by drag0n_45
I found
this and installed it - it's retardedly complicated. This might take awhile for me to figure out. If anyone's ever heard anything or used the library let me know....
Creating PDFs is not going to be easy for numerous reasons, primarily that the file format is somewhat proprietary. Adobe invented it and I'm sure you would understand their position on the issue. The VB6 control allows a read of the file and a save plus numerous other display options that allow you to mimic the Acrobat Reader within your apps.
Remember that Adobe also sells The Distiller, and that builds the PDF. Any software written to do the same would be a competitor.
Re: PDF Component Recommendation
Ah true. Thing is, I'm not trying to read them - I'm trying to create them. I'm not sure if there's an easier way to do this though. I currently am using an Access database with reports to display the data. I run the report on various sets of data and export the result to a PDF. This process needs to happen about 15-20 times with each revision of a company procedure. This take about 30minutes to a half hour. I'm trying to port the software over to Windows only and continue to make the PDF reports. This program will primarily be run on my computer, so dependancies and distribution won't be a problem. Maybe CR has some kind of PDF exporter?
Re: PDF Component Recommendation
The PDF format is 'open' - ie. Adobe have published and documented the format to third-party developers and to the public.
But, even so, it's an extremely complex file format and creating a full-featured PDF 'manually' (ie. sequentially writing data to disk) would be near impossible in VB6.
My suggestion is that you can create PostScript content, which uses a much simpler syntax, and invoke Adobe's Distiller application programatically to convert PS into PDF.
Re: PDF Component Recommendation
One option is to install Primo PDF and then use standard print methods to print to the Primo PDF printer.
Re: PDF Component Recommendation
adhijit, That would work, except that with any PDF printer that I've seen, the printer driver prompts where it would like the PDF file created. In a situation such as mine, this would be impractical, as there would be a prompt for each and every one of the 15 PDF files. Also, the user could delete that printer and my program would be screwed. I may be able to go with reinholdmesner's method...need to look into it further.
Re: PDF Component Recommendation
Quote:
Originally Posted by drag0n_45
adhijit, That would work, except that with any PDF printer that I've seen, the printer driver prompts where it would like the PDF file created. In a situation such as mine, this would be impractical, as there would be a prompt for each and every one of the 15 PDF files. Also, the user could delete that printer and my program would be screwed. I may be able to go with reinholdmesner's method...need to look into it further.
Would it be possible to avoid this prompt by using an API call?
:wave:
Re: PDF Component Recommendation
Possible. You mean monitor the open windows and when the print dialog comes up automatically fill in the values and hit ok? That is probably possible, but then what if someone deleted the PDF printer not knowing what it was? That would screw up this whole idea.
Re: PDF Component Recommendation
with pdfcreator you can automate the saving process, by specifing the file name to a registry key and some option to save to that name, without keypress, also all the VB source code is available
Re: PDF Component Recommendation
Excellent. I'll look into pdfcreator then. I realized that the company already had some pre-made templates for the form I'm trying to create. Our scanner can scan into PDF. Does PDF creator load and edit PDF files? (Or at the very least plop some text over the pdf file for printing?)
Re: PDF Component Recommendation
Quote:
Does PDF creator load and edit PDF files? (Or at the very least plop some text over the pdf file for printing?)
not as far as i know, you would have to this yourself before printing to the pdf driver, or modify the pdfcreator source code,
i have downloades the pdfcreator, but not really done anything with it as i normally use cutepdf