Edinburgh-Genome-Foundry / pdf_reports

:closed_book: Python library and CSS theme to generate PDF reports from HTML/Pug

Home Page:https://edinburgh-genome-foundry.github.io/pdf_reports/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: pdf_tools.figure_data is not working for default png

aksakalli opened this issue · comments

I ran pdf_reports in Docker

My Dockerfile:

FROM continuumio/miniconda3

RUN apt-get update --fix-missing \
    && apt-get install -y  \
         build-essential \
         libcairo2 \
         libpango-1.0-0 \
         libpangocairo-1.0-0 \
         libgdk-pixbuf2.0-0 \
         libffi-dev \
         shared-mime-info \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

ADD environment.yml /tmp/environment.yml
RUN conda env update -n base -f /tmp/environment.yml

WORKDIR /opt/pdf-report
ADD . .

CMD ["python", "main.py"]

environment.yml:

name: report-pdf

dependencies:
  - python=3.7
  - matplotlib
  - pip:
    - pdf_reports

example_with_plot_and_tables is not working for default png format. However it works when I changed it to df_tools.figure_data(figure, (6, 4), fmt='svg').

commented

What is the error?

There is no plot image in the pdf file.

There is only a warning message:

UserWarning: There are known rendering problems and missing features with cairo < 1.15.4. WeasyPrint may work with older versions, but please read the note about the needed cairo version on the "Install" page of the documentation before reporting bugs. http://weasyprint.readthedocs.io/en/latest/install.html
  'There are known rendering problems and missing features with '