• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Javascript for inserting a certain file before another to form a unit

New Here ,
Oct 14, 2024 Oct 14, 2024

Copy link to clipboard

Copied

Hi, 

I look for a Javascript. A PDF file called x, located in a specific place, is to be inserted before a PDF document called y. It should be possible to link this to a button so that the process is carried out when the button is pressed. The file should then be called like the file y with a suplement like versioning.  I would like you to provide and explain how I insert the code into Adobe Acrobat. Thanks for your help. 

 

Regards, Franz

TOPICS
Create PDFs , Edit and convert PDFs , JavaScript , PDF

Views

202

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2024 Oct 14, 2024

Copy link to clipboard

Copied

You can insert pages to a file using the insertPages command, but you can't just call this command from a button. It requires a privileged context, which usually means a script that runs from a local file on the computer, not just within the PDF file itself. Also, it will only work in Acrobat, of course, not the free Reader.

Not sure what you mean about "versioning".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Hi, thanks for the answer. Versioning means that the file is named otherwise after the inserting of the  document like a new date in the document name.  It would be no problem if there a local file must be installed. 

Is this much effort to create such a file ?

 

Regards, Franz

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

OK, that is possible, but would also require installing a script file locally.

 

If you're interested in hiring a professional to create it for you, feel free to contact me privately by clicking my user-name and then on the blue "Message" button.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Thanks for your offer. Does such a script also work with the free Adobe web  or with Adobe Reader ? The documents I talk about should be Adobe Acrobat forms. Can I block such forms to prevent further editing ?

 

Regards, Franz

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Once applied, it will work in Reader, yes. I'm not sure about the online version of Acrobat. Probably not.

You can apply a security policy to the file, but you must allow it to be modified for the script to work.

We can discuss it further privately.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Hi, a supplemental question. You talk of a file which must be on each computer locally.  On which place such a file must be saved ?

Regards, Franz

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

LATEST

In the JavaScripts folder of Acrobat or Reader. I will provide the full details of how and where to place it.

Again, we can discuss it privately.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines