document.transformDocument() is giving null

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

document.transformDocument() is giving null

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
Highlighted
Senior Member II

Re: document.transformDocument() is giving null

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