The package syncfusion_flutter_pdfviewer
just released on May 19th and I wanted to use it to port my app into web but it doesn't work. My code looks like this:
class _VPMontagState extends State<VPMontag> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('mytext'),
),
body: Container(
child: SfPdfViewer.network('myurl'),
)
);
}
}
They also wrote in their documentation that you should add
<script src="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.min.js"></script>
<script type="text/javascript">
pdfjsLib.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js";
</script>
into the index.html
. I did that and it didn't work anyways.