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

fix the NullPointerException issue. for issue detail please check htt… #638

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

Xiaoshu-Zhao
Copy link

fix the NullPointerException issue. for issue detail please check #637

@angelozerr angelozerr merged commit 71076e8 into opensagres:master Mar 2, 2024
1 of 3 checks passed
@angelozerr
Copy link
Member

Thanks @Xiaoshu-Zhao !

@Adrian012344
Copy link

I am having the same problem when trying to convert an Apache POI document to PDF with the method:

private byte[] createPdf(XWPFDocument document) {
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    PdfOptions options = PdfOptions.create();
    document.enforceReadonlyProtection();
    try {
        PdfConverter.getInstance().convert(document, byteArrayOutputStream, options);
    } catch (IOException e) {
        throw new RuntimeException("Pdf converter failed", e);
    }
    return byteArrayOutputStream.toByteArray();
}.

Will this fix also work for PDFs? And will this fix be released soon?
Have a good day.

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.

3 participants