Bug 152966 - PDF export as fillable PDF result does not follow Tab order of the writer 'Activation Order...' dialog
Summary: PDF export as fillable PDF result does not follow Tab order of the writer 'Ac...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2023-01-10 16:45 UTC by Mike Sapsard
Modified: 2024-01-19 14:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
File that demonstrates problem (2.21 MB, application/vnd.oasis.opendocument.text)
2023-01-10 16:48 UTC, Mike Sapsard
Details
File that shows problem, but is sanitised for contact details. (2.21 MB, application/vnd.oasis.opendocument.text)
2023-01-11 09:32 UTC, Mike Sapsard
Details
pdf output file, with tab order errors. (105.75 KB, application/pdf)
2023-01-11 09:33 UTC, Mike Sapsard
Details
Simple form to demonstrate tab order (127.41 KB, application/pdf)
2023-01-14 13:14 UTC, Mike Sapsard
Details
writer file to create pdf demo (125.72 KB, application/vnd.oasis.opendocument.text)
2023-01-14 13:19 UTC, Mike Sapsard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Sapsard 2023-01-10 16:45:24 UTC
Description:
After creating a form in writer for a fillable pdf, and setting the tab/activation order, the tab order has changed in pdf readers.

Steps to Reproduce:
1.Build single page form document in Writer.
2.Set tab/activation order
3.Export to FDF, archive or tagged pdf
4. Open in any reader that allows tabbing, and the tab order will have changed.

Actual Results:
Tab order had changed

Expected Results:
Tab order should not change


Reproducible: Always


User Profile Reset: No

Additional Info:
Nothing to add. Will send file once bug report is filed.
Comment 1 Mike Sapsard 2023-01-10 16:48:40 UTC
Created attachment 184563 [details]
File that demonstrates problem

File that demonstrates problem
Comment 2 Mike Sapsard 2023-01-11 09:32:14 UTC
Created attachment 184576 [details]
File that shows problem, but is sanitised for contact details.

Removed sensitive personal data from earlier file.
Comment 3 Mike Sapsard 2023-01-11 09:33:37 UTC
Created attachment 184577 [details]
pdf output file, with tab order errors.

File (pdf) displaying tab/activation order errors.
Comment 4 Mike Sapsard 2023-01-14 13:12:35 UTC
I have worked out what the problem is. The activation/tab order is not followed if one text box is slightly higher than another.
For instance, if the tab order is set to textbox 1, text box 2, text box 3, text box 4, and text box 4 has a Position Y that is smaller than that of text box 3, text box3 will be tabbed to first.
The new simplified attachment shows this.
Comment 5 Mike Sapsard 2023-01-14 13:14:29 UTC
Created attachment 184660 [details]
Simple form to demonstrate tab order

Simple example test file
Comment 6 Mike Sapsard 2023-01-14 13:18:01 UTC
Writer form for simple pdf.
Comment 7 Mike Sapsard 2023-01-14 13:19:12 UTC
Created attachment 184661 [details]
writer file to create pdf demo
Comment 8 Robert Großkopf 2023-01-15 07:58:07 UTC
Have tested with 4 text controls, which had to been set to single line. Created the tab order. Tabulator jumps to the controls I defined with tab order: Up left, down left up right down right.
Couldn't see a buggy behavior here.
Tested with
Version: 7.4.4.2 / LibreOffice Community
Build ID: 85569322deea74ec9134968a29af2df5663baa21
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Please add a Writer file with a form with wrong tabbing order.
Please add the version of LO you are using for creating this form.
Comment 9 Mike Sapsard 2023-01-15 13:49:48 UTC
Try moving one of the text boxes to a slightly higher position on the page. On my system, this changes the tab order. I do not have tabbing order set to automatic.
Comment 10 Robert Großkopf 2023-01-15 14:22:26 UTC
(In reply to Mike Sapsard from comment #9)
> Try moving one of the text boxes to a slightly higher position on the page.
> On my system, this changes the tab order. I do not have tabbing order set to
> automatic.

Tried it. Tab order in Writer form an tab order in exported PDF is the same.

If I won't set the tab order for a field the tab order will work as follows: Upper left corner to upper right corner. All control fields that lie further below are later accessed with the tabulator.

Why didn't you show the Linux-version you are using here? Might be you are using a version of your distribution, which could have special buggy behavior.
Why didn't you add a little form, which shows the buggy behavior. It should be a Writer document, not exported pdf documents. So everybody might see: Tab order in Writer document isn't the same as in pdf-document.

I couldn't confirm any bug here.

Tested with LO 7.4.4.2 on OpenSUSE 15.3 64bit rpm Linux.
Comment 11 Buovjaga 2023-03-17 12:23:46 UTC
(In reply to Robert Großkopf from comment #10)
> Why didn't you show the Linux-version you are using here? Might be you are
> using a version of your distribution, which could have special buggy
> behavior.
> Why didn't you add a little form, which shows the buggy behavior. It should
> be a Writer document, not exported pdf documents. So everybody might see:
> Tab order in Writer document isn't the same as in pdf-document.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information and document.
Comment 12 Mike Sapsard 2023-03-17 13:14:35 UTC
These are my Linux details:

Kernel: 5.15.0-67-generic x86_64 bits: 64 
compiler: gcc v: 11.3.0 
Desktop: Cinnamon 5.6.8
tk: GTK 3.24.33 
wm: muffin 
dm: LightDM 
Distro: Linux Mint 21.1 Vera 
base: Ubuntu 22.04 jammy
Comment 13 Buovjaga 2023-03-17 13:18:30 UTC
(In reply to Mike Sapsard from comment #12)
> These are my Linux details:
> 
> Kernel: 5.15.0-67-generic x86_64 bits: 64 
> compiler: gcc v: 11.3.0 
> Desktop: Cinnamon 5.6.8
> tk: GTK 3.24.33 
> wm: muffin 
> dm: LightDM 
> Distro: Linux Mint 21.1 Vera 
> base: Ubuntu 22.04 jammy

Ok, now you should also copy and paste here the contents of your Help - About (LibreOffice - About on macOS) by clicking the copy button and also attach an example document.
Comment 14 QA Administrators 2023-09-14 03:06:04 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2023-10-15 03:16:39 UTC Comment hidden (obsolete)
Comment 16 V Stuart Foote 2023-10-15 12:38:56 UTC
from meta.xml of OPs sample ODF attachment 184576 [details]

LibreOffice/7.4.3.2$Linux_X86_64 LibreOffice_project/1048a8393

1. open attachment 184576 [details] in writer
2. place into design mode (Form -> Design Mode)
3. open form navigator dialog (Form -> Form Navigator...)
4. open form tab order dialog (Form -> Activation Order...)
5. verify the tab order while in writer follows the sequence in the 'Tab Order' activation order dialog; while noting it differs from the sequence in the 'Form Navigator'
6. Export as PDF, use the Create PDF form checkbox with the FDF template
7. open the resulting PDF in Adobe Reader and use its Fill & Sign mode
8. the tab order does not match the sequence of the 'Activation Order...' dialog

rather seems to follow the *raw* sequence of the 'Form Navigator...'

Also did a 2nd export having exited design mode (so no involvement of bug 94596), same result 

IMHO an issue with the PDF export filter.

=-testing-=

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 17 Robert Großkopf 2023-10-15 15:05:23 UTC
(In reply to V Stuart Foote from comment #16)
> from meta.xml of OPs sample ODF attachment 184576 [details]
> 
> LibreOffice/7.4.3.2$Linux_X86_64 LibreOffice_project/1048a8393

Why do you test with such an old version. Tested again, now, with LO 7.6.2.1, OpenSUSE 64bit rpm Linux.

> 8. the tab order does not match the sequence of the 'Activation Order...'
> dialog

Here the tab order is exactly the tab order of the *.odt-Document. I open the document, set the cursor in field for tabulator '1' ("Bank Transfer"). It's the field, which will be chosen by automatic order. Tab moves to "Join", then to "Name", "Mem No.", "Mobile" …
Exported document in PDF does the same here with Okular.

The automatic tab order will have a look at the position of the fields. Y-Position decides first, Y-Position second. So it starts with "Bank Transfer". It is positioned at first position. It doesn't change to "Cheque", because it is a checkbox for the same control name. Only one could be chosen.

Question: Where do you see a tab order, which differs from the tab order in Writer?
Comment 18 Mike Sapsard 2023-10-15 18:32:25 UTC
I thin you will find that in January 2023, that old version of LO was the current version.
I thought I had commented that the problem was no longer there.
Comment 19 Robert Großkopf 2023-10-15 19:06:28 UTC
(In reply to Mike Sapsard from comment #18)
> I thin you will find that in January 2023, that old version of LO was the
> current version.
> I thought I had commented that the problem was no longer there.

So let us set this bug to WORKSFORME.
Comment 20 V Stuart Foote 2023-10-15 21:59:47 UTC
(In reply to Robert Großkopf from comment #17)

> 
> Question: Where do you see a tab order, which differs from the tab order in
> Writer?

Hi Robert, the issue is not with document opened in Writer. Rather it is with tab movement between fields of the exported PDF opened in Adobe Reader (Core ver. 23.1536 x64 on Win10).

That movement sequence looks to match the field sequence as listed in the LO 'Form Navigator...' dialog as opened in Writer with the ODT being edited.
Comment 21 Buovjaga 2023-10-16 05:07:20 UTC
Confirmed steps in comment 16, using Adobe Reader.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cb46ad4c4602fbb6aeab482e9370e31495e12cfe
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded
Comment 22 Robert Großkopf 2023-10-16 06:09:43 UTC
(In reply to Buovjaga from comment #21)
> Confirmed steps in comment 16, using Adobe Reader.
> 
So I can't test here. With Okular an Foxit Reader (Wine) it runs well under OpenSUSE 15.4. Seems Adobe Reader doesn't read tabstops …
Comment 23 Mike Sapsard 2023-10-16 06:33:22 UTC
I use LinuxMint Document Reader, Ocular and Foxit to test. They all gave the same results on tabbing.
Comment 24 Buovjaga 2023-10-16 06:47:22 UTC
(In reply to Mike Sapsard from comment #23)
> I use LinuxMint Document Reader, Ocular and Foxit to test. They all gave the
> same results on tabbing.

That's strange: Okular gives me a different result (advancing logically) from Adobe Reader.
Comment 25 Buovjaga 2023-10-16 08:34:23 UTC
Comment from dev chat:
'Probably someone needs to debug how Adobe does this, I would suggest building a test document using this: https://acrobatusers.com/tutorials/how-do-i-set-up-tab-order-in-a-form/ and then seeing how the output PDF compares to our PDF.
But that essentially makes this less of a bug and more of a feature request in the sense of "make our output pdf have more magic to make Acrobat happy"'

It seems like a job for professional support https://www.libreoffice.org/get-help/professional-support/
Comment 26 Gerald H 2024-01-19 14:12:27 UTC
Found a solution that results in correct behavior of Acrobat.
In PDF Options the flag "Tagged PDF (add document structure)" needs to be unchecked. 
Then a specific tab sequence is correctly handled by Acrobat Reader.

By default the flag is set when libre office is installed new.

Tested in this environment:
In Libre Office Writer version 7.6.4.1
Acrobat Reader 2023.008.20470
Windows 11 Ürp - 10.0.2261 Build 2261