Filling in a PDF form

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jamesF852
Newbie
Posts: 7
Joined: Fri Apr 08, 2011 3:26 am

Filling in a PDF form

Post by jamesF852 » Fri Jul 15, 2011 9:15 am

Hi,

I've searched for PDF functionality in the forums, but what I see is focussed on copying data out of a PDF - I want to put data in.

I have a supplier contract in PDF, and a spreadsheet with the details of several hundred suppliers. I want to automate copying the details from the spreadsheet and inserting them into various forms within the PDF. I've tried using MacroRecorder to do this, but since there's lots of columns to copy, I'd prefer a way that would behave more like the XL and IE form filling functions.

Has anyone done this before?

Thanks

James

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jul 15, 2011 9:40 am

There's no way to do it like the Excel or IE functions. So you would have to use the "traditional" techniques of sending keystrokes into the window, just as you would with any other interface. You should be able to do it without mouse events - you should be able to tab (Press Tab) between fields and then send (SendText) the data into each field. If something cannot be operated by keystrokes, then I would use image recognition (FindImagePos) to identify the control and return it's screen position so that you can MouseMove to it and LClick it etc. Use WaitScreenImage to wait for readiness where needed.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3503
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Jul 15, 2011 12:26 pm

I don't have a form to test with. Would it be possible to use SetControlText> with a PDF form?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jul 15, 2011 12:53 pm

JRL wrote:I don't have a form to test with. Would it be possible to use SetControlText> with a PDF form?
I very much doubt it - because the controls inside the PDF document are not likely to be native windowed controls.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Fri Jul 15, 2011 7:16 pm

This link will tell you how to fill a PDF form programatically

http://forums.adobe.com/thread/741050

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts