Comments (6)
This is one of the reason I think WeasyPrint and CairoSVG really should be the same code base, but @liZe hasn’t been convinced so far :)
from flask-weasyprint.
It looks like this isn't a problem with CairoSVG 2.0.0. (Since commit fa3a5ed10db0e99d5f18b6d7a848d1cfa01ff883.)
from flask-weasyprint.
CairoSVG's tree can use WeasyPrint's url_fetcher
, that could help to fix the problem.
from flask-weasyprint.
@liZe could you elaborate on how to get CairoSVG to use the url_fetcher I pass to WeasyPrint? I have set base_url to "file://" because I need to serve the files straight from the filesystem, I have a custom url_fetcher function that converts media url to the absolute path on the filesystem to the file but when trying to display an SVG with included links like the one in this issue thread, it tries to fetch the media url and fails.
from flask-weasyprint.
@ptink I've just added the code needed in WeasyPrint, it should fix this issue. Could you please try WeasyPrint's current master branch
and tell me if it works for you? Note that it will only work with CairoSVG >= 2.0.0 (and thus won't work with Python 2.x).
from flask-weasyprint.
it should fix this issue.
It does fix the issue.
from flask-weasyprint.
Related Issues (20)
- __init__() got an unexpected keyword argument 'encoding' HOT 2
- Add support for page overlays to support non-trivial page headers/footers HOT 3
- Problems with support for jpg images HOT 4
- Importing images HOT 2
- Unable to install Flask-WeasyPrint - c/_cffi_backend.c:15:17: fatal error HOT 1
- Adding option to enable/disable automatic download
- Is there a way to reload Flask page automatically? HOT 2
- mobile view export does not work
- Using Flask native directives in PDF HTML render HOT 3
- RuntimeError: WeasyPrint does not support Python 2.x anymore. HOT 3
- tests broken? HOT 2
- HTML content overlapping in PDF HOT 1
- Redirecting Weasyprint errors? HOT 2
- url_fetcher does not work with Python 3.9, weasyprint 53.4 HOT 3
- AssertionError on render_pdf() HOT 4
- OSError: cannot load library 'gobject-2.0-0': error 0x7e. HOT 2
- FW fails to render base64-encoded images
- using download_filename in render_pdf changes functionality HOT 4
- Can not define custom url_fetcher HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-weasyprint.