cancel
Showing results for 
Search instead for 
Did you mean: 

Issue converting PDF to TIFF

urielflores
Champ in-the-making
Champ in-the-making

Hi everyone!

I'm converting some PDF files stored in my repo into TIFF files. The problem is that when converting the image the result only has the first page of the PDF. Currently, I'm working with Community 5.2.x and using the ContentTransformer, is there some option I'm missing or it has to be done with some other library?

The code is something like this:

ContentReader reader = contentService.getReader(node, ContentModel.PROP_CONTENT);

ContentWriter tiffWriter = contentService.getWriter(nodeTiff, ContentModel.PROP_CONTENT, true);

ContentTransformer transform = contentService.getTransformer(MimetypeMap.MIMETYPE_PDF, MimetypeMap.MIMETYPE_IMAGE_TIFF);

transform.transform(reader, tiffWriter);

2 REPLIES 2

jljwoznica
Star Collaborator
Star Collaborator

Wonder why this is still hardcoded, anyway it worked! Now the TIFF files are complete, but the resolution is worse than the original! I guess it needs more bean configuration in order to get the correct transformation.