Expand my Community achievements bar.

Replace Background Image in PDF

Avatar

Level 1

So I'm creating a new, fixed form based on a PDF I imported.  It's a PDF that has some product photos.  Then I bring it into LiveCycle Designer and add a text box where the user can enter their own contact info, and an image field where the user can upload their own logo, creating a personalized sales cut sheet.

I have to create a ton of these.  The format will always be the same.  The contact info text box and the image field will always be in the exact same spot and require the exact same formatting.  So my question is...

Is there a way to swap out the PDF I imported?  I'd like my text box and image field to stay as is and just swap out the background image that is the PDF I imported.  Otherwise, I'm going to have to create the text box and image field for each and every PDF, which sounds painful.  If anyone knows how to do this, please let me know.  Thanks!

2 Replies

Avatar

Level 8

If I were you, I'd use the Acrobat Action Wizard (batch sequence) instead of using Designer. For example, open up Acrobat, create a new Action and add Execute JavaScript. To add a field use this JavaScript:

var inch = 72;

var aRect = this.getPageBox( {nPage: 0} );//first page

aRect[0] += .5*inch; // from upper left hand corner of page.

aRect[2] = aRect[0]+.5*inch; // Make it .5 inch wide

aRect[1] -= .5*inch;

aRect[3] = aRect[1] - 24; // and 24 points high

this.addField("ContactInfo","text",0,aRect)

Play with the aRect array elements a bit to get the position and size that you want for your contact info. Details on how to manipulate the properties of your new field can be found in the Acrobat JavaScript API: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf

Then you can select a folder full of all the pdfs you want to apply your field to.

Kyle

Avatar

Level 2

You could add the group of objects to the object palette. This way you can reuse the objects in your other forms.

The following explains how to add/create objects in the object palette:

http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000044.html