Export PDF file with Image not found or type unknown #743

Closed
opened 2026-02-04 22:08:07 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @sovankiry on GitHub (Jul 11, 2018).

For Feature Requests

Desired Feature:

For Bug Reports

  • BookStack Version (Found in settings, Please don't put 'latest'): BookStack v0.22.0
  • PHP Version:
  • MySQL Version:
Expected Behavior

Images must show as view.

Current Behavior
Steps to Reproduce
  1. Export with pdf
  2. PDF File

Content in Web

screenshot-2018-07-11-18-04-00

Content in PDF file after export

screenshot from 2018-07-11 18-07-47

Originally created by @sovankiry on GitHub (Jul 11, 2018). ### For Feature Requests Desired Feature: ### For Bug Reports * BookStack Version *(Found in settings, Please don't put 'latest')*: BookStack v0.22.0 * PHP Version: * MySQL Version: ##### Expected Behavior Images must show as view. ##### Current Behavior ##### Steps to Reproduce 1. Export with pdf 2. PDF File ### Content in Web ![screenshot-2018-07-11-18-04-00](https://user-images.githubusercontent.com/35448386/42567800-2bb4f170-8535-11e8-8212-00d9463e64b2.png) ### Content in PDF file after export ![screenshot from 2018-07-11 18-07-47](https://user-images.githubusercontent.com/35448386/42567863-648c4e94-8535-11e8-8893-90dda87dba2d.png)
Author
Owner

@ssddanbrown commented on GitHub (Jul 14, 2018):

Hi @rimsovankiry, Can you provide any details on how you are hosting BookStack?
Is it behind a reverse proxy?
Using a docker container?

Have you changed the image or storage config at all for your BookStack instance?

@ssddanbrown commented on GitHub (Jul 14, 2018): Hi @rimsovankiry, Can you provide any details on how you are hosting BookStack? Is it behind a reverse proxy? Using a docker container? Have you changed the image or storage config at all for your BookStack instance?
Author
Owner

@sovankiry commented on GitHub (Jul 20, 2018):

Dear @ssddanbrown,
Regard to your question, We've installed by docker container and we do not change any default configuration.

@sovankiry commented on GitHub (Jul 20, 2018): Dear @ssddanbrown, Regard to your question, We've installed by docker container and we do not change any default configuration.
Author
Owner

@h0cin commented on GitHub (Aug 21, 2018):

I had almost the same issue (excluding the squares that are shown in the printscreen), same message "Image not found or type unknown" as the base64 was malformed (empty), the name of the picture appeared on the PDF but no image itself.

I'm using a docker container, with BookStack v0.21.0, SSL with a valid fqdn certificate and
jwilder/nginx-proxy in front of it using a VIRTUAL_HOSTNAME=fqdn variable.

Solved the issue by setting on .env the APP_URL to the complete BookStack APP URL
used in the VIRTUAL_HOSTNAME Variable of the nginx-proxy like this:

APP_URL=https://fqdn

This fixed both issues with images not showing in the "Contained Web File" and the "PDF File" section.

Thank you for this awesome piece of software!

@h0cin commented on GitHub (Aug 21, 2018): I had almost the same issue (excluding the squares that are shown in the printscreen), same message "Image not found or type unknown" as the base64 was malformed (empty), the name of the picture appeared on the PDF but no image itself. I'm using a docker container, with BookStack v0.21.0, SSL with a valid fqdn certificate and jwilder/nginx-proxy in front of it using a VIRTUAL_HOSTNAME=fqdn variable. Solved the issue by setting on .env the APP_URL to the complete BookStack APP URL used in the VIRTUAL_HOSTNAME Variable of the nginx-proxy like this: APP_URL=https://fqdn This fixed both issues with images not showing in the "Contained Web File" and the "PDF File" section. Thank you for this awesome piece of software!
Author
Owner

@sovankiry commented on GitHub (Aug 21, 2018):

Thank you @h0cin Let's me try with your solution.

@sovankiry commented on GitHub (Aug 21, 2018): Thank you @h0cin Let's me try with your solution.
Author
Owner

@sovankiry commented on GitHub (Aug 21, 2018):

Could you tell me the path of file .env? @h0cin

@sovankiry commented on GitHub (Aug 21, 2018): Could you tell me the path of file .env? @h0cin
Author
Owner

@h0cin commented on GitHub (Aug 21, 2018):

I'm using docker.io/solidnerd/bookstack:0.21.0 and the .env file is located on:
/var/www/bookstack/.evn

@h0cin commented on GitHub (Aug 21, 2018): I'm using docker.io/solidnerd/bookstack:0.21.0 and the .env file is located on: /var/www/bookstack/.evn
Author
Owner

@ghost commented on GitHub (Feb 15, 2019):

Hello!

I've made changes as @h0cin suggested, because I got same issue as @rimsovankiry
It fixed this bug in "Contained Web File" export type, but not in PDF. I am not using jwilder/nginx-proxy, so I can't apply VIRTUAL_HOSTNAME variable per-se (I believe thats the "server_name" in "server" block), but I applied my fqdn to APP_URL in .env, which is also written in "server_name" in my config from /etc/nginx/sites-available/

@ghost commented on GitHub (Feb 15, 2019): Hello! I've made changes as @h0cin suggested, because I got same issue as @rimsovankiry It fixed this bug in "Contained Web File" export type, but not in PDF. I am not using jwilder/nginx-proxy, so I can't apply VIRTUAL_HOSTNAME variable per-se (I believe thats the "server_name" in "server" block), but I applied my fqdn to APP_URL in .env, which is also written in "server_name" in my config from /etc/nginx/sites-available/
Author
Owner

@chasgames commented on GitHub (Jul 8, 2019):

We had the same bug for drawings, but a different cause, we had a user with an apostrophe ` in their name. Once that symbol was removed and the drawing then is re-edited to update the image URL, all is well.

@chasgames commented on GitHub (Jul 8, 2019): We had the same bug for drawings, but a different cause, we had a user with an apostrophe ` in their name. Once that symbol was removed and the drawing then is re-edited to update the image URL, all is well.
Author
Owner

@ssddanbrown commented on GitHub (Nov 8, 2022):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Nov 8, 2022): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#743