Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error converting to PDF, Error: write EPIPE #306

Open
rmfberlin opened this issue May 1, 2020 · 7 comments
Open

Error converting to PDF, Error: write EPIPE #306

rmfberlin opened this issue May 1, 2020 · 7 comments

Comments

@rmfberlin
Copy link

Description

Error while export document to PDF.
Error message: Error converting to PDF, Error: write EPIPE

System Information

I'm using VS Code 1.44.2, AsciiDoc 2.7.15 and installed wkhtmltopdf v. 0.12.5 for MacOS Catalina

To Reproduce

I wrote a simple Test.adoc and tried to save to HTML: works
Tried to export to PDF: Error message

Thanks
Best regards
Rainer

@sesceu
Copy link

sesceu commented May 6, 2020

+1

@danyill
Copy link
Contributor

danyill commented May 10, 2020

@rmfberlin I'm sorry you've had this problem.

It's difficult for me to pinpoint the problem without knowing more about the system you are running (windows/mac/linux?) and the document you are having difficulty with.

Can you share your document -- or even better -- provide a minimal Asciidoc file which replicates the problem so we can reproduce this?

The wkhtmltopdf method used to produce pdfs is somewhat brittle and we are several versions out of date, see #239 / #252 for problems/options but upstream has not provided accessible binaries for a couple of years.

I'd suggest trying to set the data-uri attribute in your document (see the user manual) and seeing if that helps.

I'd also suggest trying installing asciidoctor-pdf and using this instead.

Finally I believe you could install and try https://github.com/Mogztter/asciidoctor-pdf.js as I've tested this and know it works a few months ago (but it's an alpha/beta project and hasn't had a stable release yet).

@ramlaxman
Copy link

In continuation with issue of @rmfberlin, my specification are as follows:
OS: Windows 10 Home 64 bits.
Doc: Asciidoc with images from other folder.

They are able to preview easily but when trying for 'export as PDF', error converting to PDF pop ups.

@rmfberlin
Copy link
Author

@rmfberlin I'm sorry you've had this problem.

It's difficult for me to pinpoint the problem without knowing more about the system you are running (windows/mac/linux?) and the document you are having difficulty with.

MacOS Catalina 10.15.4

Can you share your document -- or even better -- provide a minimal Asciidoc file which replicates the problem so we can reproduce this?

`= testfile for pdf error
:asciidoc-version: 2.0.10 [https://asciidoctor.org]
:lang: de
:asciidoc-file: test.adoc
:data-uri:
:docdate: 03.05.2020
:revnumber: 0.8
:revdate: 09.05.2020
:revnumber: 1.0
:revremark: test to convert to pdf

== Test-Doc

Some text

And more text

== new section
section text`

I'd suggest trying to set the data-uri attribute in your document (see the user manual) and seeing if that helps.

I'd also suggest trying installing asciidoctor-pdf and using this instead.

Finally I believe you could install and try https://github.com/Mogztter/asciidoctor-pdf.js as I've tested this and know it works a few months ago (but it's an alpha/beta project and hasn't had a stable release yet).

With asciidoctor-pdf from command line all my files work fine.

@rmfberlin rmfberlin reopened this May 10, 2020
@rmfberlin
Copy link
Author

sorry, my mistake to close.

@danyill
Copy link
Contributor

danyill commented May 12, 2020

Thanks @rmfberlin for providing that information. At least on my machine (Linux, Ubuntu) that test document renders correctly with wkhtmltopdf from this extension. I'm afraid I don't have Mac hardware so will struggle to test this further.

The output from wkhtmltopdf when I run the binary directly is in this gist but it produces a clean PDF file: test.pdf

You could try saving the document as HTML and then extracting and running the MacOS binary directly on the file and let us know the results of that. The binary can be found here.

@ramlaxman I can test with Windows, can you provide a minimal example document?

@Erich-Chen
Copy link

My case is fixed by removing the wkhtmltopdf* files and downloading it again.

mv ~/.vscode/extensions/asciidoctor.asciidoctor-vscode-2.8.3/dist/src/commands/wkhtmltopdf* ~/tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants