Simple gradient in pdf displaced vertically on import.
Migrated from https://bugs.launchpad.net/inkscape/+bug/1272071 (reported 2014-01-23, mathog)
Summary:
- Import a pdf with two simple gradients displaces the gradient positions, breaking the appearance of vertical gradients
- pdf uses /pattern. Other pdfs created from svg export don't have this problem.
Steps to reproduce:
- open gradients.pdf in Inkscape (internal import).
What happened?
- Notice top rectangle is solid gray (instead of gradient from top to bottom)
- Both gradients have been displaced vertically.
Some notes:
- File originally an Inkscape export of gradients.svg
- gradients both have a gradientTransform on them (scale + near 0 displacement)
- gradients are both opaque, which simplifies logic
- no other transforms
- Settings used: PDF 1.5, only rasterize filter effects checked, resolution 90, output page size = use document's page size, bleed margin 0.0, limit export = blank
- Can't recreate in gradients-1.1-dev.pdf or gradients92.3.pdf. I can't read pdf binary, but a file comparison shows Mathog's pdfs have /Pattern in it, while my exports don't. For 0.92.3, libcairo2=1.15.10-2ubuntu0.1 libpoppler73=0.62.0-2ubuntu2.10 . I guess the same versions are used for my 1.1-dev build?
- Can recreate in gradients_0485.pdf
- New exports have gradient positions correctly on roundhouse trip
- Internal import is fine
What should have happened?
- no gradient displacement
Version Info:
- Inkscape 1.1-dev (838ae0f2, 2020-07-14, custom) Linux Mint 19.1 (also failed to reproduce pdf file from svg)
- Inkscape 0.92.3 (2405546, 2018-03-11) ppa Linux Mint 19.1 (also failed to reproduce pdf file from svg)
- Inkscape 1.0 (4035a4fb, 2020-05-01) Arch (inkscape 1.0-5 from extras) (also failed to reproduce pdf file from svg)
- Inkscape 1.0 (4035a4fb, 2020-05-01) Windows 10 x64 (also failed to reproduce pdf file from svg)
- Inkscape 0.92.0 r15299 x64 7z Windows 10 x64 (also failed to reproduce pdf file from svg)
- Inkscape 0.91-1 r13725 x64 7z archive Windows 10 x64 (also failed to reproduce pdf file from svg)
Not replicated 0.48.5-1 r10040 x32 7z archive (on Windows 10 x64), but exporting to pdf DID reproduce the pdf