How can I maintain tab order When Exporting to PDF form

I have inserted a table in my form, it has 5 columns and 8 rows. the top row is the labels for each column and the left column are just numbers (1-7) the remaining 28 segments each have a textbox in them. I inserted the texboxes in the order i would fill out the form (row 2 column 2, row 2 column 3, row 2 column 4, row 2 column 5, row 3 column 2…ect). I export the form as a PDF and it works great except that my Tab stops are all over the place. I’ve gone back in and edited the tab order but it doesn’t matter. I would like for the user to be able to fill in this form in a sensible orderly fashion, not chasing the cursor willy nilly all over the form.
What gives?
I would like an answer even if it is “I’m sorry this is a glitch and there is no work around” not just for someone to close the topic in a month like the last time this question was asked here

1 Like

So you insert a few text boxes using the forms control, right clicked it, opened control properties and edited “tab order”?
If I do that and then export to PDF it works just fine.

yes. the tab order is correct in the .ODT but when I export to PDF its all screwed up. Is there maybe a setting in the PDF options window that I dont have correct? I have “Create PDF” checked and submit format as PDF, under Structure, I have “Export Outlines” checked.

Mine is FDF but even if I set it to PDF it still works the way it should for me.

Same for me.
Can you create a sample .odt file maybe?

Sample.odt (12.9 KB)

I found something strange about that:
Using evince (a document viewer in debian linux with gnome DE) everything works as expected (i.e. as set up in “tab order”) BUT the date field gets ignored for some reason.
If I open it in firefox, however, it works perfectly fine and exactly as defined in “tab order”. But if I deliberately change the tab order to something crazy, firefox too doesn’t handle them right. Seems like firefox handles them left to right, from top to bottom of the document.

If tab orders are part of the pdf, they must be in its source code. So doing cat Sample.pdf should show them somewhere… and if the order is wrong, we would be able to see the wrong order in the pdf source. But I couldn’t find out where they are stored.

Maybe try opening the pdf with another pdf viewer and also try web browsers and see if they behave differently. If they do, I don’t think there’s a way to fix this issue.

If you have a pdf file with tab orders that are actually working as intended, I’d love to have a look at their source.

Tested with Adobe Reader, Adobe Acrobat, PDF X-Change Editor, Nuance PDF Viewer Plus, Microsoft Edge, & Firefox.

  • All tabbed in order from my pdf exported using original file
  • I altered the order to Text1, Text4, Text9, Date1, Text2… Only Firefox did not follow the new order.

Looks like a bug with Firefox

Version: 7.5.5.1 (X86_64) / LibreOffice Community
Build ID: 2c5e46c1980ec5241359fd65d751dc518205e7af
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

Ok, I finally got a chance to play with this some. First of all my system is Debian 12 (bookworm) I installed Okular Version 22.12.3 ( a nightmare of its own) and the files work flawlessly, the only caveat being that you need to click the “show forms” button to fill it, but once this is done the tab order works. Then I tried it with Brave web browser version 1.56.14, and once again it all works. now this is where it gets sort of weird, I tried with Firefox and for me this also worked as it should (version 102.13.0esr) so on my system the only one I’ve found so far that doesn’t work is the built in Gnome “Document Viewer 43.1”

I think maybe it isn’t ignoring the date field , but it is putting it first in the tab order, because that is also how it acts for me. Evince is what I was using with my original file and it tabs all over the place

You could try exporting as Tagged pdf as well to see if Evince will follow order, see PDF3: Ensuring correct tab and reading order in PDF documents | Techniques for WCAG 2.0

But maybe it is just a bug in Evince

Note that Help says

Tagged PDF (add document structure)

Select to write PDF tags. This can increase file size by huge amounts.

Tagged PDF contains information about the structure of the document contents. This can help to display the document on devices with different screens, and when using screen reader software.

saving as “tagged” doesn’t seem to help, the tab order stays the same no matter how i change it. it seems strange that my Firefox works and yours doesn’t. As for me, I am happy knowing that it works for most PDF applications and will just issue a warning about Evince. I am pleased with the ability of creating fallible PDF forms with Writer.
Thanks to both of you for your help figuring this out

1 Like

I opened a bug for evince: Tab order (forms) not working properly in evince up to version 45.beta (#1965) · Issues · GNOME / evince · GitLab.

I just had the same problem using Foxit PDF Reader (v2023.3.0.23028) on Windows 11 (LibreOffice 7.6.2).

As soon a I deselected “Tagged PDF”, the Tab order in the PDF file became correct and no longer crazy.

Solution:

  • Make sure “Tagged PDF” is NOT selected! (it ruins the Tab order).

screenshot - ask.libreoffice.org - 2024.02.05 - Time-14_28_28