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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing pdf's within vb

Status
Not open for further replies.

bubarooni

Technical User
May 13, 2001
506
0
0
US
Is it possible to edit an existing pdf file without using third party software? I want to load it, edit it, print it and then save it to a db.

It is the entering info on an existing form (a govt health care form with many fields in this case) that has me stumped. I can't seem to find any info on editing an existing form.

I am opening the file with the pdf.ocx.

Any ideas or resources will be greatly appreciated.

Thanks
 

Yes, it is possible if you can download Adobe's SDK and program in C/C++ to wrap their editing functions in a dll that you can use with VB. Beyond that you are out of luck with using the PDF.ocx for editing.

Good Luck

 
Can you use a Word doc (or even a VB form) for data entry? Then you can output to a pdf file using a pdf driver, and display/print it using pdf.ocx.

Paul Bent
Northwind IT Systems
 
I took a class in c about 6 years ago but, the c/c++ is probably a bit over me. I'll look at the SDK anyway. If I can find a Word doc of the form I'll give it a try. It is a complicated form and the govt. insist it be exactly like theirs.

Not exactly what I wanted to but, thanks for your input.
 
Hi Bubarooni,

If you use a PDF Form and place select boxes or text boxes on it, you can link that information to a database. You would want to look into the document properties and Set A page Action. It is very similar to haveing a webpage form and when a user clicks the submit button, scripting transports the information to a database. A user will still be able to print the PDF with entered information as along as you set the form field properties to allow it. There is an FDF toolkit on adobes website that probably explains it a little better than I do. Or do a search online for "FDF to database". This should produce some good results for you.

Kophjager
 
I actually wound up recreating the entire form in VB. There was something like 212 textboxes and checkboxes on it. It was heck programming the X and Y print coordinates for each. There were several hundred lines and labels as well. Very little programming, just monotony.

However, as long as we are on this again. I currently have it set up to print on pre-printed forms and not use the PDF. I also still have the PDF but am doing nothing with it.

Could I combine the programming I have already done and the PDF into one print job? In other words, the user hits the print button and the pdf and the information entered in my VB form print out as one print job? This way the user wouldn't even need the preprinted forms.

Thanks
 

What may be easier for you is to print a blank copy of the PDF. Then scan it in and save it as a jpg. Then you can use each jpg for each page using the Printer.PaintPicture. You would only then need to figure out the CurrentX/Y for each field the user entered and then EndDoc.

Did you understand that?

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top