Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF created within website--what are my options? 2

Status
Not open for further replies.

SneezeDragon

Programmer
Mar 6, 2002
13
0
0
US
I'm looking to create PDF files on-the-fly for an existing e-commerce website. I've read the other posts on automatic creation of PDF, and I'm still not sure of the best way to go about it. Any advice would be appreciated.

REQUIREMENTS:

We need external (internet) customers to be able to click on a button on the website from any web browser, and have a printable version of a custom invoice appear.

PDF is probably the best bet because each page in the printable version must have very specifically formatted headers and footers.

The number of individual records in the invoice body varies from order to order, so I'm not sure this will work using FDF Toolkit.

Programmatically, I'll be retrieving the customer's info on the web server from an Oracle database via ASP or COM (Visual Basic 6) and then using that information to create the file.

My questions are:

1) Is it possible to do this?

2) What are the possible approaches to the PDF part of this development? Which in your opinion is the best approach?

2) What development software is needed, besides Acrobat (full version) and the stuff I'm already using (MS Interdev and VB) ?

3) What software, if any, needs to be installed on the server in order for this to work?

Thanks in advance for all your help! (Sorry this sounds like an essay test.)
 
Hi

Just briefly - as it's late here - if you are a VB person the thing you need to be looking at is the creation of your reports in a printable format. This may be in the form of some Oracle reports or whatever floats your boat but something which you can generate and print using full VB code, pulling your data from Oracle and populating the form. Once you have written your reports and code you need to create your COM or activeX component from it.

The plan is that your asp page, when it has all the right parameters, can activate and use your VB object using:

set vbObj=server.createobject("vbdll.reportmaker")
vbObj.runreport([your parameters required])

Your calling of the VB function will then create and populate your report.

Now, the acrobat bit, which is scarily the easy bit (which you may or may not be pleased about). When you print the reports using the VB code, print it to one of these options:

print to file using a decent postscript printer
print using Acrobat Distiller
print using PDFwriter

I suggest the first one, print to file. This will create a postscript file which you can save into a Acrobat Distiller watched folder. If Distiller is left running it will keep checking its watched folders for any new files to distill, and once it finds one it will do its stuff (using the job options that you specify) and save the pdf file into the "out" folder.

Because you have named the ps file and chosen the watched folder, you will know exactly where the pdf file is, and what it is called. This can then be used to create a link for your customers to view the resultant PDF.

So, you need a webserver with Acrobat installed and active on it, the VB dll/COM object installed and some nice reports.

Any questions? Seriously, there is a bit of work involved but it should be well within the realms of possibility.

Good luck

[fish] Derren
[Mediocre talent - spread really thin]
 
Thanks for your feedback, Derren!

Just a few questions:
Will the customers be able to print the resultant file from their web browsers without any additional software but Acrobat Reader?

I take it from your analysis that I wouldn't need any additional development software, since Distiller comes with Acrobat? Just trying to estimate non-time related development costs.

Thanks again!
SneezeDragon
 
That's right, the resultant PDF will be viewable and printable from any browser with the acrobat reader plugin.

The only surprise costs could be related to the tools you need to create the reports. Derren
[Mediocre talent - spread really thin]
 
You could use FDFMerge or StampPDF Batch, both are server tools, available as command line utilities or Java / Web Services.
FDFMerge would suggest a predictable invoice where an PDF file is designed containing all of the information from an invoice.
StampPDF Batch would utilize a blank PDF (containing a Logo like stationary) and the Invoice data could be stamped on the PDF.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top