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

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post 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?
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1778
Joined: Mon Jan 15, 2018 9:01 am

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

Post 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
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post 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.
Attachments
cvtest.pdf
(197.14 KiB) Downloaded 80 times
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

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

Post 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!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

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

Post 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.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel »

Very good points willy, Is that the case Claude?
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post 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.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

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

Post 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
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post 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?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

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

Post 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
Attachments
cvtest.pdf
(4.66 KiB) Downloaded 79 times
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post 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");
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

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

Post 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);
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
claude vidal
User
Posts: 138
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal »

Thanks Daniel and, given your join date, welcome to the Tracker support group.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel »

Thanks!
you have a great day!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply