question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

electron-pdf returns successfully, but file isn't created

See original GitHub issue

I’m using electron-pdf on CLI on ubuntu 14.04. The process runs, returns successfully (exit code = 0), but the PDF file is not created.

The command I run: /path/to/electron-pdf "http://localhost:1470/api/v1/debt/58cc28ff1053451d05afa5fc,58cc28ff1053451d05afa5f9/letters" "/home/decipher/apps/debdeck-app/pdf/a02c088d63bac6e44f4743e52a0a4d135244f843.pdf"

The result: File "/home/decipher/apps/debdeck-app/pdf/a02c088d63bac6e44f4743e52a0a4d135244f843.pdf" doesn't exist

Any ideas?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
codecounselorcommented, Mar 22, 2017

Good call, this is well documented other places. For future reference of anyone who finds this issue, this is what I had configured in a Dockerfile a little while back when I was starting to test electron-pdf across a variety of platforms.

RUN apt-get update && \
  apt-get install -y \
# Required for Headless Electron/Chromium Rendering
  libgconf2-4 libxss1 libxtst6 libnss3 libasound2 xvfb dbus-x11 libgtk2.0-common &&\
# Get rid of files we don't need
  rm -rf /var/lib/apt/lists/*

I had commented this out, but some may need them:

# libnotify4 xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic fonts-font-awesome fonts-takao-mincho
1reaction
fabdrolcommented, Mar 22, 2017

I just figured it out… I needed to install a bunch of dependencies for V8 (libgtk, libssn, libasound2, etc)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to view a PDF in an Electron BrowserWindow?
Just make sure that the path ( fullPath ) is always correctly resolved with something like path.resolve(app.getAppPath(), filePath) as it might ...
Read more >
Printing reports in an Electron Packaged App
Hello, I am currently creating an Angular Application in which we implement DevExpress Reporting. The Angular App is wrapped in Electron.
Read more >
Learning to love Electron | Kong Inc.
In Electron you can accomplish PDF rendering a couple of different ways: You can use a Node Native Extension.
Read more >
Flow runs successfully but the file is not created
I'm creating a form in power apps connected to an excel document, then I'm using a flow to create an html file and...
Read more >
Loading errors | PDFTron for Web
If you're trying to load a PDF document and the URL doesn't have an extension you might get this error. You can let...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found