nigma / django-easy-pdf

PDF views, the easy way
MIT License
364 stars 138 forks source link

WARNING: There are known rendering problems with Cairo <= 1.14.0 #40

Open bluesurfer opened 7 years ago

bluesurfer commented 7 years ago

The dependencies listed in the dockerfile:

 DEPS=' \
        bash \
        gettext \
        libcairo2 \
        libffi-dev \
        libpango1.0-0 \
        libpangoft2-1.0-0 \
        libgdk-pixbuf2.0-0 \
        libxml2-dev \
        libxslt1-dev \
        shared-mime-info \
        fontconfig \
        libfontconfig1 \
    ' \

Are causing the following warning messages:

WARNING: There are known rendering problems with Cairo <= 1.14.0
WARNING: @font-face is currently not supported on Windows

Everything is working fine but maybe we should change the dependencies to a newer version?

P.S: can't wait for 0.2.0 release, great work! this library is definitely the less painful of all those that I have found (django-wkhtmltopdf, reportlab)

itJunky commented 6 years ago

Same =(

DiegusMiestro commented 6 years ago

Me too. I'm developing an application that generates a PDF document to be printed and signed. So far the development has not been affected and I'm creating the PDF, but I fear that later this may lead to a problem that will disrupt the application.

bluesurfer commented 6 years ago

I have solved this issue when I switch to Alpine Linux. Here's my dockerfile:

FROM python:3.6-alpine3.7

ENV PYTHONUNBUFFERED 1

RUN  addgroup -S django \
    && adduser -S -G  django django

# OS dependencies
RUN apk update \
    # psycopg2 dependencies
    && apk add --virtual g++ build-deps gcc python3-dev musl-dev \
    && apk add postgresql-dev \
     # Pillow dependencies
    && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
    # CFFI dependencies
    && apk add libressl-dev libressl libffi-dev py-cffi \
    # Weasyprint dependencies
    && apk add cairo pango cairo-dev pango-dev gdk-pixbuf freetype ttf-freefont

Also, I have uninstalled this package since it is not maintained anymore. I am using only WeasyPrint to create my PDF rendering functions.