check system version before trying to replace font #698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We ran into an issue today where
pdftk
wasn't working. It's because the addition ofreplacement_font
in 1.4.79 assumes that installed pdftk version is at least 3.3.0, which was only the case as of docassemble system version 1.4.73, which includes docassemble-os 1.0.11.IMO that's a bit too soon to expect a docker image update, so I made a patch that checks for the system version, and if it's below 1.4.73, doesn't use replacement fonts. If the user passed in a replacement font specifically, I log a warning. I would have checked the
pdftk
version directly, but it's hidden in a paragraph of other text, and it feels brittle trying to parse the version out of the rest of it.Still building and testing on an older version of docassemble to make sure it works as expected. Will undraft when it is.