https://bugs.documentfoundation.org/show_bug.cgi?id=157362

--- Comment #6 from Callegar <sergio.calleg...@gmail.com> ---
I have been using the following macro for a long time:

REM  *****  BASIC  *****

Sub SaveSlidesAsPDF(srcFile)

srcURL = ConvertToURL( srcFile )

dim oPropDoc(0) as New com.sun.star.beans.PropertyValue
oPropDoc(0).Name="Hidden"
oPropDoc(0).Value=True

'msgbox(srcURL)

oDoc = StarDesktop.loadComponentFromURL( srcURL, "_blank", 0, _
  oPropDoc())

pdfFile=Left(srcFile,Len(srcFile)-4)+".pdf"
pdfURL=ConvertToURL( pdfFile )

Dim oPropPDF(3) As New com.sun.star.beans.PropertyValue
oPropPDF(0).Name="ExportNotesPages"
oPropPDF(0).Value=true
oPropPDF(1).Name="ExportBookmarks"
oPropPDF(1).Value=false
oPropPDF(2).Name="EmbedStandardFonts"
oPropPDF(2).Value=true

Dim oProp(3) As New com.sun.star.beans.PropertyValue
oProp(0).Name="Overwrite"
oProp(0).Value=true
oProp(1).Name="FilterName"
oProp(1).Value="impress_pdf_Export"
oProp(2).Name="FilterData"
oProp(2).Value=oPropPDF()

oDoc.storeToURL(pdfURL,oProp())

oDoc.close( True )

End Sub

Sub Shutdown()
oDoc=ThisComponent
oDoc.close(True)
StarDesktop.terminate()
End Sub

It gets invoked from a bash script as

  ${SOFFICE} ${SOFFICE_OPTIONS} \
             "$CMDPREFIX.SaveSlidesAsPDF($fullname)"

Where ${SOFFICE} is libreoffice, ${SOFFICE_OPTIONS} is either --headless or
--invisible, ${fullname} is the name of the file to export to PDF.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to