Hi,
Ok, I have been banging my head against a wall for too long on what should be a very simple task. What I want is an output file, of type PDF, with one bookmark - this being for page 1, not other bookmarks.
I have tried half a dozen different methods and none of them seem to work.
So if I try:
ods proclabel="My bookmark";
title "A title";
footnote "A footnote";
ods pdf file="want.pdf";
ods pdf bookmarkgen;
proc sgplot data=sashelp.class;
scatter x=age y=height;
run;
ods pdf nobookmarkgen;
proc sgplot data=sashelp.class;
scatter x=age y=weight;
run;
ods pdf close;
This creates the PDF correctly, with titles/footnotes, with my bookmark, but also with the secondary bookmark "The sgplot procedure". Attempting to description="" to the first proc sgplot removes that text, but still leaves a bookmark there.
I have also tried proc document. However when I run graphs through that, they work fine for RTF destination, titles/footnotes, but in PDF titles/footnotes are not showing (i.e. have RTF and PDF open when replay is called). I can move the graphs up to the top level, but I still also get bookmarks for each graph, but now no titles or footnotes.
ods document name=tmp(write);
title "A title";
footnote "A footnote";
proc sgplot data=sashelp.class;
x=age y=height;
run;
proc sgplot data=sashelp.class;
x=age y=weight;
run;
ods document close;
ods rtf file="myfile.rtf";
ods pdf file="myfile.pdf";
proc document name=tmp;
replay;
run; quit;
ods rtf close;
ods pdf close;
In the above, the RTF has titles, the PDF has no titles (bad). The RTF has no bookmarks (good), the PDF has four bookmarks, two for each proc (bad).
For the bookmarks I tried adding:
proc document name=tmp;
setlabel \SGPlot#2\SGPlot#1 '';
move \SGPlot#2\SGPlot#1 to SGPlot#1;
delete \SGPlot#2;
replay;
run; quit;
However I still get no titles in the PDF, and I have one bookark with two sub bookmarks then.
(Do note, this is an example, there maybe several proc statements, from report and sgplot and GTL, I still only want one bookmark per output file).
Why can this process not be simply, as I surely can't be the only person who wants one bookmark per output:
ods pdf file="want.pdf" bookmark="my bookmark";
...
ods pdf close;
Its really frustrating that this seeming simple task looks like it requires third party tools to make effective.
... View more