galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

Pre-built binaries for electron 5 #396

Closed larssvensby closed 4 years ago

larssvensby commented 5 years ago

I see there is a merged PR for this, https://github.com/galkahana/HummusJS/pull/383. But the last update on that PR is it not working.

Any progress on this?

Thanks!

galkahana commented 5 years ago

As i note there, there was a problem running the linux e mocha, so pc and mac should be fine...but i didnt release unix. While binaries may be built they cant be tested and i cant release them without testing them

julianhille commented 5 years ago

https://github.com/galkahana/HummusJS/pull/401 found the cause, its not a headless issue.

julianhille commented 4 years ago

The cause is a version conflict between electron (libpng 1.3) vs PDFWriter (libpng 1.6). This leads to a segmentation fault when doing something with PNGs.

This can be solved in short or in long:

  1. short: just disable PNG usage in PDF on linux for electron with a build define PDFHUMMUS_NO_PNG
  2. use namespaces and fix the includes / usage of functions
julianhille commented 4 years ago

I guess i've fixed it. At least in my local vagrant box its running fine without segfaulting and completing tests with these builds:

      export ELECTRON_VERSION=4.2.6
      export NODE_NVM_VERSION=10.11.0

      export ELECTRON_VERSION=1.8.7
      export NODE_NVM_VERSION=8.11.1

      export ELECTRON_VERSION=5.0.
      export NODE_NVM_VERSION=11.2.0

410