Issue converting PDF to TIFF

cancel
Showing results for 
Search instead for 
Did you mean: 
urielflores
Member II

Issue converting PDF to TIFF

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
jljwoznica
Senior Member

Re: Issue converting PDF to TIFF

urielflores
Member II

Re: Issue converting PDF to TIFF

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.