Page 1 of 1
Age calculator for PDF
Posted: Wed Aug 19, 2020 6:33 pm
by Open Wide
Can the PDF form store a value and compute the person's age from it, then output their age into a text box? I have the DOB date fields setup as dropdowns for calendar selection, which is preferable, but I can change that if necessary. I know calculations can be done in some PDF creators, but OO Writer? Perhaps via macro wizardry?
Re: date of birth age calculator for PDF
Posted: Wed Aug 19, 2020 6:48 pm
by Zizi64
The AOO Basic+API macros can not run in a PDF file. The PDF readers not support the foreign macro codes nor the foreign API. Otherwise the macro code will not be stored into a PDF file.
Re: date of birth age calculator for PDF
Posted: Wed Aug 19, 2020 6:54 pm
by Open Wide
I presume these limitations are due to patent/licensing concerns (Adobe) and thus will likely never be doable in Writer.
Re: date of birth age calculator for PDF
Posted: Wed Aug 19, 2020 7:07 pm
by Villeroy
PDF is a print out to a file. PDF stores characters, lines, pictures and their positions on virtual paper sheets, no matter if the print out comes from an office suite, a CAD/CAM application, a web page, email or database application. PDF stores what is painted on paper sheets if you would print it.
Re: date of birth age calculator for PDF
Posted: Wed Aug 19, 2020 11:03 pm
by RusselB
PDF forms can be created with dropdown boxes and calendar displays for date entry, and thus ages can be calculated, but I only know of one software that does this, and that's the full Adobe Acrobat DC suite, which you would have to purchase to access those capabilities.
Re: date of birth age calculator for PDF
Posted: Thu Aug 20, 2020 10:14 am
by Villeroy
I've never seen any such a thing. To make this happen, you need Adobe tools to create and the fully fledged Adobe reader to show. I did not install any Adobe product during the past 15 years.
Re: date of birth age calculator for PDF
Posted: Wed Aug 26, 2020 6:46 am
by keme
AFAIK:
The programming language supported in pdf files is javascript.
Several pdf readers will support javascript. I have used it in Foxit and Adobe readers.
Some pdf editors claim to support javascript. I have only used it from Adobe Acrobat.
OpenOffice and its "offspring" will not embed any macro programming into pdf files exported.
Re: date of birth age calculator for PDF
Posted: Wed Aug 26, 2020 12:24 pm
by Villeroy
Libre/OpenOffice supports JavaScript as a macro language. Thes does not help because the API (the thing you talk to) would be the API of some PDF viewer rather than the office API.