Guillaume Ayoub
84dd9b8002
Merge branch 'master' into namedpages
2017-08-02 23:52:17 +02:00
Guillaume Ayoub
fcd6bf7070
Clean and document the logging levels
...
Related to #488 .
2017-07-25 13:59:56 +02:00
Guillaume Ayoub
f856edb3b4
Log the document generation steps
...
Related to #488 .
2017-07-25 13:58:18 +02:00
Guillaume Ayoub
344cb08f60
Don't copy styles when copying boxes, improve memory management
...
Style is not copied anymore when boxes are duplicated. Style dicts are not
modified anymore during the layout, as it was before for some properties:
- margins, borders and paddings when the box was split between two
pages (useless as these computed values are stored directly in the box),
- top borders were changed in tables (useless for the same reason),
- bookmark labels and string sets are now stored in the box.
This commit can introduce very subtle bugs that are hard to debug. In the
future, we should try to freeze the style dicts before the layout.
Related to #70 .
2017-07-22 13:51:03 +02:00
Guillaume Ayoub
c004dc47d1
Use a custom object instead of constants for page pseudo-classes
...
This is a first step to lazily get the page styles and support named pages.
2017-07-17 22:48:21 +02:00
Guillaume Ayoub
ba26fa34a9
Use ElementTree's elements as much as possible
2017-07-03 15:19:05 +02:00
Guillaume Ayoub
df50204f3e
Remove unsupported source lines
2017-07-01 00:28:14 +02:00
Guillaume Ayoub
f349f8b276
Make HTML inherit from cssselect2.ElementWrapper
2017-06-30 20:12:53 +02:00
Guillaume Ayoub
4a5fa84f9f
Use cssselect2 instead of cssselect
2017-06-30 17:54:02 +02:00
Guillaume Ayoub
b53d9d3b1f
Cut long lines, remove an old note
2017-04-29 10:41:53 +02:00
Hugh Secker-Walker
9376c95071
Fix typos and awkward grammar on Tutorial and API pages.
2017-04-28 14:36:14 -04:00
Tarashish Mishra
0fa6838c77
Let the logging module do the string interpolation
2017-03-28 13:02:50 +05:30
Guillaume Ayoub
4f4b4ed598
Use isort in tests
2017-03-25 00:33:36 +01:00
Guillaume Ayoub
152193cf77
Add the font configuration in LayoutContext
...
The font configuration is available (almost) everywhere it's needed,
@font-face doesn't rely on a global state anymore.
2016-10-27 17:36:24 +02:00
Guillaume Ayoub
d7b89dbb68
Clean the font config after rendering the document
2016-10-27 11:41:34 +02:00
Guillaume Ayoub
b5103d349f
Create a new font config for each document
2016-10-26 17:17:00 +02:00
Guillaume Ayoub
b2a5d7a98f
Add a presentational-hints option
2016-08-30 18:15:30 +02:00
Guillaume Ayoub
62c39b8029
Fix links with non-ASCII characters for Python 2
...
Fix #322 .
2016-08-17 18:30:53 +02:00
Guillaume Ayoub
59e4fb5146
Change the way filenames are managed
2016-08-16 22:15:18 +02:00
Alex Eftimie
93f497bf11
Replace utf8 with utf-8 for gettext compatibility
2015-11-25 09:38:01 +02:00
Guillaume Ayoub
2d7f68e8a1
Use the same simple code for bookmark-labels and string-sets
2015-05-01 21:14:10 +02:00
Guillaume Ayoub
94ca04812e
Cut long line
2015-04-29 09:32:33 +02:00
Johannes Duschl
94067db7ca
This should fix #202 .
2015-04-28 19:19:44 +02:00
Simon Sapin
dd9ff47c94
Fix code formatting
2014-04-27 18:16:14 +01:00
Colin Leitner
da916a32a6
Added an Attachment
class for attachments provided through the API instead of the URL/description tuples
2014-04-25 23:35:43 +02:00
Colin Leitner
8c06243c46
Use the new element_has_link_type
instead of parsing the rel
attribute manually.
2014-04-23 17:10:31 +02:00
Colin Leitner
a084a5b517
Refactored attachments
attribute from the HTML
class to an argument for write_pdf
2014-04-22 20:40:46 +02:00
Colin Leitner
846a5bedb4
Refactored the url_fetcher
argument for write_pdf
to an attribute of the Document
class
2014-04-18 15:11:45 +02:00
Colin Leitner
7ac01f0519
Added support for PDF file annotations.
2014-04-04 18:46:00 +02:00
Colin Leitner
e458380190
Added support for PDF attachments (v2)
2014-04-04 12:32:21 +02:00
Simon Sapin
c34221d215
2014.
2014-01-10 14:27:02 +00:00
Florian Mounier
e3d7bad55b
Be careful logging.warn is deprecated
2013-08-19 14:38:09 +02:00
Simon Sapin
eb08733938
Add PDF metadata parsed from HTML. Fix #77 .
...
<title> → /Title
<meta name=author> → /Author
<meta name=description> → /Subject
<meta name=keywords> → /Keywords
<meta name=generator> → /Creator
<meta name=dcterms.created> → /CreationDate
<meta name=dcterms.modified> → /ModDate
"WeasyPrint vX.Y" → /Producer
2013-07-22 00:13:11 +01:00
Simon Sapin
52c06894b7
Docs: add an example combining documents into one PDF file.
2013-07-14 09:22:04 +01:00
Simon Sapin
1d1bf9cdc9
Flake8.
2013-04-11 12:08:53 +02:00
Simon Sapin
751d99cc78
Move background sizing and positioning from draw to layout.
2013-04-03 17:46:14 +02:00
Simon Sapin
171438f48e
2013
2013-04-03 16:23:48 +02:00
Simon Sapin
0f37260c24
Docs: mention converting pycairo contexts to cairocffi.
2013-03-28 16:41:51 +01:00
Simon Sapin
86bc8b4978
Fix #66 : Resolve images’ auto width from non-auto height and intrinsic ratio.
2013-03-28 12:44:28 +01:00
Simon Sapin
c70b00b5b8
More WIP: cairocffi and pango cffi.
2012-12-29 01:36:06 +01:00
Simon Sapin
f243dbcca3
Embed JPEG-encoded images in PDF. Fix #6
...
If an image is in JPEG format, embed it as-is in the PDF output.
This often results in smaller PDF file size.
(The image is still decoded however,
so there is no rendering speed improvement.)
2012-12-20 20:12:52 +01:00
Simon Sapin
0444be5fba
Fix PDF metadata with zoom != 1
2012-11-22 22:49:30 +01:00
Simon Sapin
85bbfa9258
Rename PDF scale to zoom, have the default be 1 rather than 0.75
...
The 0.75 factor is an implementation detail that should not be exposed
in the API.
2012-11-22 22:31:26 +01:00
mbarkhau
aa62d35664
Turn scale factor into parameter for write_pdf
2012-11-22 18:47:20 +01:00
Simon Sapin
3072fff2e5
Docs docs docs.
...
But no ducks.
2012-10-08 19:51:18 +02:00
Simon Sapin
a0bb1f2752
Have metadata account for CSS transforms.
2012-10-06 22:09:17 +02:00
Simon Sapin
28cb59fc8b
Pre-compute transformation matricies.
...
… so that they are available when getting meta-data.
2012-10-06 11:26:55 +02:00
Simon Sapin
eda4bc604e
Move resolution to *.write_png only.
2012-10-05 20:12:05 +02:00
Simon Sapin
e1f5863bc8
Refine docstrings.
2012-10-05 18:50:40 +02:00
Simon Sapin
a05470d006
Remove with_size in Document.write_png
...
The method now always returns a tuple with the size.
HTML.write_png however still does not return the size.
2012-10-05 18:27:45 +02:00