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

Broken PDF #34

Closed
AnarchyCent opened this issue Aug 30, 2021 · 3 comments
Closed

Broken PDF #34

AnarchyCent opened this issue Aug 30, 2021 · 3 comments

Comments

@AnarchyCent
Copy link

I would like to create a job on my Synology NAS which automatically processes the incoming PDF files. Unfortunately, I get a "broken" PDF that cannot open on Adobe Acrobat on my Windows.
Java version: 11.0.12.7-1

uL8gxZ6cFQ

./Briss-2.0 -s "test.pdf" -d "test_cropped.pdf"
Clustering PDF: test.pdf
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 (file:/volume1/Dateien/Test_PDFcrop/Briss-2.0/Briss-2.0/lib/itextpdf-5.5.10.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.itextpdf.text.io.ByteBufferRandomAccessSource$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Created 2 clusters.
Starting to render clusters......................Fontconfig error: Cannot load default config file
Exception in thread "Thread-0" java.lang.InternalError: java.lang.reflect.InvocationTargetException
        at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
        at java.desktop/java.awt.Font.getFont2D(Font.java:497)
        at java.desktop/java.awt.Font.getFontName(Font.java:1469)
        at java.desktop/java.awt.Font.getFontName(Font.java:1451)
        at org.jpedal.objects.acroforms.formData.SwingData.recalcFontSize(Unknown Source)
        at org.jpedal.objects.acroforms.formData.SwingData.scaleComponent(Unknown Source)
        at org.jpedal.objects.acroforms.formData.SwingData.setField(Unknown Source)
        at org.jpedal.objects.acroforms.formData.SwingData.completeField(Unknown Source)
        at org.jpedal.objects.acroforms.rendering.DefaultAcroRenderer.createField(Unknown Source)
        at org.jpedal.objects.acroforms.rendering.DefaultAcroRenderer.createDisplayComponentsForPage(Unknown Source)
        at org.jpedal.PDFtoImageConvertor.convert(Unknown Source)
        at org.jpedal.PdfDecoder.getPageAsImage(Unknown Source)
        at org.jpedal.PdfDecoder.getPageAsImage(Unknown Source)
        at at.laborg.briss.utils.ClusterRenderWorker.run(ClusterRenderWorker.java:42)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:84)
        ... 15 more
Caused by: java.lang.NullPointerException
        at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
        at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
        at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
        at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:379)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:324)
        at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
        at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)
        ... 20 more
finished!
Calculating crop rectangles.
Starting to crop files.
Cropping succesful. Cropped to:/volume1/Dateien/Test_PDFcrop/Briss-2.0/Briss-2.0/bin/test_cropped.pdf

Could you please help me on this?

@cleydyr
Copy link
Collaborator

cleydyr commented Aug 30, 2021

Probably a JDK issue: adoptium/temurin-build#693

@cleydyr
Copy link
Collaborator

cleydyr commented Aug 31, 2021

Did you try to install fontconfig as suggested in the linked issue above, @AnarchyCent ? Hopefully it can solve the issue.

@mbaeuerle
Copy link
Owner

Seems to be a JDK issue as @cleydyr stated. The Github CI build works fine, maybe you could try the OpenJDK / Oracle JDK?
Feel free to respond again if you still have issues. In the meantime I will close the issue for now.

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

No branches or pull requests

3 participants