Hi Tilman, thank you for the corrections (and sorry for the delay in answering, I was working on other projects...).
I've applied your suggestions and I think they fixed most of my problems. Here is the code as I have it now: https://medialab.sissa.it/nextcloud/index.php/s/FiWX3F7TJDbCT5A One can call the script with some command line options to play with different resolutions. In the source of the java file, one can find how to call the script https://medialab.sissa.it/nextcloud/index.php/s/FiWX3F7TJDbCT5A?path=%2Fsrc%2Fmain%2Fjava%2Fit%2Fsissa%2Fmedialab%2Fpdfimages I don't have much experience with java, please be patient if I was supposed to "deploy" the code in some other way :-) As you pointed out, I still have some problems with stencils: my process transforms the stencil into an image, but sometimes the background of the stencil is black instead of white. You can seen an example in the file screenshot.png. The screenshot refers to test-files/d.pdf. I will work on this an keep the list posted. m On Fri, 08 Mar 2019 15:59:39 +0100, Tilman Hausherr wrote: > > InputStream img_data_stream = > helper_img.getCOSObject().createRawInputStream(); > ... > newBIoperator.setImageParameters(helper_img.getCOSObject()); > > > Another thing you should fix yourself. If the image is a stencil, > create a TYPE_BYTE_BINARY BufferredImage (and later call > setStencil()). If the image is of colorspace DeviceGray, create a > TYPE_BYTE_GRAY BufferedImage. I not, then RGB, NOT ARGB. > > Please fix that also try finding a PDF that has an inline image where > something can be seen, the current one is white. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

