Compatibility with Office365

36 views
Skip to first unread message

Jose Alberto Guastavino

unread,
Mar 4, 2017, 4:19:20 PM3/4/17
to documents4j
I would like to convert ms word to pdf using office365
I think the solution should be implemented using a Powershell Script
Then I think the key is making a new version of  MicrosoftWordScript (making ps1 scripts instead of vbs)
and AbstractExternalConverter changing the cmd call to a powershell call

Is there anything made about that
Is there another solution to run conversion using Office365?

Jose Alberto Guastavino

unread,
Mar 4, 2017, 4:41:26 PM3/4/17
to documents4j
This is an example of powershell script converting word document

$word_app = New-Object -ComObject Word.Application
$document = $word_app.Documents.Open("input.docx")
$pdf_filename = "outputpowershell.pdf"
$document.SaveAs([ref] $pdf_filename, [ref] 17)
$document.Close()
$word_app.Quit()

Rafael Winterhalter

unread,
Mar 4, 2017, 5:17:06 PM3/4/17
to Jose Alberto Guastavino, documents4j
Hei Jose,
I do not currently have the time to implement something myself but I am more than happy to merge something if you send a PR.
Best regards, Rafael

--
You received this message because you are subscribed to the Google Groups "documents4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to documents4j+unsubscribe@googlegroups.com.
To post to this group, send email to docum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/documents4j/57d3a600-cfb5-46b0-8e27-1cf4207e9052%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages