1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 07:57:52 +03:00
Commit Graph

400 Commits

Author SHA1 Message Date
Guillaume Ayoub
2358a01bc4 Add an option to disable hinting
Hinting is now enabled by default. Fix #1858.
2023-04-09 21:21:03 +02:00
Guillaume Ayoub
190a576cce Test cache folder option 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
6191d60951 Test DPI option 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
3a745c5be9 Add the --dpi option 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
eb6491f895 Add API controlling JPEG quality 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
51971f3293 Fix tests for attachments 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
5cdd751af1 Test new default compression values 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
fdbdfc150c Add API to compress generated PDF files
This feature compresses PDF streams (as it was already the case) and ask pydyf
to use a compact PDF structure with compressed object stream and
cross-reference object (for PDF version >=1.5).
2023-04-07 23:30:40 +02:00
Guillaume Ayoub
e49d955509 Make tests pass with pydyf 0.6.0 2023-04-07 23:30:40 +02:00
Guillaume Ayoub
c550a55014 Don’t crash when line can be split before trailing spaces
We normally don’t break lines before spaces, but some characters (such as line
separators) can force line breaks anywhere.

Fix #1852.
2023-04-07 08:42:19 +02:00
Lucie Anglade
a3e69e4416 Prefix date.
Fix #1843
2023-03-16 18:36:17 +01:00
Guillaume Ayoub
386901ae5f Fix word-spacing in complicated situations 2023-03-11 00:08:09 +01:00
Jonas Castro
aa28d5c177 Add test case for image absolute vertical positioning 2023-02-26 15:40:41 -03:00
Guillaume Ayoub
404b32ac72 Fix bookmarks coordinates
In version 57.x, we used to use two different functions to generate abstract
bookmarks (whose coordinates origin is the top-left corner) and PDF
bookmarks (whose coordinates origin is the bottom-left corner). Now that we
only use one function, Document.make_bookmark_tree, we have to give the scale
and the matrix parameters so that we can retrieve both depending on the
context.

Fix #1815.
2023-02-23 11:49:59 +01:00
Guillaume Ayoub
96c97d19f8 Fix background drawing for out-of-the-page transformed boxes
Fix #1809.
2023-02-16 11:57:31 +01:00
Guillaume Ayoub
dc7c2cb18c Don’t crash when fixed elements aren’t displayed yet in aborted line
Fix #1806.
2023-02-13 20:06:45 +01:00
Guillaume Ayoub
16cf66c807 Don’t crash when out-of-flow box is split in out-of-flow parent
This code is not handled correctly. This commit avoids the crash, but it
doesn’t give a correct result. We have two different problems to solve:

- floats in floats are broken;
- split out-of-flow elements in split out-of-flow elements are broken.

Fix #1807 (but doesn’t give the right result).
2023-02-10 22:25:02 +01:00
Guillaume Ayoub
e29fa36e24 Test PDF forms 2023-01-24 11:41:35 +01:00
Guillaume Ayoub
281fecfcf2 Make FakeHTML reuse the parent’s function to get UA stylesheets
It’s more robust and may continue to work even if the parent function changes
again.
2023-01-24 11:41:23 +01:00
Guillaume Ayoub
b803f47599 Fix _ua_stylesheets monkey-patching for tests 2023-01-23 13:35:14 +01:00
Guillaume Ayoub
0b1617edc8 Reorganize anchors management 2023-01-23 11:27:44 +01:00
Guillaume Ayoub
79e84dadff Don’t use HTML handlers when they’re not required
Let’s use them only when we have to change the box children or handle replaced
boxes.
2023-01-10 16:39:38 +01:00
Guillaume Ayoub
9a381f0829 Keep absolute URIs for URIs starting with base URI without fragment
Fix #1767.
2022-12-02 16:13:27 +01:00
Guillaume Ayoub
88dc3df4aa Fix and test repeating linear gradients 2022-12-02 15:31:16 +01:00
Guillaume Ayoub
c4c23fca73 More fixes around SVG gradients 2022-11-18 22:59:56 +01:00
Guillaume Ayoub
1e6424d54c Fix SVG namespace everywhere
Looks like the http-to-https sed was a bit too hungry…
2022-11-14 23:26:16 +01:00
Guillaume Ayoub
a843257e54 Improve tests and fix code for SVG gradients 2022-11-14 23:24:24 +01:00
Guillaume Ayoub
a7f46b272c Fix tests 2022-11-14 13:27:30 +01:00
Guillaume Ayoub
0625bf7256 Fix repeating radial gradients in SVG 2022-11-14 10:35:47 +01:00
Guillaume Ayoub
e2b30af70b Fix and clean many linear gradients in SVG 2022-11-14 09:39:50 +01:00
Guillaume Ayoub
df97154331 Fix linear gradients transform matrix 2022-11-13 17:47:30 +01:00
Guillaume Ayoub
2b94b922f9 Handle inheritance for defined elements 2022-11-13 12:25:00 +01:00
Guillaume Ayoub
632be52c01 Keep format when transposing images
Fix #1755.
2022-10-27 15:07:15 +02:00
Guillaume Ayoub
cb870ae4d4 Correctly set target counters in pages’ absolute elements
Fix #1747.
2022-10-24 15:17:08 +02:00
Guillaume Ayoub
71e9e257cc Always set font size when font is changed in line
In setting the font size also sets the font family, and that’s useful when we
have different fonts in the same text block. It happens for example when
characters are missing from a font and are replaced by a fallback font’s
character.

Fix #1748.
2022-10-21 22:29:00 +02:00
Guillaume Ayoub
8c8d059052 Don’t crash when currentColor is set on root svg tag
Fix #1740.
2022-10-15 16:19:37 +02:00
Guillaume Ayoub
ab914a52d3 Fix and test corner cases about white spaces and running elements 2022-10-09 20:11:20 +02:00
Guillaume Ayoub
4185ad3409 Don’t remove attachments when adding internal anchors
Fix #1733.
2022-10-04 11:16:33 +02:00
Guillaume Ayoub
ad5222b65f Remove useless import 2022-10-03 17:10:01 +02:00
Guillaume Ayoub
709184b7d9 Remove print 2022-10-01 11:34:05 +02:00
Guillaume Ayoub
4f7c3cfa1d Unmark tests for gradients 2022-09-30 18:47:36 +02:00
Guillaume Ayoub
028ec78ccc Clean Ghostscript error 2022-09-27 11:23:09 +02:00
Guillaume Ayoub
c7265f5bc2 Improve coverage and fix gradient painting 2022-09-27 10:59:31 +02:00
Guillaume Ayoub
7d2913ccad Improve coverage 2022-09-26 17:25:29 +02:00
Guillaume Ayoub
cecad07166 Improve test coverage 2022-09-24 06:31:03 +02:00
Guillaume Ayoub
a4fc7a11a9 Handle image-orientation 2022-09-23 15:44:16 +02:00
Guillaume Ayoub
58c5f29925 Allow the skew() function to take only one parameter
Fix #1722.
2022-09-22 10:26:23 +02:00
Guillaume Ayoub
6fb4c08e49 Fix top-margin of out-of-flow elements at the top of pages
We were already trying to get the correct top margin of the child, but we
didn’t include subtleties introduced by unforced page breaks. The logic is
still duplicated, it already was, but at least now the copy-paste is correctly
done.

Fix #1058.
2022-09-21 18:17:46 +02:00
Guillaume Ayoub
c274f9fb54
Merge pull request #1704 from Kozea/pdf-ua
Support PDF/UA
2022-09-17 00:05:34 +02:00
Guillaume Ayoub
450cbd430f Add tests for footnotes in columns 2022-09-15 13:55:05 +02:00