Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable in file name #79

Open
foscone opened this issue Jun 7, 2018 · 1 comment
Open

Variable in file name #79

foscone opened this issue Jun 7, 2018 · 1 comment

Comments

@foscone
Copy link

foscone commented Jun 7, 2018

Hi,
is there a way to use a variable for a part of file name?

I'm thinking of something like:
<button onclick="return xepOnline.Formatter.Format('container',{
pageWidth:'210mm',
pageHeight:'297mm',
render:'download',
filename: `name-${variable}`
});">PDF</button>

Thanks

@jirodearmas
Copy link

I was able to use a PHP variable for the file name of the PDF. Don't know if it's possible for a JS variable.
This is what I used.
filename:'<?php echo $filename; ?>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants