context: jdk11, springboot, itextpdf 5.5.13.3, ubuntu, eclipse
during: new HtmlPipelineContext(null);
throughout new CssAppliersImpl(new XMLWorkerFontProvider());
and last CssAppliersImpl(){// map builder inside }
appears
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 (file:/home/awieclawski/.m2/repository/com/itextpdf/itextpdf/5.5.13.3/itextpdf-5.5.13.3.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.itextpdf.text.io.ByteBufferRandomAccessSource$1
question: how to avoid it?
PS.
Before HtmlPipelineContext
instance is established:
CSSResolver cssResolver = new StyleAttrCSSResolver();
cssResolver.addCss(cssFile);
// cssFile is returned from XMLWorkerHelper.getCSS(getCssStream(path));
}
and at the debug of new HtmlPipelineContext(null);
is signalized: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred invoking method.
solution:
there is problematic line (503) in FontFactoryImp
where static method BaseFont.enumerateTTCNames(path);
is called. To avoid this in XMLWorkerFontProvider
constructor should be used XMLWorkerFontProvider.DONTLOOKFORFONTS
as parameter value.
XMLWorkerFontProvider fontProvider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS); `
it's quite enough - problem disappeared :)