URLs not supported - (href links)
-
We are using the below configuration
let reportTemplate: JSReportCore.Request = { template: { chrome: { format: "A4", printBackground: true }, content: template_url, engine: 'handlebars', recipe: 'chrome-pdf', pdfPassword: { password: userPassword, ownerPassword: userPassword, documentAssembly: true, printing: "HighResolution", modifying: false, fillingForms: false, copying: false, contentAccessibility: false } }, data: { stress_url: "https://forum.jsreport.net/category/2/general-forum", name: "testpdf" } }; const client = require("@jsreport/nodejs-client")("http://localhost:5488"); let report = await client.render(reportTemplate); const bodyBuffer = await report.body();
Here , i have passed two data , in pdf i get the name string and i get the url also , but not able to click and its not opening.
Datas mentioned are examples.
I have attached we used one of the pdf
Kindly suggest me a better solution based on my query.
-
FYI
<a style='color: #1B75B3' target='_blank' href={{stress_url}}>Stress</a>
This is the code in HTML.
The previous config is from nodejs
-
Here it works.
https://playground.jsreport.net/w/anon/REePfUj_Please test the output, does it work for you? (password is "password")
If that works for you, isolate the problem, try to remove the password, try to run with HTML recipe, try to test it without data and just plain link.
-
Hi again,
I found one thing that , its working fine only without password protected pdf.
So, whats the issue in password protected pdf?and the link which you shared doesnt have password protection. Since its not protected, this link is also working
-
Password protection isn't enabled when running in studio. Use the download button in playground to get the password protected pdf and test the link there. It works in Acrobat properly
https://playground.jsreport.net/w/anon/REePfUj_
-
Thanks for your solution, but this happening only when we generate with password protected pdf in our server, and this plugin is running in docker.
Have you got any idea on the above?
-
I don't. Try to run locally without docker. Does the same happen? Can you upload the password protected pdf with link that doesn't work for you? It could be just your pdf viewer issue.
-
Thanks for your support.
The link is working in local with and with and without password.
and works in docker without password.
We face this issue only in docker with password.I opened pdf with different online pdf viewer, a link just redirect to a browser with scrambled words and symbols.
-
I've tried to run the default docker image
docker run -p 5488:5488 jsreport/jsreport:4.2.0
Imported there the testing workspace
https://playground.jsreport.net/w/anon/REePfUj_And downloaded the password protected pdf with link. It still works fine in Acrobat.
Cold you try the same? Would you share somewhere the broken pdf with me?
-
This post is deleted!
-
Thanks for your support sir.
I found the issue, we were using version 3.11.3
I saw you have used version 4.2.0. When i changed, it worked.