[Libreoffice-bugs] [Bug 74861] [Spreadsheet] Exporting A4-sized ODS to PDF with '--headless' creates Letter-sized PDF (where manual export via GUI creates A4)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 27 14:36:46 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=74861
--- Comment #48 from kurt.pfeifle at gmail.com ---
Linux users can now very easily generate an "AppImage" executable for
LibreOffice which can be used on almost any (old and new) Linux distribution in
order to
TEST THIS BUG AS WELL AS ANY OTHER BUG IN BUGZILLA !
This also works for almost any historic LibreOffice release.
You can now create your own fully functional AppImage binaries of LibreOffice
for all releases from the past years up to the newest nightly developer build.
Just run the Bash script "make_libreoffice_appimage" hosted on GitHub (you do
NOT need to become root!):
* https://github.com/antoniofaccioli/libreoffice-appimage
These AppImages are generated from input files consisting of official Debian
binary builds released by The Document Foundation. You also can include the
language pack you'd like or need for your environment. Details are in the
README:
* https://github.com/antoniofaccioli/libreoffice-appimage/blob/master/README.md
You can use the AppImage side-by-side, without conflicting with your existing
LibreOffice packages, which are and remain under the control of your local
Linux package management system.
Since an AppImage is not "installed" and does not mess with your system
libraries it is also very easy to get rid of it again, if you do not like it:
just delete the 1 file, that the AppImage is.
===================================================================================
With this out of the way, here is how I tested the current problem (again), but
this time on a Debian Stretch system:
1. Generate an AppImage for LibreOffice 6.1.0.0-alpha0
------------------------------------------------------
# Prepare an "lo-tmp" directory and get the script:
$ mkdir $HOME/lo-tmp
$ cd $HOME/lo-tmp
$ base_url=raw.githubusercontent.com/antoniofaccioli/libreoffice-appimage
$ wget https://${base_url}/master/make_libreoffice_appimage
$ chmod a+x make_libreoffice_appimage
# The original script may still have '#!/bin/bash -x' in its first line.
# Unfortunately his makes the included help output unreadable. Hence we modify
it:
$ echo '#!/bin/bash' > new_hashbang
$ cat new_hashbang make_libreoffice_appimage >
new_make_libreoffice_appimage
$ chmod a+x new_make_libreoffice_appimage
# Read the options of the script:
$ ./new_make_libreoffice_appimage
# Generate a LibreOffice AppImage for the latest "daily" release, with
# German locale included, and see how long it takes.
$ time ./new_make_libreoffice_appimage daily de N N N
# Generate a LibreOffice AppImage for the latest "fresh" release, with
# French locale as well as the respective French off-line help files
# included, and see how long it takes.
$ time ./new_make_libreoffice_appimage fresh x86-64 fr Y N N
I myself will stick with the `... daily de N N N` parameters for now...
The resulting AppImage is automatically set to be executable by the script.
It is named "LibreOfficeDev-6.1.0.0.alpha0_2017-11-26.de.help-x86_64.AppImage"
and resides in the "$HOME/lo-tmp/out" directory. You can move it to any place
you want (even a USB thumbdrive) and execute it from there. It is "portable"
and this way can be used on your other Linux systems as well.
Start your brand-new AppImage for a test by just running
$ ./out/LibreOfficeDev-6.1.0.0.alpha0_2017-11-26.de.help-x86_64.AppImage
You are even free to re-name the AppImage, and then run it just the same:
$ mv ./out/LibreOfficeDev-6.1.0.0.alpha0_2017-11-26.de.help-x86_64.AppImage
lo
$ ./lo
Or put the AppImage into $HOME/bin (that IS in your $PATH, isn't it?!?) and run
it without bothering for giving a path:
$ cp lo $HOME/bin/
Short test:
$ lo --help
Just don't forget that it's an AppImage, even though the suffix is no longer
there :-)
2. Use AppImage to run tests concerning this current bug
--------------------------------------------------------
Now... Since this bug concerns a "--headless" run -- can the AppImage be used
to test this bug?
Sure.
I noticed that on Linux I do not need to call the "soffice" executable (like on
macOS). So it is even easier to test headless conversion of ODS/ODT input files
to PDF documents.
$ lo \
"-env:UserInstallation=file:///tmp/LibO_Conversion__${USER}" \
--headless \
--convert-to pdf:calc_pdf_Export \
--outdir $(pwd)/l \
$(pwd)/lh-dummy-a4.ods
$ lo \
"-env:UserInstallation=file:///tmp/LibO_Conversion__${USER}" \
--headless \
--convert-to pdf:calc_pdf_Export \
--outdir $(pwd)/l \
$(pwd)/lh-dummy-letter.ods
3. Check page size of generated PDF files
-----------------------------------------
$ pdfinfo l/lh-dummy-letter.pdf | grep "Page size:"
Page size: 611.972 x 791.972 pts (letter)
$ pdfinfo l/lh-dummy-a4.pdf | grep "Page size:"
Page size: 611.972 x 791.972 pts (letter)
This means: the bug is still there. Regardless of A4 or Letter page size in the
input, the PDF output will always be Letter.
Here are my `locale` settings:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
===================================================================================
Ok, since I did all of the above steps on a Linux Debian system, and running
LibreOffice 6.1 Alpha, I now conclude:
1. This bug is present on all OSes
2. This bug is present on all versions of LO
3. This bug can be re-opened as CONFIRMED
and I will change the bug's status accordingly.
Now have fun testing other bugs with the an AppImage generated by the script as
outlined above!
Just generate an AppImage for any version/language combo you need to test.
(Don't rename the original AppImage in order not to loose the version/language
info. You can use symlinks with more comfortable names if you want them.)
----
And finally: Thanks to Antonio Faccioli for creating and maintaining his
extremely useful script to generate AppImages as well as his openness to
include suggestions and merge pull requests!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171127/171b0049/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list