| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
👍 In principle, but I think that this should get some through tests while we are thinking about it. Do we want to push this to 3.4 or try to squeeze it in for 3.3? |
Sorry, something went wrong.
There was a problem hiding this comment.
looks reasonable.
Sorry, something went wrong.
|
This is difficult to test, because unlike the builtin PDF export, the PGF backend uses latex, which has no pdf.compression setting, and all the metadata is compressed. You can check in evince that the metadata is set from the test though. |
Sorry, something went wrong.
|
I guess you could possibly use pdfinfo (from poppler) or mutool (from mupdf) as optional test dependency to extract the metadata? |
Sorry, something went wrong.
|
It doesn't print Trapped, but it looks like pdfinfo would work for the others. There might be a bug in one or the other, because the printed date is wrong... |
Sorry, something went wrong.
|
Also, another possibility is pikepdf, which we could use from Python. |
Sorry, something went wrong.
This takes keys that match the PDF specification instead of lower-case, 'pdf'-prefixed keys, so is a bit simpler. Also, deprecate ability to accept key case-insensitively, as that is not done in the PDF backend.
This ensures that the same default values are produced, and more importantly ensures that the same keys are accepted. Previously, PGF only allowed a subset of keys.
It's something internal to the PDF backend, and there's no need to require the metadata to use that type instead of a plain string.
This is supported through the multipage PdfPages, but not direct output of a single figure via PGF.
They're basically the same, but with different `pgf.texsystem` settings.
|
That was a good idea, because I found a few bugs in the PGF side, as hyperref seems to have some differing requirements on the format for things. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
The PGF backend only supported PDF metadata using the multi-page PdfPages class; this adds support for adding metadata to single-figure saving directly via savefig.
Additionally, refactor the metadata support from the PDF side into a common function to setup and verify metadata that can be used in the PGF side as well. This ensures that the same set of keys is allowed, which weren't before.
PR Checklist