Using JS is the only way of doing it. Either by showing/hiding fields, or
by applying the correct image to a single field when the selection is made.
I've used the first approach multiple times and it works very well. Of
course, if you have hundreds of images there might be some lag, but if
that's the case then maybe PDF isn't the best option for your file...
Well that's the thing. I only have two buttons with images attached to them and it still lags when I scroll through the document.
What would you suggest as an alternate solution? I need this document to print but I also want this to be accessible/fillable by customers who may not have the most up-to-date computing power.
What application and system are you using to view this file? Can you share
Unfortunately no, I can't share the file.
It is a PDF, originally exported from an InDesign file. I'm using Acrobat 11 Pro on Windows 7 to add form functionality to the document. My ultimate goal is to add autonomy to this file to speed up the workflow of the product it's representing so our customers can more easily order it. The image files are each around 10MB.
The image file might explain it... Try to reduce their size/resolution
before importing them to the PDF. I believe that will help with your
I don't know why I didn't try that before. The images don't really need to be all that big now that I think about it as they are just printed examples of other products we are offering. Although the amount of images I need to show in this PDF could make it slow again. I need to show about 18 images in about 16 places throughout the document so I would imagine using the hide/show method could make the file size a bit unmanageable.
Yeah, that seemed to help a lot. I also converted all of my images to PDFs which helped with the file size as well. Things are running more smoothly! I'll post again here to update on my progress.
While I did get things to run smoothly on the form-filling side of things, the editing side slowed a bit, but it was workable. I got 18 images in 8 places so far. I was able to reduce the image sizes and convert all 18 into PDFs to total around 2MB.
Here's another question. Is it possible to use some sort of container on these buttons? Say if my seventh and eigth dropdown boxes are blank, which, in turn makes my seventh and eighth button hidden. Is it possible to say in Acrobat that I want all these remaining visible buttons to center-align within this container?
In other words, is it possible to use div containers or something similar within Acrobat?
No, but you can dynamically move the buttons around by setting their rect
Their rect values? I'm guessing that's their coordinates within the PDF? Do you have an example?
1 person found this helpful
Yes, that defines their location on the page using a 4-numbers array. Have a look at the reference of this property and you'll see some examples.
Yeah, that should work out nicely. It'll be a lot of copy/pasting but that should work. Thank you, Gilad!