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

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

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

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

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

Post by claude vidal » Tue Jan 23, 2018 3:38 am

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: 435
Joined: Mon Jan 15, 2018 9:01 am

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

Post by Dimitar - Tracker Supp » Tue Jan 23, 2018 9:57 am

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@tracker-software.com.



Best regards, Dimitar

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal » Tue Jan 23, 2018 4:58 pm

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 32 times

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2517
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel » Tue Jan 23, 2018 5:11 pm

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

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

Willy Van Nuffel
User
Posts: 1391
Joined: Wed Jan 18, 2006 12:10 pm

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

Post by Willy Van Nuffel » Tue Jan 23, 2018 6:48 pm

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: 2517
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel » Tue Jan 23, 2018 7:27 pm

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

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal » Wed Jan 24, 2018 4:17 am

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: 13559
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 » Wed Jan 24, 2018 1:23 pm

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: 132
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal » Wed Jan 24, 2018 5:05 pm

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: 13559
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 » Wed Jan 24, 2018 5:44 pm

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 27 times

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal » Wed Jan 24, 2018 7:35 pm

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: 2517
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel » Wed Jan 24, 2018 10:04 pm

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

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

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

Post by claude vidal » Wed Jan 24, 2018 10:33 pm

Thanks Daniel and, given your join date, welcome to the Tracker support group.

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2517
Joined: Wed Jan 03, 2018 6:52 pm

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

Post by TrackerSupp-Daniel » Wed Jan 24, 2018 11:06 pm

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

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

Post Reply