jgraph / docker-drawio

Dockerized draw.io based on whichever is the most secure image at the time.
GNU General Public License v3.0
1.48k stars 359 forks source link

Export to PDF is creating a blank page #147

Open jjasoncool opened 9 months ago

jjasoncool commented 9 months ago

Preflight Checklist

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug draw.io docker container selfhost can't export PDF files, png and svg is normal.

To Reproduce Steps to reproduce the behavior: Just simple export PDF 圖片

Will pop page 404, and url is https://mydomain/service/0 圖片

Expected behavior A clear and concise description of what you expected to happen.

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

Additional context My Drawio is selfhost using docker-compose

  drawio:
    image: jgraph/drawio:${DWIO_VERSION}
    container_name: drawio
    restart: always
    environment:
      - DRAWIO_SELF_CONTAINED=1
      - DRAWIO_BASE_URL=https://${HOST_DOMAIN}
      - DRAWIO_SERVER_URL=https://${HOST_DOMAIN}/drawio/
      # why doesn't use EXPORT_URL to export PDF?
      - EXPORT_URL=http://image-export:8000/
    depends_on:
      - nginx

  image-export:
    image: jgraph/export-server:latest
    container_name: drawio-export
    expose:
      - "8000"
    environment:
      - DRAWIO_BASE_URL=https://${HOST_DOMAIN}
    volumes:
      - ./drawio/fonts:/usr/share/fonts/drawio
    restart: always

REF: https://github.com/jgraph/docker-drawio/blob/dev/nextcloud/docker-compose.yml

The EXPORT_URL use docker local domain like upon example, but drawio don't send request to export-server

jjasoncool commented 9 months ago

https://github.com/jgraph/docker-drawio/issues/128

m-mohamedin commented 7 months ago

The two containers need to be in the same docker network. Did you try the original docker compose file?