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

PDF Export issue #392

Closed
Dav31 opened this issue May 11, 2017 · 32 comments
Closed

PDF Export issue #392

Dav31 opened this issue May 11, 2017 · 32 comments
Labels

Comments

@Dav31
Copy link

Dav31 commented May 11, 2017

  • BookStack Version: 0.16.2
  • PHP Version: 5.6.30
  • MySQL Version: 5.5.52-MariaDB

Hi,
Firstly, thank's a lot for this tool.
Secondly, I have an issue with PDF exports.
When I try to export an article as PDF, all images are missing from the file created.

I tried to use WKHTMLTOPDF instead, but without success.

@ssddanbrown
Copy link
Member

Hi @Dav31, Sorry for my late reply. Were the images uploaded via BookStack or are the referencing another website? What OS is your BookStack instance running on? How large are the images?

@Dav31
Copy link
Author

Dav31 commented May 29, 2017

Hi Dan,

No problem for the late.
Yes, the images are on the server where Bookstack is hosted.
My instance is running on a CentOS server vith Ngnix webserver installed.
For the images, this is variable as no images are displayed on the PDF export, whatever how large they are.

@the4ndy
Copy link

the4ndy commented May 31, 2017

I am also experiencing this issue....i have been since starting using Book Stack almost 1 year ago....i, until recently, thought this was just the natural behavior of the PDF export feature (and was actually coming here to request that feature be added).

I am running the latest version of book stack (just updated today) 0.16.2. I am running it on Ubuntu 16.04 (up to date) with an Nginx webserver
php --version = 7.0.18
mysql --version = 14.14 distrib 5.7.18

@vladime
Copy link

vladime commented Aug 4, 2017

Same issue here... Running as a docker container.
Ubuntu 16.04
Docker 17.06.0-ce
Nginx
mysql 5.7.12

@Alwaysin
Copy link
Contributor

Alwaysin commented Aug 4, 2017

Same here!

Debian 9
PHP 7.0.19-1
10.1.23-MariaDB-9+deb9u1
apache2 2.4.25-3+deb9u2

@pabloalbrecht
Copy link

Same here... also if you export to HTML
Debian 14, Debian 16
PHP 7 / Nginx

@ssddanbrown
Copy link
Member

Hi @vladime, Are you using the popular solidnerd/docker-bookstack setup for docker or a different setup? A docker setup with this issue would be ideal for me to try to replicate the issue.

@vladime
Copy link

vladime commented Aug 6, 2017 via email

@julienmmm
Copy link

Hello,

I am also facing the same issue with the pdf exporter (Install on Fedora 25).

Also note that I have the same issue with the "Web contained file" exporter.

@Dav31
Copy link
Author

Dav31 commented Sep 7, 2017

Hello,

I just updated to 0.17.4 version.
The issue still occurs.
It seems to be directly linked to NGinx.

Regards.

@jacksonp2008
Copy link

Yes, must be NGINX related. I see this on behavior on a system that is using NGINX, but it works fine on the latest docker container without NGINX.

@nblenkhorn
Copy link

I am also seeing this behaviour on Apache. I'm using v0.17.4 as well.

@megamorf
Copy link

I'm also seeing this issue, running https://github.com/solidnerd/docker-bookstack behind Traefik as SSL terminating reverse proxy.

@ssddanbrown
Copy link
Member

Hey everyone, Can someone (That has this issue) please confirm if the 'Contained HTML File' export works for them with images?

Need to know if the issue is in the document creation or PDF rendering code...

@julienmmm
Copy link

julienmmm commented Sep 23, 2017 via email

@megamorf
Copy link

Can confirm, images are also missing with the html export.

@Dav31
Copy link
Author

Dav31 commented Sep 25, 2017

Hi Dan,

I can confirm this too.
The HTML export doesn't provide us the images.

David

ssddanbrown added a commit that referenced this issue Oct 6, 2017
Added domain check to see if possibly local even when whole url found.
Changed image fetch from file_get_contents to curl for external
resources.

Hopeful solution to #392
@ssddanbrown
Copy link
Member

Hi all, I've just deployed version v0.18.3 to specifically target this issue. I have an idea at what the problem could be but I'm not sure until it's tested by a few different people but hopefully this patch will get things working.

I did test this in a local dev container setup where images did not work before but there may be a different issue at play here.

Please let me know how it goes after updating.

@megamorf
Copy link

megamorf commented Oct 7, 2017

@ssddanbrown Nice, I'm going to test this tomorrow and let you know 👍

@megamorf
Copy link

megamorf commented Oct 7, 2017

@ssddanbrown Getting a Whoops, looks like something went wrong. error when replacing ExportService.php with your version. The error log only shows a 500 error for the GET /books/playground/page/new-page/export/pdf request.

I hope some other folks can chime in as the addition of docker with a reverse proxy certainly increases complexity.

@Alwaysin
Copy link
Contributor

Alwaysin commented Oct 8, 2017

It works for me, but I think a previous release already fixed it.

@julienmmm
Copy link

Hello,

After the upgrade to the latest version, all the images in all the documents appear as Broken link images:
image

But after editing the page and re-uploaded the images, they were correctly displayed and exported in the PDF.

Regarding the upload of images, I've been forced to upload them via the "insert image" button while I was used to do a copy/paste from a screenshot tool before. Now the copy paste does not work and BookStack displays a general error message when trying to upload images this way.
image

But I suppose it can be the subject of another issue.

@Dav31
Copy link
Author

Dav31 commented Oct 13, 2017

Hi Dan,

I just updated my BookStack installation, and the PDF export runs just fine now.
Thank you very much for your support.

David

@aljawaid
Copy link

Hello I had the same problem on 0.18.0. I updated to 0.18.5 and the export to pdf now works but as per below:

  • you must use uploaded images only
  • ctrl+c results in an unknown error, so it doesn't work anymore.
  • existing images wont work

@aljawaid
Copy link

Hello,

The only problem now is that the image does not stay (on pdf) in the position it is meant to.

@adrie-tc
Copy link

I am faced with image issues as well, using the export to PDF function.
It produces results as shown by @julienmmm having broken images.
These are with freshly uloaded images however.
Using docker and a reverse proxy (nginx).
The issue (or rather solution) is still unresolved i take it?

@adrie-tc
Copy link

FYI, beta release v0.20.0 seems to have fixed it.
Testing a random sample of PDF exports containing media does not show any issues regarding images anymore.

@ssddanbrown
Copy link
Member

Happy to hear this has been resolved for a good number of instances. Still looks like we're getting bugs though so I'll keep his open for continued discussions.

@adrie-tc
Copy link

adrie-tc commented Mar 6, 2018

I noticed the images coming from the new draw.io integration do not show up in the pdfs.
Instead they get replaced by a crossed out block image.

Normal view and HTML export are fine ofcourse.

@ghost
Copy link

ghost commented Apr 5, 2018

Hi, will this work if images are secure, i mean by using the "local_secure_setting"?

@alexmannuk
Copy link
Contributor

Appears to be fixed in all recent versions on both Apache and Nginx, no updates to the issue since 2018 so can likely be closed.

@ssddanbrown
Copy link
Member

Thanks @alexmannuk.

I'll close this off since the original issue creator expressed that their issue has been since solved.

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

No branches or pull requests