Description: An ODT file text document was set to A4 paper size (21.0 x 29.7cm, 8.27 x 11.69 inches), but exporting (File --> Export as PDF) as PDF, LibreOffice creates incorrect PDF paper size - 8.26 x 11.69 inches! Correct PDF A4 size must be 8.27 x 11.69 inches. I think it's a software bug. Steps to Reproduce: 1. ODT page format set to A4 2. Press "File" 3. Press "Export as PDF" Actual Results: - Expected Results: Exported PDF (A4) size must be 8.27 x 11.69 inches size. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Created attachment 137341 [details] document and PDF export examples I can repro this bug as well with a page in letter size. If you look at the attached files, you will see a document file ("bug112690 test.odt") and two PDFs, one generated back on May 24, 2015 with an earlier version of LibreOffice, and another generated with version 5.4.2.2. When viewed in Okular, the earlier generated PDF shows the correct page size (8.5 x 11 in), whereas the PDF generated with LO 5.4.2.2 shows the page size as 8.49961 x 10.9996 instead. I discovered this bug because pdfjoin choked on the weird page size when trying to join multiple PDFs together. I will see if I can pinpoint the first LO version that exhibits this bug. In case it's important: ** My System ** OS: KDE Neon 5.11.2 64-bit (Plasma Desktop 5.11.2, KDE Frameworks 5.39.0, Qt 5.9.1) Linux Kernel: 4.10.0.37-generic
I did a git bisect on the bibisect-linux-64-5.4 archive to narrow down when the bug first appeared. Here is the result: -------- 3180dd0d360fd5e5c1716e84d159a15ef1029604 is the first bad commit commit 3180dd0d360fd5e5c1716e84d159a15ef1029604 Author: Jenkins Build User <tdf@pollux.tdf> Date: Thu May 25 21:26:17 2017 +0200 source 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 source 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 :040000 040000 acefaacd339843d708da52a583a4369031ddcd08 f26981211769b7ae7c741792dbf82ecfcc98fc12 M instdir -------- And here is the bisect log: -------- # bad: [95a88fd3a51708e07ce2e28ecab9404347821579] source 721efbeb117962e9b0cd547b51ede4a6736042a6 # good: [f04172d4ac1553877deea87d267307ad3eb1c99b] source 4136757b4e51c4e6f7cb4132c95538a7f831ef2c git bisect start 'origin/master' 'oldest' # good: [a02d2af797201e627d3096adb908d10b04db3515] source 35bb22c1a834b306c910cb065bc006818c9fa9b3 git bisect good a02d2af797201e627d3096adb908d10b04db3515 # good: [26145747147b2839ca0d5fd6611e34f23dc31248] source 5252673d686913210dd65608b7d24b0e9d51cf00 git bisect good 26145747147b2839ca0d5fd6611e34f23dc31248 # good: [0b1655cf41583b3542ef1c0e86a311190a75cbf9] source fb2013ccb1a13921eb398fb6e4f2b4d55f0761a2 git bisect good 0b1655cf41583b3542ef1c0e86a311190a75cbf9 # good: [b87223fb02d6becd673f08682cf5b91437aee076] source f09ccedb5f18a634c6aaa3340c8d1718f6279c71 git bisect good b87223fb02d6becd673f08682cf5b91437aee076 # good: [7078dfb8b88b96fee826aab38fd80ea121d47440] source ab34329ce2c5d6c1e340155e1b2f6d65f5fb162b git bisect good 7078dfb8b88b96fee826aab38fd80ea121d47440 # bad: [756785300428a2d99ab9c22254dba54c453de120] source 49d0f4968290cbfc76e0c8bbda648404d0f8f64f git bisect bad 756785300428a2d99ab9c22254dba54c453de120 # good: [eff94a4702346861a4d8383857e285a16ca05542] source 16e2d84e5d0d06879c51add11380083ceb644d61 git bisect good eff94a4702346861a4d8383857e285a16ca05542 # bad: [ebdfb6f8db30a4587cab222f24d20463c2628912] source b7968836e0922aaef013f09574e3c0db05b2d2e1 git bisect bad ebdfb6f8db30a4587cab222f24d20463c2628912 # bad: [d4b6a1133caee6d73038eac176a16721f2ab9e75] source 49efc2d00a674e4fa16aa10c19cafbb10e1573ef git bisect bad d4b6a1133caee6d73038eac176a16721f2ab9e75 # good: [b8371c1895ca6f8c1b8f2a165ce39d7251c12080] source f80c3e37e59285875bc9ec025661bcf1b8fc60eb git bisect good b8371c1895ca6f8c1b8f2a165ce39d7251c12080 # bad: [be8ee123a5a5445491f50ab06bd55bec03651710] source 21b7cb2737d95f281e28e248c4dad306a5c6463f git bisect bad be8ee123a5a5445491f50ab06bd55bec03651710 # bad: [e20adefdc653cc3e9a0d5de5eccf82f24362bacc] source 5cabee5488d63281ad6b2f96d2cafa513c065640 git bisect bad e20adefdc653cc3e9a0d5de5eccf82f24362bacc # bad: [3180dd0d360fd5e5c1716e84d159a15ef1029604] source 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 git bisect bad 3180dd0d360fd5e5c1716e84d159a15ef1029604 # first bad commit: [3180dd0d360fd5e5c1716e84d159a15ef1029604] source 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8
Here is a direct link to the problem commit, "PDF export: work with double page size": https://cgit.freedesktop.org/libreoffice/core/commit/?id=3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8
(In reply to S. Christian Collins from comment #2) > I can repro this bug as well with a page in letter size. Perhaps I have overlooked something but referring to this comment I changed the status from UNCONFIRMED to NEW.
(In reply to S. Christian Collins from comment #4) > Here is a direct link to the problem commit, "PDF export: work with double > page size": > > https://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 author Miklos Vajna <vmiklos@collabora.co.uk> 2017-05-25 16:37:04 +0200 committer Miklos Vajna <vmiklos@collabora.co.uk> 2017-05-25 21:15:00 +0200 commit 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8 (patch) tree a2490fd4b9ca47425becac5e021cc280f28a26b9 parent f80c3e37e59285875bc9ec025661bcf1b8fc60eb (diff) tdf#108056 PDF export: work with double page size Our coordinate system has the origo in the top left corner, PDF's one is at the bottom left corner. So the page height affects the coordinate of all widths and y positions. That page width is 870.25 in the case of the bugdoc, but it was handled as 870 due to the integer rounding. The coordinates and heights are now closer to the expected ones. Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one? Thanks
Aron Budea committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a7a419baf9a6aa9fc70d9e2a00dec3fbdeee565 tdf#112690: make page size of exported PDF closer to what is set It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The regression is fixed, backport to 6.1 is in gerrit. While the fix improves accuracy in many cases, there could still be a minimal discrepancy in sometimes due to unit conversion from 1/100 mm -> twips -> 1/100 mm, eg. width of A4 document becomes 210.01 mm instead of 210 mm (height is correct). This is a different issue, and is tracked in bug 103682.
Aron Budea committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5035a5ec51e29851eaf6c195e7e12320baed36f&h=libreoffice-6-1 tdf#112690: make page size of exported PDF closer to what is set It will be available in 6.1.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aron Budea committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/1e603213e76975d37d091a625dfd24d1ac036d78%5E%21 Don't check page size on Win for tdf#112690 unit test It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.