LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Nov 2002 00:58:10 -0800
Reply-To:     John Kirkpatrick <johnk_uk@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         John Kirkpatrick <johnk_uk@HOTMAIL.COM>
Organization: http://groups.google.com/
Subject:      Re: SAS ODS: pdf bookmark nesting
Content-Type: text/plain; charset=ISO-8859-1

Bill,

I'll admit to not being a PDF expert, but I suspect the only solution may be a long and difficult one.

Here's the code I wrote to investigate your problem:

proc format; value clsfmt 0="Class 1" 1="Class 2";

data class; set sashelp.class; class = ranuni(0) le 0.5; format class clsfmt.; run;

proc sort data=class; by class sex; run;

ods listing close; ods printer pdf file="c:\test.pdf"; ods markup type=event_map file="c:\test.txt"; proc report data=class nowindows; column name age weight height; by class sex; define name/display; define age/display; define weight/display; define height/display; run; ods printer close; ods listing; ods markup close;

I don't know of an option to split the bookmarks in a PDF file, and I suspect there isn't one because part of the output from the Event_map tagset looks like this:

<branch event_name="branch" trigger_name="attr_out" class="ByContentFolder" value="class=Class 1 Sex=F" index="IDX" just="c" url="c:\test.txt#IDX" hreftarget="body">

In other words, only a single event is triggered to create the bookmark. This makes it unlikely that SAS can separate out the two variables automatically.

This means I can think of only two solutions:

1. Write a tagset version of the PDF destination. Unfortunately, the PDF destination, like the RTF destination is not implemented as a tagset and the Institute have no plans at the moment to release a tagset version of these destinations as they have for HTML. This means it's a start from scratch job. Ouch!

2. Drop the by group from the report spec and use your by variables as order variables. You can then use a separate compute after block for each order variable (with protectspecialchars=off in the style option) to emit the required PDF code for the bookmark to the PDF file. Unfortunately, my knowledge of PDF isn't up to this, but it should be possible: I've done similar things in a custom RTF tagset.

Of course if I'm wrong about the lack of a built in option, I've just wasted five minutes of your time as you read this! I look forward to comments from other people!

Regards,

John

Bill_Knowlton@BAXTER.COM (Bill Knowlton) wrote in message news:<OFBF5B2021.FBCDA945-ON88256C71.00753DA8@deerfield.baxter.com>... > Dear all, > > 'Was wondering if there's a way to control the bookmark nesting in the ods > pdf destination. > > Currently in a proc report with a by statement, say "by state city ;", the > pdf bookmarks do not nest city within state like: > > - Demographic Profiles > | > - state=CA > | > - city=Acton > | > - city=Adelanto > . > . > . > > but instead nest the by at only a single level as a 2-tuple: > > - Demographic Profiles > | > - state=CA city=Acton > | > - state=CA city=Adelanto > . > . > . > > Is there an option that one can specify to accomplish the second level > nesting as in the 1st example above? > > Thanks for any insights. > > -Bill


Back to: Top of message | Previous page | Main SAS-L page