converting txt to pdf and rename the converted file (in the same space)

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

Re: converting txt to pdf and rename the converted file (in the same space)

pdfName should be set to the name your pdf will get - I think in your script it's

pdfName=document.name+".pdf";

If you don't need the old versions of the text or PDF files, the script could be much simpler. Renaming a file is done just by setting it's name property to a new value.

See the documentation ScriptNode API | Alfresco Documentation 

pdfNode.name="the new name.pdf";

calvo
Senior Member

Re: converting txt to pdf and rename the converted file (in the same space)

Hi Martin,

To be honest, I had test this code (your code :-)) in my Alfresco some time ago, and then I didn't remember where I had obtained. Sorry !!!

Anyway, there's not doubt that the author is .

Thank you so much for your recommendations.

Regards,

mehe
Senior Member II

Re: converting txt to pdf and rename the converted file (in the same space)

no offense :-) - I really was glad that the answer helped someone. It's a community and using and combining solutions is the right thing to do. I just thought you didn't know about the "code box" with syntax highlighting which I discovered just a few weeks ago (also by the help of the community) because it's "hidden" under the "more" menu-option...