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

change default download file name #301

Open
tingtingcheng6 opened this issue Apr 22, 2024 · 1 comment · May be fixed by #311
Open

change default download file name #301

tingtingcheng6 opened this issue Apr 22, 2024 · 1 comment · May be fixed by #311

Comments

@tingtingcheng6
Copy link

Hello!

In the base64 scenario, how to change the default download file name?

PDFObject.embed(base64, '#pdfRoot');

Thanks a lot for the response

@pipwerks
Copy link
Owner

Hello

Unfortunately, the file name 'file.pdf' is currently hardcoded. You can fork the source and edit line 376 to accept a variable if needed. I will make a note to try and make this an option in the next update.

imjosh added a commit to imjosh/PDFObject that referenced this issue Jan 28, 2025
Can set the filename explicitly or optionally get it from the data uri's metadata
Resolves pipwerks#301
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

Successfully merging a pull request may close this issue.

2 participants