Skip to content

Commit

Permalink
Release 0.19: auto-open PDF after save
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Jan 7, 2020
1 parent 1276952 commit d65cdb1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ A video tutorial that shows how to install and use this LibreOffice extension is
Release notes
=============

* Version 0.19 dated January 7th 2020:

* Auto-open PDF after saving it

* Version 0.18 dated January 3rd 2020:

* Add support for additional attachments
Expand Down
2 changes: 1 addition & 1 deletion extension/description.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:d="http://openoffice.org/extensions/description/2006">

<identifier value="com.akretion.factur-x" />
<version value="0.18" />
<version value="0.19" />
<platform value="all" />
<display-name>
<name lang="en">Factur-X Invoice Generator</name>
Expand Down
7 changes: 7 additions & 0 deletions extension/package/libreoffice_facturx_macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,13 @@ def generate_facturx_invoice_v1(button_arg=None):
output_pdf_file=fx_pdf_filename,
additional_attachments=additional_attachments)
pdf_tmp_file.close()

# Open PDF viewer
oCtx = uno.getComponentContext()
oServiceManager = oCtx.getServiceManager()
uno_openpdfviewer = oServiceManager.createInstanceWithContext(
'com.sun.star.system.SystemShellExecute', oCtx)
uno_openpdfviewer.execute(fx_pdf_filename_url, '', 0)
return

##################################################
Expand Down
Binary file modified factur-x_macro.oxt
Binary file not shown.

0 comments on commit d65cdb1

Please sign in to comment.