Issue 53453 - Buttons get exported as transparent buttons in PDF
Summary: Buttons get exported as transparent buttons in PDF
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: 680m122
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO PleaseHelp
Assignee: AOO issues mailing list
QA Contact:
Keywords: needmoreinfo, oooqa
Depends on:
Reported: 2005-08-17 16:20 UTC by magog
Modified: 2013-07-30 02:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Sample document (6.54 KB, application/vnd.oasis.opendocument.text)
2005-08-17 16:20 UTC, magog
no flags Details
Exported PDF (20.92 KB, application/pdf)
2005-08-17 16:21 UTC, magog
no flags Details
PDF containing "proper" button object with red background (added with Adobe Acrobat) (6.76 KB, application/pdf)
2008-01-02 17:00 UTC, magog
no flags Details
Button object moved to the right. (24.81 KB, application/pdf)
2008-01-02 17:41 UTC, magog
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description magog 2005-08-17 16:20:12 UTC
If you export a document containing a colored button to PDF, the button itself
is generated transparent, but the on the background of the page, a colored
rectangle gets rendered.

Afterwards, it's not possible to modify the button (i.e. hide it by setting it's
hidden flag) using Adobe Acrobat or any other tool.  The button should be
exported "standalone" and the color and font informations should be contained in
the button object, not the page it lies on.
Comment 1 magog 2005-08-17 16:20:48 UTC
Created attachment 28859 [details]
Sample document
Comment 2 magog 2005-08-17 16:21:10 UTC
Created attachment 28860 [details]
Exported PDF
Comment 3 michael.ruess 2005-08-19 12:12:47 UTC
Reassigned to HI.
Comment 4 h.ilter 2005-08-19 15:06:35 UTC
Passed to FS
Comment 5 jbf.faure 2007-12-31 19:04:05 UTC
@magog : can you be more specific, I don't understand where is the problem. How
should be the pdf ?
Comment 6 Frank Schönheit 2008-01-02 08:11:42 UTC
fs->pl: Care to comment on this?
Comment 7 magog 2008-01-02 13:53:22 UTC
Okay, I'll try to describe it better:
1. Create a new document in OOo and add a button on it.
2. Change the background color of the button to red for example.
3. Export the document as PDF.

In the PDF, the button is generated as
1. A red rectangle.
2. A text containing the caption of the button.
3. A transparent button object.

This results in a few problems:
1. You can't hide the button by changing the flag in the button object as you
will always see the rectangle and the caption text.
2. You can't change the background color or caption from the button object.

The button should instead be exported only as button object that can contain all
the necessary properties / settings.

Hope that makes things a bit clearer.

BTW: I just tested with OOo 2.0.3 on Windows and the problem still exists.
Comment 8 jbf.faure 2008-01-02 16:34:13 UTC
magog : did you mean that PDF file generated by OOo should show a functional 
(clickable) button ? Is it possible in PDF format ? 
Comment 9 magog 2008-01-02 16:45:54 UTC
Yes, OOo already generates a clickable button in the PDF, but it's always
transparent instead of using the properties setup in the OOo file.

You can check out the attached files for an example.
Comment 10 magog 2008-01-02 17:00:44 UTC
Created attachment 50629 [details]
PDF containing "proper" button object with red background (added with Adobe Acrobat)
Comment 11 jbf.faure 2008-01-02 17:34:15 UTC
Ok I understand better but unfortunately I don't have Adobe Acrobat under Linux 
to analyze differences between generated pdf and the last one. Under Adobe 
Reader both pdf files look similar.
Comment 12 magog 2008-01-02 17:40:50 UTC
I'll add a copy of the "53453_button_background.pdf" with the button object
moved to the right (starts between the two "t" of the caption). As you can see,
it's no longer clickable on the left half of the visible button, but further on
the right side of it.
Comment 13 magog 2008-01-02 17:41:36 UTC
Created attachment 50630 [details]
Button object moved to the right.
Comment 14 jbf.faure 2008-01-02 18:28:28 UTC
For me the clickable area is only above the letters "ton" of "button". 
Elsewhere the cursor has the form of an hand.
Comment 15 Rainer Bielefeld 2008-03-10 07:49:02 UTC
If I understand the problem correctly: 
OOo creates a transparent (rectangle) object with the button function and some
separate rectangle background with red colour (and caption?).

Acrobat creates a red colour rectangle object with button function, so no
further "background objects" are required.

The problem is:
If you try to modify the OOo button in exported PDF with ACROBAT, all
modifications will be only for the transparent button object (that has been
moved in "53453_button_moved.pdf"), ACROBAT sees the OOo created "background
rectangle" as a separate object, no chance to modify it with the "Edit button"
functions of ACROBAT.

If my resume is correct, this should be fixed for 3.0

is my resume correct?
Comment 16 magog 2008-03-10 09:36:35 UTC
Yes, this resume is correct.
Comment 17 philipp.lohmann 2008-03-10 14:16:05 UTC
That would be PDFWriter, not fs's domain
Comment 18 philipp.lohmann 2008-03-10 14:18:16 UTC

However the current implementation was chosen since it worked reliably back to
Acrobat reader 5, which cannot be said about an implementation using two
appearance streams (for pressed/unpressed button).
Comment 19 Rob Weir 2013-07-30 02:14:20 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.