-
Notifications
You must be signed in to change notification settings - Fork 601
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
java.util.regex.PatternSyntaxException on android #394
Comments
For anyone having this issue. Workaround is to 1. register font and 2. getFont with: FontFactory.getFont(FontFactory.getFontImp().getFontPath("font-alias").toString(), font-size); |
The proper syntax would be: msg = msg.replaceAll("\\{1\\}", p1.toString()); The call is in openpdf/src/main/java/com/lowagie/text/error_messages/MessageLocalization.java |
This code seems to have been changed by some IDE-Optimisations. It was originally: if (p1 != null) {
msg = msg.replaceAll("\\{1\\}", p1.toString());
} |
I'll do some refactoring on this, this weekend. Stay tuned. |
Hi @joseluu , @michaelhugi , Could you try with the SNAPSHOT-Version, to see if the issue is fixed? Thanks |
Yes, I confirm that the issue is fixed |
librepdf 1.3.20 is almost working on android. There is only one issue with custom fonts:
Used in Play! Framework DocumentException is thrown.
On Android java.util.regex.PatternSyntaxException is thrown, therefore using custom fonts is not working. The error is caused by the following regexes that can't be resolved for some reason.
On android build.gradle
The text was updated successfully, but these errors were encountered: