cancel
Showing results for 
Search instead for 
Did you mean: 

document.transformDocument() is giving null

ayushi_agrahari
Confirmed Champ
Confirmed Champ

I am trying to transform a jpeg file to pdf using document.transformDocument() in alfresco

I have placed the following code in a js file in repo

var newdoc=document.transformDocument(application/pdf)

logger.log("newdoc"+newdoc);

but the value of newdoc is coming to be null

Any help regarding dis would be greatly appreciated.

1 REPLY 1

mehe
Elite Collaborator
Elite Collaborator

seems like you don't have a converter for jpg to pdf transformation (I think you don't have one in the default installation)

You can check the possible transformations with 

<Your Alfresco Servers http>/alfresco/service/mimetypes

look for "application/pdf" and the section "Transformable from" - if there isn't an entry for jpeg, you can't convert jpeg to PDF