lohanidamodar / pdf_viewer

A flutter plugin for handling PDF files. Works on both Android & iOS
https://pub.dev/packages/advance_pdf_viewer
BSD 3-Clause "New" or "Revised" License
61 stars 143 forks source link

401 unauthorized even the headers are presented #108

Closed alihabbash closed 2 years ago

alihabbash commented 2 years ago

I'm trying to download pdf file from a url that needs a bearer token but I get unauthorized I tried the same token in swagger and it's successfully done: What I have done is:

    document = await PDFDocument.fromURL(
      widget.title,
      headers: {
        'Authorization' : 'Bearer $accessToken',
      },
    );
jaasaria commented 1 year ago

@alihabbash got the same error. hope you could share the solution.

alihabbash commented 1 year ago

@jaasaria I actually migrated to another package which was working absolutely fine https://pub.dev/packages/syncfusion_flutter_pdfviewer