Re: [libreoffice-users] pdf forms (OT?)

2024-02-09 Thread Mike Scott

On 09/02/2024 08:17, Robert Großkopf wrote:

Hi Mike,



It still leaves the question of how to extract the data from the 
completed form. Perhaps I've not hit the right keyword, but I've found 
/nothing/ on the net. Surely if there's a way of filling in a form, 
there's one of reading it!!


I have tested (for German Base Handbuch) 
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/


Works with Linux this way:

for i in *.pdf ; do pdftk "$i" dump_data_fields_utf8 >> auswertung.txt ; 
done

...

Many thanks, that will work nicely. The output looks very easily 
parseable by perl, ready to make a sql database.



--
Mike Scott
Harlow, Essex, England


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] pdf forms (OT?)

2024-02-09 Thread Robert Großkopf

Hi Mike,



It still leaves the question of how to extract the data from the 
completed form. Perhaps I've not hit the right keyword, but I've found 
/nothing/ on the net. Surely if there's a way of filling in a form, 
there's one of reading it!!


I have tested (for German Base Handbuch) 
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/


Works with Linux this way:

for i in *.pdf ; do pdftk "$i" dump_data_fields_utf8 >> auswertung.txt ; 
done


Set *.pdf to the pdf file you need. All data could be read in the text 
file "auswertung.txt".
This file is formed in a special way. I used this formatting to get the 
data out of a form into a database by macro.


Regards

Robert
--
Homepage: https://www.familiegrosskopf.de/robert


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] pdf forms (OT?)

2024-02-08 Thread Fred James

Mike Scott wrote:

On 08/02/2024 18:14, Fred James wrote:

Mike Scott wrote:
Hi all. I've just been looking at making pdf forms with Writer. 
Easier than I'd thought.


I've been able to create a sample form with text fields and open 
this with xreader, evince or firefox. Firefox is able to display, 
edit and save a form whatever the content.


However, evince and xreader refuse to even show data for radio 
buttons or a checkbox control and will not alter the settings. 
Similarly, pdftotext does not print the setting of such a control.

..
Oh, and is there any known way (CLI) of extracting the data fields 
from a pdf form? pdftotext seems rather ham-fisted: surely there's 
something better!



Apologies if this is too far OT; but any advice would be helpful, 
thanks.



Mike Scott


Sorry ... not much experienece with LO pdf forms, or LO forms in 
general, but should very much like to know how your forms might 
function under Okular.  I am willing to try testing that for you, if 
you could send one of your forms to me attached to an email, but if 
you have access to Okular, your results would do as well.





Thanks for replying and for the offer. I've now installed Okular, and 
it does (once forms are enabled) allow editing and saving of the form. 
Presumably, evince and xreader are both buggy.


As well as my own efforts to see how things tick, I've also used the 
examples at the foot of this useful instructional page:
 




It still leaves the question of how to extract the data from the 
completed form. Perhaps I've not hit the right keyword, but I've found 
/nothing/ on the net. Surely if there's a way of filling in a form, 
there's one of reading it!!



Mike Scott
Thank you for your reply on the Okular results ... that answers my 
question, and I appreciate it.


As to extracting data in CLI, my first thought would be to use BASH 
scripting, Sed or Gawk (or a combination thereof) ... even the Vi editor 
has some search ability. ... does that help?

Regards
Fred James


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] pdf forms (OT?)

2024-02-08 Thread Mike Scott

On 08/02/2024 18:14, Fred James wrote:

Mike Scott wrote:
Hi all. I've just been looking at making pdf forms with Writer. Easier 
than I'd thought.


I've been able to create a sample form with text fields and open this 
with xreader, evince or firefox. Firefox is able to display, edit and 
save a form whatever the content.


However, evince and xreader refuse to even show data for radio buttons 
or a checkbox control and will not alter the settings. Similarly, 
pdftotext does not print the setting of such a control.

..
Oh, and is there any known way (CLI) of extracting the data fields 
from a pdf form? pdftotext seems rather ham-fisted: surely there's 
something better!



Apologies if this is too far OT; but any advice would be helpful, thanks.


Mike Scott


Sorry ... not much experienece with LO pdf forms, or LO forms in 
general, but should very much like to know how your forms might function 
under Okular.  I am willing to try testing that for you, if you could 
send one of your forms to me attached to an email, but if you have 
access to Okular, your results would do as well.





Thanks for replying and for the offer. I've now installed Okular, and it 
does (once forms are enabled) allow editing and saving of the form. 
Presumably, evince and xreader are both buggy.


As well as my own efforts to see how things tick, I've also used the 
examples at the foot of this useful instructional page:




It still leaves the question of how to extract the data from the 
completed form. Perhaps I've not hit the right keyword, but I've found 
/nothing/ on the net. Surely if there's a way of filling in a form, 
there's one of reading it!!


--
Mike Scott
Harlow, Essex, England


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] pdf forms (OT?)

2024-02-08 Thread Fred James

Mike Scott wrote:
Hi all. I've just been looking at making pdf forms with Writer. Easier 
than I'd thought.


I've been able to create a sample form with text fields and open this 
with xreader, evince or firefox. Firefox is able to display, edit and 
save a form whatever the content.


However, evince and xreader refuse to even show data for radio buttons 
or a checkbox control and will not alter the settings. Similarly, 
pdftotext does not print the setting of such a control.


I'm not sure this is strictly an LO issue, but has anyone met similar 
problems with LO-produced forms?


I'm working on Mint 21.2 (LO 7.3.7.2), but will need the resulting 
pdf's to be usable by Windows users too.



Oh, and is there any known way (CLI) of extracting the data fields 
from a pdf form? pdftotext seems rather ham-fisted: surely there's 
something better!



Apologies if this is too far OT; but any advice would be helpful, thanks.


Mike Scott
Sorry ... not much experienece with LO pdf forms, or LO forms in 
general, but should very much like to know how your forms might function 
under Okular.  I am willing to try testing that for you, if you could 
send one of your forms to me attached to an email, but if you have 
access to Okular, your results would do as well.


As a side note: I have had success in using both Firefox and Okular to 
complete, save, and print, downloaded Adobe Acrobat pdf forms, but not 
with any other pdf reader.  And I have never tested anything recently, 
on a Windows system as I don't have one.

Regards
Fred James

Mageia 8 64bit, Plaama desktop
$ uname -a
Linux localhost.localdomain 5.15.126-desktop-1.mga8 #1 SMP Fri Aug 11 
21:17:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

LO 7.4.5.1


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] pdf forms (OT?)

2024-02-08 Thread Mike Scott
Hi all. I've just been looking at making pdf forms with Writer. Easier 
than I'd thought.


I've been able to create a sample form with text fields and open this 
with xreader, evince or firefox. Firefox is able to display, edit and 
save a form whatever the content.


However, evince and xreader refuse to even show data for radio buttons 
or a checkbox control and will not alter the settings. Similarly, 
pdftotext does not print the setting of such a control.


I'm not sure this is strictly an LO issue, but has anyone met similar 
problems with LO-produced forms?


I'm working on Mint 21.2 (LO 7.3.7.2), but will need the resulting pdf's 
to be usable by Windows users too.



Oh, and is there any known way (CLI) of extracting the data fields from 
a pdf form? pdftotext seems rather ham-fisted: surely there's something 
better!



Apologies if this is too far OT; but any advice would be helpful, thanks.


--
Mike Scott
Harlow, Essex, England

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy