How to create a "flatten" action button for PDF form

Discuss the word processor

How to create a "flatten" action button for PDF form

Postby leftdefense » Fri Nov 20, 2020 9:51 pm

Hi,

I am currently using OpenOffice Writer to create simple PDF forms for my employees.
Howerver, legally, these forms need to be archived for a really long time.

So i need to be able to quickly convert the dynamic PDF form to a static (or flatten) PDF/A. Preferably with a single click button.
A normal flatten PDF (not PDF/A) would be okay too, since my e-sign program can convert a PDF to PDF/A.

I actually acheive this manually by using a PDF printer. It is a pain since i have to choose the printer, specify the format and create a separate file.

I was thinking about setting a button on the form that activates some code that flattens the current document. However, even though adding a button is easy, i have never coded in OpenOffice.

Can someone help me create and set the code for this button?

Thanks a lot.
Apache Open office 4.1.7
Windows 10 Pro
leftdefense
 
Posts: 2
Joined: Fri Nov 20, 2020 9:26 pm

Re: How to create a "flatten" action button for PDF form

Postby RoryOF » Fri Nov 20, 2020 10:08 pm

Just set the PDF/ A-1a setting in the /File /Export as PDF.
Apache OpenOffice 4.1.8 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31744
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How to create a "flatten" action button for PDF form

Postby leftdefense » Mon Nov 30, 2020 4:47 pm

RoryOF wrote:Just set the PDF/ A-1a setting in the /File /Export as PDF.

It does flatten the .ODT form but it is not what i'm looking for.
I want to fill a PDF form (so the field must not be flatten at first) and then with a button, they go flatten.
The button that flattens the PDF form will be executed after filling the form in Adobe Reader, not in OO. (The users that will fill the form won't even have OO installed)
Apache Open office 4.1.7
Windows 10 Pro
leftdefense
 
Posts: 2
Joined: Fri Nov 20, 2020 9:26 pm

Re: How to create a "flatten" action button for PDF form

Postby Bidouille » Tue Dec 01, 2020 3:06 pm

leftdefense wrote:The button that flattens the PDF form will be executed after filling the form

Unable to execute this kind of action.
Exported PDF with AOO can not embed any Javascript: https://bz.apache.org/ooo/show_bug.cgi?id=62843
User avatar
Bidouille
Volunteer
 
Posts: 378
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: How to create a "flatten" action button for PDF form

Postby Villeroy » Tue Dec 01, 2020 3:17 pm

Just open a new instance of the same PDF
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28854
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Writer

Who is online

Users browsing this forum: No registered users and 28 guests