Page 1 of 1

[Solved] Searching for leads on info about creating PDF form

PostPosted: Tue Mar 10, 2015 10:53 pm
by mtiernan
I've been doing a lot of searching and I've come up empty so far.
I'm asking here for a pointer to where to look for this.
(Of course, if I'm on a fool's errand, please let me know.)

I want to create a simple PDF form which has a date field to be filled in.
I want to do a very simple job of formatting the entry to a standardized layout.
This should be runnable on just about any of the "common" tools for filling in a PDF form.

I've already done these things:
  1. Having created a form using the draw tool I then,
  2. Created a form field to be filled in using a "Formated Field" (as well as a date field),
  3. Export the PDF properly which allows me to fill the form in.

So, the specific problem I'm looking to address:
How can I attach a script (of any type) to this field to be executed when filled in.
Or is this NOT possible with OpenOffice?

Thanks for everyone's bandwidth.

Re: Searching for leads on info about creating a PDF form.

PostPosted: Wed Mar 11, 2015 9:17 pm
by MTP
I think you'd need a PDF editor (which OpenOffice is not) to create an interactive pdf file.
You can make interactive forms in OpenOffice with any component (Writer is the most popular followed by Calc), and for extra functionality the forms can be connected to a database through a Base file. But the interactive nature of the forms is lost if they are exported to pdf.

Re: Searching for leads on info about creating a PDF form.

PostPosted: Wed Mar 11, 2015 9:27 pm
by mtiernan
That's what I was suspecting. Thank you for the reply.

To aid in the clarification for myself and others, is this statement true?

Any document, of any type, the embedded macros are only able to be used while in a "writing" state, such as writing a wordprocessor document, manipulating spreadsheets, etc.

Re: Searching for leads on info about creating a PDF form.

PostPosted: Fri Mar 13, 2015 10:52 am
by keme
Not quite. Roughly, one may say that macros embedded in a document can only be counted on as long as the document is kept in the suite's native storage format, and open in one of the incarnations of OpenOffice.

  • Saving as MS document might preserve macro code, but even if that happens, the document structure itself will be changed. This will render many macros unusable even when the document itself is in a "writing state" (i.e. fully editable ; macros might fail for this reason even when the file is reopened in OpenOffice).
  • AFAIK, export to PDF will disregard macros entirely. Simple interactivity using basic form elements will still work.
    I haven't checked with javascript macros, but at least this seems to be the case for "StarBasic" macros (AFAIK the only programming language widely supported for macro embedding in PDF is Javascript, and there is experimental support for Javascript macros in OpenOffice. My knowledge in this area may be dated or otherwise flawed...).
  • Several other Office suites (including Microsoft Office) can open ODF (OpenOffice native storage format) documents. However, they may not have support for the language used for your macros, and/or data structures comprising the "program environment". Again, macros may be rendered unusable in an otherwise fully editable document.
  • You can lock a document to prevent editing, and macros may still run. Locking may interfere with the macros' ability to manipulate content, though.

Re: Searching for leads on info about creating a PDF form.

PostPosted: Fri Mar 13, 2015 2:01 pm
by mtiernan
keme wrote:Not quite. Roughly, one may say that macros embedded in a document can only be counted on as long as the document is kept in the suite's native storage format, and open in one of the incarnations of OpenOffice.


Thank you. I realized /after/ I sent that message that I said it wrong. You stated what i expected. Thank you.

I believed I had this right but also belive it's good to double check one's assumptions. :)
I'm hoping that this may clear it up for anyone else who follows.

Thanks!