Copy link to clipboard
Copied
Attach pdf in to a pdf using javascript. Sample code please...
Copy link to clipboard
Copied
Go to the "Security (Enhanced)" tab of the Preferences dialog and uncheck the "Enable Enhanced Security" box, as well as "View in Protected Mode", "Run in AppContainer" or anything else with a similar name.
Copy link to clipboard
Copied
Please don't ask for sample code. What code have you tried? Perhaps we can help you fix it. Or do you want to know if it's possible, and which methods to use?
Copy link to clipboard
Copied
Here is my code
var attachPreparerChecklist = app.trustedFunction( function()
{
app.beginPriv();
var preparerChecklist_Path = global.checkListBase_Path + "2022 Preparer Checklist.pdf";
(global.lastDoc).importDataObject("Preparer Checklist", preparerChecklist_Path);
app.alert("\nPreparer Checklist is Attached Successfully", 1, 0, "Preparer Checklist Attachment");
app.endPriv();
});
global.lastDoc is nothing but "this"
preparerChecklist_Path is "/wlt-data-1/Adobe/AdobeAutomationDontDelete/04_ChecklistBase/2022 Fresh Return Checklist.pdf"
It is woring fine in Acrobat X Std, but not in Acrobat DC Pro. Also not throwing any errors.
Note: This is a folder level javascript plugin.
Copy link to clipboard
Copied
Here is my code
var attachPreparerChecklist = app.trustedFunction( function()
{
app.beginPriv();
var preparerChecklist_Path = global.checkListBase_Path + "2022 Preparer Checklist.pdf";
(global.lastDoc).importDataObject("Preparer Checklist", preparerChecklist_Path);
app.alert("\nPreparer Checklist is Attached Successfully", 1, 0, "Preparer Checklist Attachment");
app.endPriv();
});
global.lastDoc is nothing but "this"
preparerChecklist_Path is "/wlt-data-1/Adobe/AdobeAutomationDontDelete/04_ChecklistBase/2022 Preparer Checklist.pdf"
It is woring fine in Acrobat X Std, but not in Acrobat DC Pro. Also not throwing any errors.
Note: This is a folder level javascript plugin.
Copy link to clipboard
Copied
This is intolerably rude.
See https://community.adobe.com/t5/acrobat-discussions/acrobat-javascript/td-p/13752918
Please do NOT start new discussions, without linking to the old one.
Please do NOT register new users to make it look like a new discussion.
Or, please NEVER allow multiple members of the same team to start the same discussion separately.
Copy link to clipboard
Copied
Then what is the error in my code? The same code worikng fine in Acrobat X Std. But not working or trrowing any error in Acrobat DC Pro. Is this a bug in Acrobat Javascript plugin. I have creatred more than 70+ pluginns in acrobat X std. This one plugin is struggling me a lot. Please help. Thanks.
Copy link to clipboard
Copied
Go to the "Security (Enhanced)" tab of the Preferences dialog and uncheck the "Enable Enhanced Security" box, as well as "View in Protected Mode", "Run in AppContainer" or anything else with a similar name.
Copy link to clipboard
Copied
Thats a Great Help. It is woking fine now. Thank you so much! : )

