1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00
Commit Graph

601 Commits

Author SHA1 Message Date
Guillaume Ayoub
903490b207 Merge branch 'master' into hyphenation
Conflicts:
	weasyprint/layout/inlines.py
2012-12-28 17:56:03 +01:00
Guillaume Ayoub
94c719b4ea Fix some trailing spaces 2012-12-28 17:45:23 +01:00
Guillaume Ayoub
474435c852 Merge branch 'master' into hyphenation 2012-12-26 17:03:48 +01:00
Simon Sapin
2388891ae3 More libxml2 work-arounds. 2012-12-26 17:03:08 +01:00
Guillaume Ayoub
c52a17a3f0 Set the computed value of the "hyphens" property instead of the keyword 2012-12-26 16:56:48 +01:00
Guillaume Ayoub
ee0a53ea1d Merge branch 'master' into hyphenation
Conflicts:
	weasyprint/text.py
2012-12-26 16:44:23 +01:00
Guillaume Ayoub
d6b78b30e7 Work around parser changes in libxml2 2.9 2012-12-26 16:43:10 +01:00
Guillaume Ayoub
145027536b Collapse consecutive text boxes 2012-12-26 16:42:45 +01:00
Guillaume Ayoub
488178c6ab Typo 2012-12-26 14:47:33 +01:00
Guillaume Ayoub
09aacdc669 Use pyphen instead of hyphenator 2012-12-26 13:25:18 +01:00
Simon Sapin
773bbfe431 Changelog for JPEG embedding. 2012-12-20 20:21:13 +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
Guillaume Ayoub
3ed645d54c Fix the encoding of the zu_ZA dictionary 2012-12-14 02:40:40 +01:00
Simon Sapin
8995ce77d9 Merge remote-tracking branch 'origin/trailingspaces' 2012-12-12 16:06:20 +01:00
Simon Sapin
f12deb8fc6 Work around a segfault on Python 3.2.
Something bad happend when de-allocating a module-level BytesIO()
and dummy PDFSurface.
2012-12-12 16:02:41 +01:00
Simon Sapin
4f8deadc47 Work around a bug in old pycairo versions.
See
http://cgit.freedesktop.org/py2cairo/commit/?id=cab2c1295499f57247854e8635b77ca716fa9730
2012-12-12 09:25:28 +01:00
Guillaume Ayoub
667f1d905b Quick and dirty lang detection for hyphenation 2012-12-09 00:41:12 +01:00
Guillaume Ayoub
fbc2e33b01 Add the -weasy-hyphens CSS property 2012-12-08 22:50:08 +01:00
Guillaume Ayoub
d4fffabb8a Add base code and dictionaries for hyphenation 2012-12-08 21:43:16 +01:00
Guillaume Ayoub
2325b4c2f4 Give the line length to split_first_line 2012-11-24 16:14:49 +01:00
Guillaume Ayoub
1eb22ed63b Remove spaces at the end of the text lines 2012-11-22 23:52:50 +01:00
Simon Sapin
0444be5fba Fix PDF metadata with zoom != 1 2012-11-22 22:49:30 +01:00
Simon Sapin
e9013d0470 Add a test for PDF zoom. 2012-11-22 22:36:51 +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
Guillaume Ayoub
d2dea8ed56 Fix the size of the first line 2012-11-22 21:23:42 +01:00
Guillaume Ayoub
8c6f6a8189 Remove the width of space-character containers when line breaks are not preserved 2012-11-22 21:23:04 +01:00
Guillaume Ayoub
0b87357daf Don't always use the whole text to get the first line of a pango layout 2012-11-22 21:21:28 +01:00
Simon Sapin
dda3817880 Merge branch 'patch-1' of https://github.com/mbarkhau/WeasyPrint 2012-11-22 20:10:09 +01:00
mbarkhau
0e09ce8ff9 Add scale factor to write_pdf of HTML class 2012-11-22 18:58:22 +01:00
mbarkhau
aa62d35664 Turn scale factor into parameter for write_pdf 2012-11-22 18:47:20 +01:00
Guillaume Ayoub
b54b9f54af Fix the W3 testing suite web server 2012-11-16 02:07:56 +01:00
Simon Sapin
6f56613441 Do not require HtmlElement.
* Do not use element.base_url which only exists in lxml.html.HtmlElement
* Use lxml.etree.HtmlParser instead of lxml.html

This is one step toward using the html5lib parser, but see
https://github.com/Kozea/WeasyPrint/pull/12
2012-11-06 13:55:39 +01:00
Simon Sapin
ba987f0daf Remove out-dated parts of the weasyprint.css docstring. 2012-10-09 17:10:45 +02:00
Simon Sapin
3072fff2e5 Docs docs docs.
But no ducks.
2012-10-08 19:51:18 +02:00
Simon Sapin
54b46c4b46 Typo fix 2012-10-08 12:13:33 +02:00
Simon Sapin
085d16cebf Use the Sphinx syntax for command-line options. 2012-10-07 14:54:39 +02:00
Simon Sapin
f5bd8cf8ff Defer warnings when PixBuf is not available.
Previously, a missing PixBuf caused a warning at import-time.
Now the exception is saved and re-raised when an image needs
to be loaded: there is no warning if PixBuf is not used at all.
2012-10-07 10:07:21 +02:00
Simon Sapin
f8457ba3a5 Move save_pixels_to_png() to the test_draw module.
This function is only used for tests.
2012-10-07 09:49:07 +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
a7131bd10f Remove unused imports 2012-10-05 22:12:19 +02:00
Simon Sapin
ba06e7eecc Nicer whitespace in PDF objects. 2012-10-05 22:06:38 +02:00
Simon Sapin
732f7187a4 Fix bookmarks writing in PDF.
The new prepare_metadata() already adds bookmark_root_id to
all values, no need to add it again in write_pdf_metadata()
2012-10-05 21:59:08 +02:00
Simon Sapin
bedcbfe4ed Remove a debugging print() 2012-10-05 21:50:37 +02:00
Simon Sapin
17621bced0 Fix a crash when pygtk can be imported but not pango.
PyGObject 2 works on Python 3 and has a 'pygtk' package.
Importing pygtk does not imply that pango is available through it.
2012-10-05 21:49:26 +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
Simon Sapin
c2b2b8c2ea Escape non-ASCII characters in hyperlinks. 2012-10-04 19:12:34 +02:00
Simon Sapin
726faa9765 Make the Navigator use the public API. 2012-10-04 14:30:42 +02:00