Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEP Community revamp live on 1st Feb, 2023
SOLVED

Embed API loaded js script doesn't work

Avatar

Level 1

Hello everyone,

 

I try to load an JS script into a fdf file to make some control on the form. I load the js script with this piece of code (Java) :

PDDocument document = PDDocument.load(pdfTemplateFile);
PDActionJavaScript javascript = new PDActionJavaScript(code);
document.getDocumentCatalog().setOpenAction(javascript);

"PDDocument" and "PDActionJavaScript" are component from the library : org.apache.pdfbox:pdfbox-app:2.0.15.

 

When i open the pdf generated with a standard navigator viewer (chrome or Firefox), the javascript code will be played and worked as expected.

 

But when i open the same pdf file with the Adobe PDF Embed API, it doesn't work. I follow the Sample find in this repository : https://github.com/adobe/pdf-embed-api-samples.git and specialy the React samples that was interest me. I just replace the default pdf of the sample with the pdf generated.

 

Some of you have an idea ?

 

Thank for your regards.

 

Florian BREMEC.

fbremec@ads31.com

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi @Florian-BREMEC,


This forum is for questions or issues related to the experience platform SDK's. Could you post your question on the document cloud / pdf forums at https://community.adobe.com/t5/acrobat/ct-p/ct-acrobat?page=1&sort=latest_replies&lang=all&tabid=all...

 

Thanks,

Ryan

View solution in original post

0 Replies

Avatar

Correct answer by
Employee

Hi @Florian-BREMEC,


This forum is for questions or issues related to the experience platform SDK's. Could you post your question on the document cloud / pdf forums at https://community.adobe.com/t5/acrobat/ct-p/ct-acrobat?page=1&sort=latest_replies&lang=all&tabid=all...

 

Thanks,

Ryan