Forum Discussion
Flow Action - Convert Word Document to PDF
Hi all..
I decided a simple workaround was in order. I simply copy the file into OneDrive for business as a temporary location, use the "Convert file from OneDrive for Business" into PDF passing the Identifier as a variable" then create the PDF into sharepoint, and delete my temporary file from ODfB. 🙂 It's more moving parts, but it works just fine until this issue is fixed.
- RoghanJan 12, 2020Copper Contributor
Thanks for sharing, I am stuck on this exact issue too and am unable to convert a Word Doc to PDF within Sharepoint. Has there been any developments in the mean time?
If not, is it possible you paste the flow you've developed as a workaround which you have discussed? would be good to mimick it myself in the interim till an MS solution is developed.
- ThreeTen22Feb 02, 2020Copper Contributor
After some substantial trial and error I believe this usually happens when a file has been created, but isn't "ready yet". Its as if its returning the file properties that can work with Sharepoint's REST API, without actually determining if the information can be discovered by Microsoft's graph API (which I am now convinced is what that action is using).
A workaround I have found is to wrap the action in a while loop with a success and failure branch. On failure, wait 10 seconds and then restart the loop. It isn't perfect of course, but 99% of the time it fails once or twice, then goes through
- lukas211Mar 13, 2020Copper Contributor
ThreeTen22 sounds like a good workaround to me, thanks for sharing.
Can you please describe how to use the success/failure branch? I don't know how to do this.
Thanks a lot!
- Russell GoveJan 13, 2020Iron Contributor
Roghan This can be used to get a pdf version of a document: https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/js-command-convert-to-pdf
This can be used to generate Word Docuements or PDFs from data stored in your sharepoint lists using a word template: https://github.com/russgove/sp-dev-fx-extensions/tree/dev/samples/react-command-generate-documents
- RoghanJan 19, 2020Copper Contributor
Russell Gove thanks for sharing, I am keen to try point 1: "This can be used to get a pdf version of a document" but am unable to deduce from the link you shared how to go about this? Any easy to follow guide you have seen around?