Closed somadzakaria closed 7 months ago
Hi @somadzakaria!
Up until very recently, I had the same problem and the solution was to use the master branch version. To do this, add the following to your pubspec.yaml:
dependency_overrides:
pdf:
git:
url: https://github.com/DavBfr/dart_pdf.git
path: pdf
ref: master
I'm having this same problem. I tried what @wbasabe0891201 recommended with no success. I am trying to load an existing pdf I have in assets and display/print it. This happens on button press.
Here is my code to push the PdfPreview:
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) {
return PdfPreview(
build: (format) => rootBundle
.load('assets/pdf/my_pdf.pdf')
.then((value) => value.buffer.asUint8List()));
},
),
);
This works when I build and run locally, but as soon as I deploy the built code to my website, I get the same result as @somadzakaria .
thanks for solution, this code its work and
same problem here
Describe the bug
the bug occurs if you have done a flutter build web and deployed it in the browser and the results are like this even though it was run in testing mode successfully but here it doesn't work
To Reproduce Code snippet to reproduce the behavior:
in code web/index.html
Expected behavior
local testing went well Screenshots Web Browser LOCAL TESTING
Screenshots Web Browser
Flutter Doctor
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context