eligrey / eligrey/FileSaver.js

Has anyone been succesful saving as a PDF?

Open
#619 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

I know that we are using the saveAs function, passing in a blob, but I keep having the same issue that a lot of people have. I get the popup "ERROR: Failed to load PDF Document".

I'm saving as a excel and a txt file correctly, but PDF is not happening, no matter what.

let info = new Blob(["Hello"], {type: 'application/pdf'});
FileSaver.saveAs(info, fileName + '.pdf');

This code snipped works when I I change the type to text/plain;charset-utf-8, but it doesn't work for pdf.

Has anyone had success using SaveAs a pdf.
There was a solution that didn't work for me in #176 .

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.