Page 1 of 1

Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 3:38 am
by claude vidal
After inserting an image in a form field of type 'image', it seems the image cannot be deleted. V7 323.2

Right clicking brings up the menu, but the 'delete' command is disabled. I see the same behavior with Reader DC, which is not reassuring.

This form is used by the marketing people and one of the things they need to do is insert a photo of the item being described by this form.

Am I missing something?

Re: Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 9:57 am
by Dimitar - Tracker Supp
Hello claude vidal,

Can I ask you to send us an example file with which you have this problem?

I also want to ask you to please send us a screenshot of what you see at your end, when this file is open?

If the file contains sensitive information, you may send it to support@pdf-xchange.com.



Best regards, Dimitar

Re: Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 4:58 pm
by claude vidal
Attached is a form with only one 'image' field. Try to delete the entry.

Just to be clear, I'm talking about an end user filling the form. I'm not referring to 'edit form' mode.

Re: Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 5:11 pm
by TrackerSupp-Daniel
Hi Claude,
For form field entries you can achieve this by selecting the form field, with the select fields tool, and then opening the fields properties panel and Clicking the Up Icon's Selection field.
Image
Then clicking the remove icon button.

Hope that helps!

Re: Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 6:48 pm
by Willy Van Nuffel
Hello,

I suppose that Claude is looking for a way to include/replace/remove a picture in a PDF form, even in case you do not have a PDF editor application.

By using the "Image" field, you can try to achieve this, but once there is an image included, it can only be replaced, not be removed with a PDF viewer.

I would like to ask Claude if he is talking about people in his own organisation or about external people.

In case it goes about internal people, then the problem can easily be resolved by giving them PDF-XChange Editor ...

In case it goes about external people, you could think about a "work-around" by using the "Attachments" option.
This option is available in almost all PDF viewer and editor applications.
You can add as much attachments as you like, and the format can be of any type.
Attachments can easily be add, removed, or be saved elsewhere, and the original format is always preserved.
The only inconvenience is that you can not get a "preview" of the included files. You have to "open" them in an external application.

Regards.

Re: Form field type 'image': can't delete once inserted

Posted: Tue Jan 23, 2018 7:27 pm
by TrackerSupp-Daniel
Very good points willy, Is that the case Claude?

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 4:17 am
by claude vidal
Sorry if I wasn't clear in my previous post.

For the sake of simplicity, let's say the form I have created with PDF-Xchange Plus is filled by personnel with only Acrobat Reader DC (I know, sad). They use the form to produce marketing inserts for clients and a requirement is the ability to add an image of the product. But what if one decides to add an image and then realizes no image should be used on that form?

I can think of a few workarounds:
  • have a 'reset form' button to clear that image, but that would clear all data entered on potentially 30 pages of that form
  • have those images as attachments, as Willy suggested, but this would be too confusing for the end client reviewing his proposal; think of a 30 page proposal, each page with an image
  • have a transparent or blank image available that would replace the image in error, but this is counter intuitive
  • have an embedded Java script against a 'clear image' button field that would delete the image; is this possible?
It should be possible to delete any variable data entered on a form. This is possible for text fields, why not image fields? This could be done by right clicking the field (to get it selected) and choosing 'delete' in the context menu. This would meet my requirement, but only if it's part of the PDF protocol, so that a user with Acrobat Reader DC for example would have this 'delete' capability.

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 1:23 pm
by Tracker Supp-Stefan
Hello claude vidal,

You can try to add a separate button that will reset just this particular image one on click.
I am afraid that if Adobe's products do not offer an option to right click and delete - it's not something we can force on them and there's no way for this defined in the specification, so a separate button to clear the image or replacing it with a transparent one are the solutions I can think of!

Regards,
Stefan

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 5:05 pm
by claude vidal
Hi Stefan,

I suspected that a Java script would end up being the only solution. Having dealt just a bit with Java, I'm not sure how to go about it.

Can anyone suggest a code snippet?

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 5:44 pm
by Tracker Supp-Stefan
Hello claude vidal,

Attached is an updated copy of your own form.
The script I used is from the JS API Reference - and it normally swaps the icons of two buttons - but with me commenting out the last line - it just sets the first field to use an icon the same as the button that resets it (none).

I presume this code can be simplified further!

Regards,
Stefan

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 7:35 pm
by claude vidal
Thanks Stefan,

I've shortened it to:

// Clear current image 'Image1'.
var f = this.getField("Image1");
f.buttonSetIcon(null);


But why does this not work?

this.resetForm("Image1");

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 10:04 pm
by TrackerSupp-Daniel
claude vidal wrote: But why does this not work?

this.resetForm("Image1");
That method assumes that the image is a form field when it actually is a button calling its own icon, you'll want to cahnge it to this:

getField("Image1").buttonSetIcon({}, 0);

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 10:33 pm
by claude vidal
Thanks Daniel and, given your join date, welcome to the Tracker support group.

Re: Form field type 'image': can't delete once inserted

Posted: Wed Jan 24, 2018 11:06 pm
by TrackerSupp-Daniel
Thanks!
you have a great day!