Bug 139530

Summary: FORMCONTROLS Text Box Vertical Alignment option ignored during PDF export
Product: LibreOffice Reporter: stiliyan
Component: Printing and PDF exportAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: trivial CC: buzea.bogdan, ilmari.lauhakangas, kelemeng
Priority: medium    
Version: 7.0.4.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103378    
Attachments: Example file from Writer made per instructions
PDF export of the example file
Screenshot of the example file and its export in Evince

Description stiliyan 2021-01-11 01:59:48 UTC
Description:
When exporting a Writer document with Form Controls as a PDF, it appears that the the export process is ignoring the value set in `Control Properties -> Vert. Alignment`. The setting is obeyed within Writer itself (when I turn off Design Mode), but in the PDF text entered in the fields is always centered vertically, even when `Vert. Alignment` was set to top, bottom or default. So far, I can confirm this is the case when PDF is viewed with Okular and Google Chrome Browser.

Steps to Reproduce:
1. From the `Form Design` toolbar, click on the `Design Mode` button to enable design mode.
2. In the `Form Controls` toolbar, select `Text Box`.
3. Click and drag anywhere in the Document to create the text box.
4. Right click on the text box and select `Control Properties`.
5. In the Properties dialog, scroll down to where the `Vert. Alignment` option is, and try setting it to any value other than Middle or default.
6. Click on the `Export directly as PDF` button in the main toolbar.
7. Open the PDF with your favourite PDF viewer/editor (e.g. Okular, Google Chrome); it may ask if it should show forms, confirm with yes.
8. Enter some text in the text box.
9. Then go into Print Preview

Actual Results:
In print preview, the text appears vertically aligned in the middle of the text box, even though the value of `Vert. Alignment` was not set to middle.

Expected Results:
In print preview, the text should show up at the very top of the Text Box if `Vert. Alignment` was set to top, or at the very bottom of the text box if it was set to bottom.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: en-CA (en_CA.UTF-8); UI: en-US
Debian package version: 1:7.0.4-3
Calc: threaded
Comment 1 Laurynas 2021-02-09 18:20:34 UTC
I can confirm that the bug is present in

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-US
Calc: threaded
Comment 2 Gabor Kelemen (allotropia) 2023-09-26 22:53:37 UTC
Created attachment 189838 [details]
Example file from Writer made per instructions
Comment 3 Gabor Kelemen (allotropia) 2023-09-26 22:53:52 UTC
Created attachment 189839 [details]
PDF export of the example file
Comment 4 Gabor Kelemen (allotropia) 2023-09-26 22:54:23 UTC
Created attachment 189840 [details]
Screenshot of the example file and its export in Evince