cancel
Showing results for 
Search instead for 
Did you mean: 

Create a file with the content of two other files

lbm
Champ in-the-making
Champ in-the-making
Hi,

I'd like to know if it's possible to create a pdf file with the content of two other existing pdf files with webscripts.
I've tried the following:

var contenido = dos.properties["cm:content"] + uno.properties["cm:content"];
documento.properties["cm:content"].write(contenido);

But I get the following error:

Can't find method org.alfresco.repo.jscript.ScriptNode$ScriptContentData.write(number).

However, if I just add one of the contents, it works:

var contenido = dos.properties["cm:content"];
documento.properties["cm:content"].write(contenido);

I've tried a lot of combinations (document.properties.content, document.content … ) but I can't guess how to create a pdf with the content of two other files (pdf, too).

Any ideas?
Thank you.
1 REPLY 1

pjcaracuel
Champ in-the-making
Champ in-the-making
Hi,

I'd like to know if it's possible to create a pdf file with the content of two other existing pdf files with webscripts.

I think that´s  do it by JavaScript API is not possible, yo can do it using iText

http://en.wikipedia.org/wiki/IText

Regards