When a word document with multiple objects inserted in header section is converted to pdf, pdf file is not converted properly. The document's header section is displaying at the middle of the page.
Steps to Reproduce:
1. Convert file to PDF using 'soffice --headless --nolockcheck --nodefault --nofirststartwizard --nologo --norestore --convert-to pdf --outdir /tmp /tmp/test.docx'
2. Open PDF using a viewer
3. Observe the document's header section is displaying at the middle of the page.
Document's header section is displaying at the middle of the page.
Should have header at its original place.
User Profile Reset: No
Created attachment 160833 [details]
DOCX with header section
Created attachment 160834 [details]
Snapshot of the pdf
Created attachment 161035 [details]
DOCX compared MSO LO
Wrong report for many reasons:
- version cannot be 4.1 but probably 6.1
- it's not convert but fileopen problem
- headless is not important, same with GUI, so shouldn't be mentioned
- it's DOCX, important
- fileopen was not fine but is worse since 6.1.
I confirm the issue per screenshot.
Per bibisect 6.1, worse since:
1808bcf38cda75eb2e4315ec399b91e1cbb003f6 is the first bad commit
Author: Jenkins Build User <email@example.com>
Date: Sun Jan 21 23:12:18 2018 +0100
Previous source sha:e455baf19c3096f46cdcf6279590d7a59775f1fa
commit ff8826d438a9fd080e8e61f8e66b3d3b2c8d752b [log]
author Patrick Jaap <firstname.lastname@example.org> Mon Jan 15 16:43:07 2018 +0100
committer Thorsten Behrens <Thorsten.Behrens@CIB.de> Sun Jan 21 22:57:54 2018 +0100
parent e455baf19c3096f46cdcf6279590d7a59775f1fa [diff]
tdf#113946 add 'topMargin' to GraphicHelpers import
The case '...topMargin' was not caught for setting a relative
vertical position in GraphicHelpers. The test file demands a '7' here,
which stands for 'PAGE_FRAME'. The '7' was overwritten in GraphicImport in case
'LN_CT_Anchor_positionV' by a call of 'resolve'.
For a better overview a switch is inserted here.
Tested-by: Jenkins <email@example.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Created attachment 161036 [details]
DOCX compared MSO LO 4.4 6.0 7.0+
There were changes in 4.4. Disregarding color improvement, there was size change, which seems worse (unless something else is better):
64c8b13f248fe7ea3808c7f8e62d0d656f170378 is the first change commit
Author: Matthew Francis <firstname.lastname@example.org>
Date: Sat Mar 14 21:42:08 2015 +0800
Author: Miklos Vajna <email@example.com>
AuthorDate: Wed Jun 18 11:57:31 2014 +0200
Commit: Miklos Vajna <firstname.lastname@example.org>
CommitDate: Wed Jun 18 12:09:15 2014 +0200
oox: import WPS shape with text as shape with textbox
This allows having real shapes (like having rounded corners) and complex
content (like containing a table) at the same time.
WPS shapes are wrappers around drawingML markup in DOCX files, so this
only affects the DOCX import.
The green textbox is wider because it has its width set as relative 100% to left margin - see bug #132976 about that.
It is vertically centered because originally it's set to be centered relative to top margin (this seems to center it vertically inside the header), which is imported incorrectly as centered relative to "Entire page".
Created attachment 164117 [details]
Simple example file with top/centered/bottom alignment of shapes relative to top margin
Based on the example document in bug #103611 (but converted to DML) this file illustrates the top/centered/bottom alignment relative to the top page margin.
Created attachment 164118 [details]
Screenshot of attachment #164117 [details]
Version: 188.8.131.52.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Current nightly from 2020-08-10 04:49:35
Szabolcs Toth committed a patch related to this issue.
It has been pushed to "master":
tdf#133045 sw: add shape alignment to the top page border
It will be available in 7.1.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:
Affected users are encouraged to test the fix and report feedback.
Version: 184.108.40.206.alpha1+ (x64)
Build ID: 72056f39e01e36afac36c62988331b6813c8214f
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Thanks for fixing!
Created attachment 167354 [details]
DOC saved in MSO from DOCX
DOC also seems fine.