PDF Export issue #392

Closed
opened 2017-05-11 14:56:28 +02:00 by Dav31 · 32 comments
Dav31 commented 2017-05-11 14:56:28 +02:00 (Migrated from github.com)
  • 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.

* 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 commented 2017-05-28 12:31:05 +02:00 (Migrated from github.com)

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?

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 commented 2017-05-29 14:27:26 +02:00 (Migrated from github.com)

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.

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 commented 2017-05-31 20:12:56 +02:00 (Migrated from github.com)

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

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 commented 2017-08-04 12:16:32 +02:00 (Migrated from github.com)

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

Same issue here... Running as a docker container. Ubuntu 16.04 Docker 17.06.0-ce Nginx mysql 5.7.12
Alwaysin commented 2017-08-04 12:27:55 +02:00 (Migrated from github.com)

Same here!

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

Same here! Debian 9 PHP 7.0.19-1 10.1.23-MariaDB-9+deb9u1 apache2 2.4.25-3+deb9u2
pabloalbrecht commented 2017-08-05 14:42:13 +02:00 (Migrated from github.com)

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

Same here... also if you export to HTML Debian 14, Debian 16 PHP 7 / Nginx
ssddanbrown commented 2017-08-06 14:29:05 +02:00 (Migrated from github.com)

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.

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 commented 2017-08-06 17:17:24 +02:00 (Migrated from github.com)

Hi Dan, yes, I am using solidnerd docker with BS 0.17.1. One detail which is might be important: I am using Ngnix, so the whole path looks like this domain.com/wiki/restofthebookstackpath/

On 6. Aug 2017, at 14:29, Dan Brown notifications@github.com wrote:

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.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi Dan, yes, I am using solidnerd docker with BS 0.17.1. One detail which is might be important: I am using Ngnix, so the whole path looks like this domain.com/wiki/restofthebookstackpath/ > On 6. Aug 2017, at 14:29, Dan Brown <notifications@github.com> wrote: > > 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. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or mute the thread. >
julienmmm commented 2017-08-21 07:40:11 +02:00 (Migrated from github.com)

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.

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 commented 2017-09-07 16:59:40 +02:00 (Migrated from github.com)

Hello,

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

Regards.

Hello, I just updated to 0.17.4 version. The issue still occurs. It seems to be directly linked to NGinx. Regards.
jacksonp2008 commented 2017-09-08 15:53:50 +02:00 (Migrated from github.com)

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.

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 commented 2017-09-11 15:15:57 +02:00 (Migrated from github.com)

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

I am also seeing this behaviour on Apache. I'm using v0.17.4 as well.
megamorf commented 2017-09-12 04:45:50 +02:00 (Migrated from github.com)

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

I'm also seeing this issue, running https://github.com/solidnerd/docker-bookstack behind Traefik as SSL terminating reverse proxy.
ssddanbrown commented 2017-09-23 10:56:08 +02:00 (Migrated from github.com)

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...

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 commented 2017-09-23 15:34:16 +02:00 (Migrated from github.com)

Hello,

I am facing the same issue with the self contained html export.

Julien

Le 23 sept. 2017 10:56, "Dan Brown" notifications@github.com a écrit :

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...


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/BookStackApp/BookStack/issues/392#issuecomment-331621108,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXg9t7S7ZoXDttVjkLBfUpUhwXcTAq7-ks5slMeqgaJpZM4NX9PJ
.

Hello, I am facing the same issue with the self contained html export. Julien Le 23 sept. 2017 10:56, "Dan Brown" <notifications@github.com> a écrit : > 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... > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/BookStackApp/BookStack/issues/392#issuecomment-331621108>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AXg9t7S7ZoXDttVjkLBfUpUhwXcTAq7-ks5slMeqgaJpZM4NX9PJ> > . >
megamorf commented 2017-09-24 16:53:34 +02:00 (Migrated from github.com)

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

Can confirm, images are also missing with the html export.
Dav31 commented 2017-09-25 09:36:46 +02:00 (Migrated from github.com)

Hi Dan,

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

David

Hi Dan, I can confirm this too. The HTML export doesn't provide us the images. David
ssddanbrown commented 2017-10-06 22:11:48 +02:00 (Migrated from github.com)

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.

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 commented 2017-10-07 04:06:23 +02:00 (Migrated from github.com)

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

@ssddanbrown Nice, I'm going to test this tomorrow and let you know 👍
megamorf commented 2017-10-07 22:10:44 +02:00 (Migrated from github.com)

@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.

@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 commented 2017-10-08 16:24:53 +02:00 (Migrated from github.com)

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

It works for me, but I think a previous release already fixed it.
julienmmm commented 2017-10-09 08:14:25 +02:00 (Migrated from github.com)

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.

Hello, After the upgrade to the latest version, all the images in all the documents appear as Broken link images: ![image](https://user-images.githubusercontent.com/24657335/31326350-a31f9320-acc6-11e7-9033-4f41672ce104.png) 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](https://user-images.githubusercontent.com/24657335/31326693-ce738ab0-acc9-11e7-8b02-8d7a1ef20b4b.png) But I suppose it can be the subject of another issue.
Dav31 commented 2017-10-13 10:30:33 +02:00 (Migrated from github.com)

Hi Dan,

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

David

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 commented 2017-11-26 13:03:06 +01:00 (Migrated from github.com)

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
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 commented 2017-11-29 12:43:53 +01:00 (Migrated from github.com)

Hello,

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

Hello, The only problem now is that the image does not stay (on pdf) in the position it is meant to.
adrie-tc commented 2018-01-18 15:11:51 +01:00 (Migrated from github.com)

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?

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 commented 2018-02-20 13:50:47 +01:00 (Migrated from github.com)

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.

FYI, [beta release v0.20.0](https://www.bookstackapp.com/blog/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 commented 2018-03-05 21:10:22 +01:00 (Migrated from github.com)

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.

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 commented 2018-03-06 09:08:05 +01:00 (Migrated from github.com)

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.

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 commented 2018-04-05 19:52:02 +02:00 (Migrated from github.com)

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

Hi, will this work if images are secure, i mean by using the "local_secure_setting"?
alexmannuk commented 2020-08-24 22:01:21 +02:00 (Migrated from github.com)

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.

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 commented 2021-05-04 22:01:50 +02:00 (Migrated from github.com)

Thanks @alexmannuk.

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

Thanks @alexmannuk. I'll close this off since the original issue creator expressed that their issue has been since solved.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bookstack/bookstack#392
No description provided.