Description: Reopening some slides made with LibO 7.5 I am discovering that cropping of the images in 7.6 is slightly different. Most serious issue is that if I crop the images so that they look nice when editing the slides, as I export the slides to PDF, I get a different cropping in the PDF. Namely, using cropping the exported slides are not a faithful reproduction of what had been prepared. Steps to Reproduce: See description Actual Results: Different image cropping in slide editing and exported slides Expected Results: Exported slides should be consistent with what is being edited Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: PresentationDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes
Interesting enough, the inconsistency in cropping between the document in editing/presenting mode and the PDF export seems to occur only when I do the export programmatically, with a macro. The core of the macro is the following, I don't see anything strange in it. ``` 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()) ``` Any clue?
As an additional detail, I use this macro invoking libreoffice in headless mode.
And that's it... dropping `--headless` removes the inconsistency in the PDF export... Now, why is it so?
Maybe something like Bug 118299 biting here too?
Please give full steps with full macro, so we can test. Set to NEEDINFO. Change back to UNCONFIRMED after you have provided the information.
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.
In any case I tend to believe that what I am hitting here is Bug 118299, or at least that that issue needs to be fixed first.
In fact, my hypothesis is that: - when you ask LibO to be --invisible, it considers your actual screen features; - when you ask it to be --headless, it uses some default features. Among these features there is some DPI info that (incorrectly) gets used to determine how the images should be cropped.
Ok, I will close as dupe and add a comment to the other one *** This bug has been marked as a duplicate of bug 118299 ***