Question
inautix
US
Last activity: 20 Oct 2016 11:54 EDT
conversion from word doc to pdf
Hi, We want to convert a word document attached to a work item to PDF on a button click . Please suggest how can we do it? Thankyou
Message was edited by: Marissa Rogers - added category
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
inautix
US
Hi John,
Yes this didnt work but we figured out and used HTMLtoPDF activity and it worked for us . Thankyou for your support
Thanks,
Harneet
Pegasystems Inc.
GB
As far as I know: PRPC doesn't have any built-in mechanism for this.
However: There are third party libraries which can parse WORD files : For instance : https://poi.apache.org/document/index.html
Apache POI is actually included in PRPC 7.x onwards (maybe even PRPC 6 - I can't remember): so it should be possible to use this library in an Activity (etc) to process a WORD file; create some sort of intermediate format, create some HTML, convert that using PRPC's HTMLTOPDF mechanism (which uses the third-party library : http://pd4ml.com/ for this).
Alternatively: you can do this sort of thing client-side - using a Print-To-PDF mechanism (outside of PRPC); possibly you could do this server-side as well if you can install a print-to-pdf Printer Driver onthe server and have PRPC 'print' to it ?
Pegasystems Inc.
CA
Check if the standard flow action Work-.ConvertAttachmentToPDF helps. This uses Open Authoring ActiveX control which internally uses Amyuni driver to "print" to PDF.
inautix
US
Hi praneeth,
Thankyou for your answer but ideally if number of users are high , suggesting or installation of this driver for each and every user is an overhead. Is there any better solution for this?
Pegasystems Inc.
GB
See also this third-party posting ; shows an example in standalone-java: http://stackoverflow.com/questions/6201736/javausing-apache-poi-how-to-convert-ms-word-file-to-pdf
Since PRPC is based on Java (and includes many of the common Apache Libraries etc; and others can be added) - it may be a suitable starting point for a custom implementation.
(See my original answer above also).
Cheers
John
inautix
US
Thankyou John , Will try this
inautix
US
Hi john ,
I found a flow action ConvertAttachmentToPDF which can be called as local action in flow . Can you suggest if it's useful and how exactly we can you use this ?
Thankyou
Pegasystems Inc.
GB
Hi Harneet,
I haven't got any experience of this particular Flow Action "ConvertAttachmentToPDF", but I took a quick look at it : it seems to 'outsource' the WORD->PDF conversion to the 'pdm' (rather than doing the conversion within PRPC itself).
The History Tab on the Activity has the following note:
Send a word doc to pdm by inserting a request record
'PDM' here refers to a deprecated Pega Product called 'PegaDISTRIBUTION Manager' : this product is no longer provided by Pega.
References:
Hi Harneet,
I haven't got any experience of this particular Flow Action "ConvertAttachmentToPDF", but I took a quick look at it : it seems to 'outsource' the WORD->PDF conversion to the 'pdm' (rather than doing the conversion within PRPC itself).
The History Tab on the Activity has the following note:
Send a word doc to pdm by inserting a request record
'PDM' here refers to a deprecated Pega Product called 'PegaDISTRIBUTION Manager' : this product is no longer provided by Pega.
References:
https://mesh.pega.com/message/213595#213595
So this is Activity / Flow Action is not going to work for you I'm afraid.
Thanks,
John
Accepted Solution
inautix
US
Hi John,
Yes this didnt work but we figured out and used HTMLtoPDF activity and it worked for us . Thankyou for your support
Thanks,
Harneet
HCL America
US
Hi ,
Did you convert word doc to HTML and then used HTMLToPdf Activity?
Chaitra