Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Button to Hide an Image
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Button to Hide an Image

 Post Reply Post Reply
Author
TJD59 View Drop Down
New Member
New Member


Joined: 02 Jun 2015
Points: 3
Post Options Post Options   Quote TJD59 Quote  Post ReplyReply Direct Link To This Post Topic: Button to Hide an Image
    Posted: 02 Jun 2015 at 2:40am
I am new to this forum and a newbie to using javascript. I thought my issue would be easy to solve but I've spent hours combing the net and can't find the answer. Cry

Here's my challenge: I am creating a fillable pdf form in Adobe Acrobat Standard X. I would like to place a logo on the page that the user can show or hide (maybe with the click of a button?). When the user prints the form, I would like it to print either showing the logo or leaving it hidden (based on the state the user selected). Is this possible? Any suggestions would be very much appreciated!
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2015 at 9:54am
Assuming the image is a part of the static contents of the file, you can't directly show or hide it using a script. It simply doesn't have access to that level of the the file.
However, what you can do is use a form field to cover the image and then show that field when you want to hide the picture, and hide it when you want the picture to be visible. The field should be a read-only button with a white (or whatever color) fill color.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
TJD59 View Drop Down
New Member
New Member


Joined: 02 Jun 2015
Points: 3
Post Options Post Options   Quote TJD59 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2015 at 4:47pm

Thank you for your quick response. I'm hoping to have the user show or hide it in Adobe Reader. Is that possible? Thanks for your patience!

Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2015 at 4:52pm
The solution I've described will work in Reader.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
TJD59 View Drop Down
New Member
New Member


Joined: 02 Jun 2015
Points: 3
Post Options Post Options   Quote TJD59 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2015 at 5:01pm
Thank you - Here's what I've done so far - I created a white text field, covered the logo and set the mouse up to hide it until the user clicks on the field. But the problem is it seems it is a single event, meaning that once it shows, the user can't hide it again. Is there a way to toggle the text field on or off?
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2015 at 5:02pm
In your code you can check the current display value of the field and then toggle it.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
datalogics_pgallot View Drop Down
New Member
New Member
Avatar

Joined: 06 Mar 2015
Location: Chicago
Points: 15
Post Options Post Options   Quote datalogics_pgallot Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jun 2015 at 5:31pm
An alternate strategy for this scenario would be to create a layer (aka OCG: Optional Content Group) in which to place your logo.

This article discusses creating layers in Acrobat, albeit in an older version of Acrobat.

Datalogics Enterprise Support Engineer for APDFL, PDF Java Toolkit, and PDF WebAPI.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.064 seconds.