I used the pdf package in my Flutter web project. It is completely working while I run it in debug mode, but when it is in release mode, it is not working.
I tried to put this code in the index.html file, but nothing happened.
<script type="text/javascript">
pdfjsLib.GlobalWorkerOptions.workerSrc =
"https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.worker.min.js";
pdfRenderOptions = {
// where cmaps are downloaded from
cMapUrl: "https://cdn.jsdelivr.net/npm/[email protected]/cmaps/",
// The cmaps are compressed in the case
cMapPacked: true,
// any other options for pdfjsLib.getDocument.
// params: {}
};
</script>
New contributor
Snehil Tejani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.