Hi
can "AddFileAttachment" be configured, like default path to open or open only files per extension JPG"?
Have a fine Monday!
Forms - Execute a command - AddFileAttachment
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 958
- Joined: Mon Sep 13, 2010 10:09 am
Forms - Execute a command - AddFileAttachment
PDF-X-Change Pro German
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Forms - Execute a command - AddFileAttachment
Hello Peter2,
Are you using an Image form field? Or trying to add a file attachment to the file via code?
If you use the image field - then your users will be able to click and add an image - but that could also be e.g. from a PDF file. But I do not think there's a way to filter what is shown to the users.
As for the addFileAttachment - it's also a privileged command - so it will run from the command prompt but might not run if called from a form field.
Kind regards,
Stefan
Are you using an Image form field? Or trying to add a file attachment to the file via code?
If you use the image field - then your users will be able to click and add an image - but that could also be e.g. from a PDF file. But I do not think there's a way to filter what is shown to the users.
As for the addFileAttachment - it's also a privileged command - so it will run from the command prompt but might not run if called from a form field.
Kind regards,
Stefan
-
- User
- Posts: 958
- Joined: Mon Sep 13, 2010 10:09 am
Re: Forms - Execute a command - AddFileAttachment
Hi Stefan
I'm not sure if I understand the features of an "image form" .
When I add an image form, it contains automatically the javascript-code "event.target.buttonImportIcon();" This imports an image, selected by the user, but it is integrated into the PDF and can not exported with other data from forms.
Right?
So I added the "execute a command" option with "AddFileAttachment", and now I can add "imageA" to the form and "imageB" (or again Image A) to the file attachment.
Both works as single commands and as double-commands; if it makes sense can be discussed.
But the main question (or answer): "AddFileAttachment" has no further definitions for defaults - right?
I'm not sure if I understand the features of an "image form" .
When I add an image form, it contains automatically the javascript-code "event.target.buttonImportIcon();" This imports an image, selected by the user, but it is integrated into the PDF and can not exported with other data from forms.
Right?
So I added the "execute a command" option with "AddFileAttachment", and now I can add "imageA" to the form and "imageB" (or again Image A) to the file attachment.
Both works as single commands and as double-commands; if it makes sense can be discussed.
But the main question (or answer): "AddFileAttachment" has no further definitions for defaults - right?
PDF-X-Change Pro German
-
- Site Admin
- Posts: 11566
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Forms - Execute a command - AddFileAttachment
Hello, Peter2
Kind regards,
You have that right, there is currently no way to export the images embedded as an icon inside a button.
That would be correct, the command has no customizable defaults. The dev team did confirm for me however that like other "open file" features, if does remember the last used location during runtime.
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 958
- Joined: Mon Sep 13, 2010 10:09 am
-
- Site Admin
- Posts: 7388
- Joined: Wed Mar 25, 2009 10:37 pm
Forms - Execute a command - AddFileAttachment

Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com