Age calculator for PDF

Talk about anything at all....
Post Reply
Open Wide
Posts: 9
Joined: Fri Aug 05, 2016 2:58 am

Age calculator for PDF

Post 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?
Last edited by MrProgrammer on Mon Apr 03, 2023 6:43 pm, edited 2 times in total.
Reason: Moved topic from Writer forum to General Discussion
OpenOffice 4.1.2 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11345
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: date of birth age calculator for PDF

Post 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.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Open Wide
Posts: 9
Joined: Fri Aug 05, 2016 2:58 am

Re: date of birth age calculator for PDF

Post by Open Wide »

I presume these limitations are due to patent/licensing concerns (Adobe) and thus will likely never be doable in Writer.
OpenOffice 4.1.2 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31265
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: date of birth age calculator for PDF

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: date of birth age calculator for PDF

Post 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.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Villeroy
Volunteer
Posts: 31265
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: date of birth age calculator for PDF

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
keme
Volunteer
Posts: 3692
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: date of birth age calculator for PDF

Post 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.
User avatar
Villeroy
Volunteer
Posts: 31265
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: date of birth age calculator for PDF

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply