Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expanding / collapsing text in PDF

6,189 views
Skip to first unread message

Mário Guimarães

unread,
Sep 7, 2006, 5:43:52 AM9/7/06
to
Dear all,

I'd like to know if it is possible to have a PDF file having the following
behavior.
Imagine a PDF like this,

Text1 .... Text1 Text1
[+] Text2 .... Text2 Text2

where "[+]" is a small picture that when clicked would expand a text
paragraph to show the following text

Text1 .... Text1 Text1
[-] Note on text1 ...
continuation of note on text1
Text2 .... Text2 Text2

At this time if I clicked "[-]" then the note text would collapse to show
Text1 .... Text1 Text1
[+] Text2 .... Text2 Text2

Is this behavior possible in PDF using Acrobat Reader?
How can I create a PDF having this behavior?
Please help me.

Best Regards,
Mário


Dick Margulis

unread,
Sep 7, 2006, 6:39:31 AM9/7/06
to


Is it POSSIBLE? Lots of things are possible, and this may be one of
them. If I assert here that it's not possible, someone like Don
Lancaster will probably call me a fool for saying so.

However, you might consider an alternative design. Provide some sort of
small graphic on the page, such as your plus sign, and use it to trigger
a popup with the desired additional text. This can be done using
built-in capabilities of Acrobat, without trying to force the PDF camel
through the eye of a javascript needle.

Mário Guimarães

unread,
Sep 7, 2006, 8:22:36 AM9/7/06
to
Hi,

my intent is to selectively choose the paragraphs of text I'd like to see
and print,
and a "popup-like" solution will hide text below the popup,
but I'd like to see that text at the same time I see the text of the note
(the one you suggest in a popup).

For example, I'd not like to hide the "Text2 ..." text when I'm seeing the
"Note ....",
I'd like that Acrobat to "move" down "Text2 ...." to show the "Note ...".
That's why I want an "Expand/Collapse" solution, and not an "Overlay-like"
solution

Hope you can help me how can this be done in PDF.

Best Regards
Mário


"Dick Margulis" <marg...@comcast.net> wrote in message
news:12fvtnm...@news.supernews.com...

Dick Margulis

unread,
Sep 7, 2006, 9:53:25 AM9/7/06
to
Mário,

I believe it was Mick Jagger who first pointed out that you can't always
get what you want, but if you try, sometimes you get what you need.

You have not explained why you want to do this in a PDF where it is at
least difficult and probably impossible*. It is a straightforward and
common technique in Web design and you can implement it either by
writing your own code or using any of a number of available plug-ins on
a Web page.

Dick

* I believe it is impossible to do what you describe in a PDF; I may be
wrong. Here's a kludge, though: Create separate document pages, each
showing the result of expanding one of your plus signs. When someone
clicks a plus sign on the main page, jump to one of the other pages.
When the user clicks the minus sign, jump back to the main page. If you
want to have multiple rows expanded at the same time, this will quickly
become too cumbersome to implement. If you only need to have one row
expanded at a time, this may solve your problem, albeit awkwardly.

Mário Guimarães

unread,
Sep 7, 2006, 11:22:00 AM9/7/06
to
Dick,

I like Mick Jagger too: a little "old" but still sounds pretty good !
So it seems "impossible" to do with PDF (or at least the effort is not
worthwhile)

Yup, you're write respecting doing this via (D)HTML: it is very easy (and it
may be the only reasonable
way to do at present).

However, my idea was to use LaTex to write a document (using some PDF
package) where there would
be two kinds of paragraphs: "normal text paragraphs" and "note paragraphs"
following them,
distribute the document in PDF format, and provide the reader the chance to
select which notes
to print along with the "normal text paragraphs". So I would have the best
of the world:
- excellent typesetting quality (as provided per LaTex);
- excellent portability as provided by PDF;
- "printer-ready" (HTML prints awfully, not like a PDF);
- and liberty to "configure" what to print.

This was the idea.

But the world is not perfect and "you can't always get what you want".

Anyway thanks for your answers.

Regards
Mário

PS: regarding your suggestion, as you say, it would be much cumbersome for
what is my intent.


"Dick Margulis" <marg...@comcast.net> wrote in message

news:12g0937...@news.supernews.com...

Steven

unread,
Sep 7, 2006, 1:23:07 PM9/7/06
to
PDF prints so well because the content is not dynamic.

--
--
Steven

http://www.glimasoutheast.org

"Mário Guimarães" <mario.g...@novabase.pt> wrote in message news:45003923$0$5121$a729...@news.telepac.pt...

bugbear

unread,
Sep 8, 2006, 5:20:51 AM9/8/06
to Dick Margulis
Dick Margulis wrote:
> Mário,
...>

> * I believe it is impossible to do what you describe in a PDF; I may be
> wrong. Here's a kludge, though: Create separate document pages, each
> showing the result of expanding one of your plus signs. When someone
> clicks a plus sign on the main page, jump to one of the other pages.
> When the user clicks the minus sign, jump back to the main page. If you
> want to have multiple rows expanded at the same time, this will quickly
> become too cumbersome to implement. If you only need to have one row
> expanded at a time, this may solve your problem, albeit awkwardly.

Indeed. It's amazing how similar a large enough "table" of prepapred
results can look to something dynamic.

Some (video) DVD games and menu navigation "looks"
like dynamic/intelligent software, but is actually just navigation
of a large number of pre-cooked pages.

BugBear

0 new messages