GithubHelp home page GithubHelp logo

Comments (12)

Archie3d avatar Archie3d commented on July 28, 2024 1

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

Hi,
Do you mind share the pdf file that demonstrates the issue?

from qpdf.

obiwankennedy avatar obiwankennedy commented on July 28, 2024

Sure, I sent you an email. Right now.

from qpdf.

obiwankennedy avatar obiwankennedy commented on July 28, 2024

Did you get the link ?

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

Yes, I have the file, and can confirm that it does not load correctly. This will probably require upgrading to the latest pdf.js, but since the API has been changes this may take me a while. I'll keep you updated here.

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

The problem is that the pdf file mentioned here was too large (150Mb) and crashed the QtWebView process when passed as base64 string into JavaScript. Currently it is the only way to pass the file content into the browser process without violating the cross origin security measure. I had to disable the web security in the viewer to allow files to be loaded by the browser itself (omitting base64 serialization).
The pdf loads correctly now.

from qpdf.

obiwankennedy avatar obiwankennedy commented on July 28, 2024

Thanks,
I updated the project, but I can't make it to work. Have you commit all your changes ?
I'm getting this error:

js: The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
[1:2:0203/233858.098543:ERROR:channel.cc(507)] Invalid message size: 378616104

and the latest git commit is : commit ef43129

If I load the file from the GUI, it uses loadFile instead of loadData.

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

from qpdf.

obiwankennedy avatar obiwankennedy commented on July 28, 2024

Both,
I integrated your code into one of my project (GPLv2) and I can load small pdf.
But It is still not working for big ones.
So I updated your code to see if it works on my computer. But it is not.

I'm running on Ubuntu 16.04, with Qt 5.9.3, 64bits.

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

from qpdf.

Archie3d avatar Archie3d commented on July 28, 2024

Hi, I've committed a small change to explicitly specify file:// This fixes loading on Linux. Tested with Ubuntu and Qt 5.8.0.

from qpdf.

obiwankennedy avatar obiwankennedy commented on July 28, 2024

It works fine! Thank you!

To tell you a bit about my plans, I'm the lead developer of a project called: Rolisteam. It is a virtual table to play roleplaying games. And thank to your lib, I added the possibility to load and show pdf files.
As role playing games are often available in pdf. this feature is important.

I close the issue.
I will test a bit on mac and windows as well in few weeks.
Thank you.

from qpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.