Hope i have made clear what i'm trying to do.
#TRANSFORMER EN PDF PDF#
I just want to retrieve the preview of the single document pdf in the zip file instead the fake preview of the zip file.īut i must do something wrong with the configuration of the transformer. Here the screenshot for make visualize the difference between a pdf file and a zip file on share: The Alfresco version i use, is the 5.2 community. bug("Mimetype ok : mimeTypeOfAlfresco = "+mimeTypeOfAlfresco+ ", sourceMimetype = "+sourceMimetype) bug("Cambiamo il mimetype con quello voluto da alfresco per evitare stackstrace del warning") ReaderSourceMimetype+") does not match the detected mimetype ("+
") has not taken place because the declared mimetype ("+ String message = "Transformation of ("+fileName+ String readerSourceMimetype = reader.getMimetype() String fileName = transformerDebug.getFileName(options, true, 0) If (!transformerConfig.strictMimetypeCheck(sourceMimetype, differentType)) String differentType = getMimetypeService().getMimetypeIfNotMatches(reader.getReader()) String targetMimetype = writer.getMimetype() String sourceMimetype = reader.getMimetype() Private String myStrictMimetypeCheck(ContentReader reader,ContentWriter writer, TransformationOptions options)throws UnsupportedTransformationException * options the transform options of the current document * writer the writer of the current document * reader the reader of the current document * Manage the inner warnings of alfresco 5.2 If ("application/zip".equalsIgnoreCase(sourceMimetype) || "application/octet-stream".equalsIgnoreCase(sourceMimetype) || ext.equalsIgnoreCase("zip")) String ext = getExtensionOrAny("application/zip") Public boolean isTransformable(String sourceMimetype, String targetMimetype, TransformationOptions options) Private static final Log logger = LogFactory.getLog(ZIPToPDFTransformer.class) Public class ZIPToPDFTransformer extends AbstractContentTransformer2
Import .repository.TransformationOptions Import .transform.UnsupportedTransformationException
src/main/resources/alfresco/module/webdesktop-amp/context/transformer-context.xml src/main/resources/alfresco/module/webdesktop-amp/module-context.xml src/main/resources/alfresco/module/webdesktop-amp/mimetype-map-custom.xml src/main/resources/alfresco/module/webdesktop-amp/alfresco-global.propertiesĬ=100Ĭ.=true src/main/resources/alfresco/extension/mimetype/custom-mimetype-map.xml What i want it's to extract the single pdf in the zip and send to share like a normal pdf on runtime while using share, so i can use the standard preview e standard thumbnail of the pdf file. test.pdf to test.zip a container of the original file. Hi, i have zipped a single pdf file and convert them to zip file e.g.