Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check system version before trying to replace font #698

Closed

Conversation

BryceStevenWilley
Copy link
Contributor

We ran into an issue today where pdftk wasn't working. It's because the addition of replacement_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.

@jhpyle
Copy link
Owner

jhpyle commented Oct 4, 2023

Thanks, I didn't realize the feature was so recent. I have a fix in the works already.

@BryceStevenWilley
Copy link
Contributor Author

Perfect, I confirmed that your fix works. Thanks!

@BryceStevenWilley BryceStevenWilley deleted the no_pdftk_font branch October 4, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants