COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### pdfmark

• Email
• Follow

how do i control the number of lines in a table of contents that refer
to a bookmark. I keep getting 2 lines in the toc which link to the
same location.

The first line in the toc is just as I want it with the appropriate
proclabel.
The second line (which i am trying to eliminate) says "output from
proc gslide".

Also how can I control the nesting of bookmarks. i.e. if i have a proc
print and a proc means for the same customer i would like both lines
in the toc to be indented below the customer name.

Is there a good reference for pdfmark besides the "ods printer faq"
which is too brief.

here are the pertinent lines of sas code i am using.

ods ps pdfmark file="&MEMB.F345.ps"  pdfnote toc;
ods proclabel "&bname";
ods ps anchor="&cseqnum";

 0
Reply dguinn (3) 7/7/2003 9:49:55 PM

See related articles to this posting

If you have SAS 8.2 the best way to control the bookmarks is with PROC
DOCUMENT, however, if you had SAS 8.2 you would probably be using the PDF
destination rather than ODS PS PDFMARK...

Also, your approach in SAS 8 - SAS 8.1 will depend on what PROCS YOU ARE
using...

SAS 8.2 or 9.0 example using PROC DOCUMENT (Andre take note!! :):

ods trace off;
ods document name=freqfix(write);
ods pdf file="C:\temp\Original freq.pdf" style=kdnewstyle;
ods proclabel "Highest bookmark";
proc freq data=sashelp.shoes;
table region*product/missing contents="Lower level bookmark";
run;
*ODS PDF CLOSE;

ods document close;

ods listing;
ods pdf exclude Properties;*Don't write the DOCUMENT output to our PDF;
proc document name=work.freqfix;run;
list/ details levels=all;run;

*Below Changes the Middle bookmark in PROC FREQ;
setlabel \Freq#1\Region_by_Product#1 "Distribution of Product's by Region";
obanote \Freq#1\Region_by_Product#1\CrossTabFreqs#1 ;
ods pdf exclude Properties;
list /details levels=all; run;
replay;
quit;

ods pdf exclude properties;
proc document name=work.freqfix;run;

copy \Freq#1\Region_by_Product#1\CrossTabFreqs#1 to \Freq#1;
run;
*This gets rid of an extra bookmark, probably what you want to do;
delete \Freq#1\Region_by_Product#1 ;
list  /details levels=all;
run;
replay;
quit;

ods pdf close;

For SAS V8+ (<8.2) you can change the bookmark labels, but it is not as
easy:

For PRINT, TABULATE, REPORT AND Multiway FREQS you can use CONTENTS=, for
other procs you need to modify their TABLE TEMPLATE, both techniques are
shown below:

*Use ODS PROCLABEL to modify Procedure level bookmarks;
ods pdf file="C:\documents and settings\khd8\desktop\Change the Procedure
(highest level) bookmarks.pdf" style=mynewstyle;
ods proclabel "Listing of sashelp.class data";
proc print data=sashelp.class (obs=5) contents="Only the first 5
observations";
var id age sex fastgluc;
run;
ods proclabel "Height and Weight Measures glucose Statistics";
Proc means data=sashelp.class n mean median min max;
var height Weight;
run;

Proc format; value high 0-120="OK" 120<-high="HIGH";
run;

ods proclabel "Distribution of gender, SASHelp.class data";
Proc freq data=sashelp.class ;
tables sex;
run;
ods pdf close;

*Edit the table templates for One way freqs and Summary(means);
proc template;

edit Base.Freq.Onewaylist;
mvar mylabel;
contents_label= mylabel;

end;
edit base.summary;
mvar mylabel;
contents_label=mylabel;
end;
run;

*Use the macro variable mylabel and ODS PROCLABEL To modify the bookmarks;
ods path SASuser.templat sashelp.tmplmst;
ods trace on;
ods pdf file="C:\temp\change procedure bookmarks.pdf" style=mynewstyle;
ods proclabel "Listing of sashelp.class data";
proc print data=sashelp.class (obs=5)contents="Only the first 5
observations";
var id age sex fastgluc;
run;
ods proclabel "HEIGHT and Weight Statistics";
%let mylabel=Mean Median Min and Max;
Proc means data=sashelp.class n mean median min max;
var Height Weight;
run;
ods proclabel "Distribution of gender, SASHELP.CLASS data";
%let mylabel=Percentage Male and Female;
Proc freq data=sashelp.class ;
tables sex;
run;
ods pdf close;
%let mylabel= ;
%let mylabl2=;
ods trace off;

There isn't an Easy way to Delete bookmarks without PROC DOCUMENT (there
isn't even a good hard way without modifying the PDF's themselves after the
fact...

This only sort of works:

proc format; value ages 0-29="<30" 30-high=">=30";
value weights 0-99="<100" 100-high=">=100";
value Height 0-<60="Less than 5'" 60-high="5 feet
+";
run;

ods Pdf  file="C:\temp\test.pdf" style=printer;

*Create a PDF With dummy bookmarks;
proc freq data=sasHelp.class;
*by age;
tables sex *Height/contents="Delete me";
tables age *height/contents="Delete me";
tables  weight*Height/contents="Delete me";
format age ages. weight weights. height height.;
run;

*Use DDE to blow them away!!!;

ods pdf close;
%let path=C:\temp\;

*Open word;
filename wordsys  dde "winword|system";
options noxsync noxwait noxmin;

data null;
length fid rc start stop time 8;
fid=fopen('wordsys','s');
if (fid le 0) then do;
rc=system('start winword');
start= datetime();
stop=start+10;
do while (fid le 0);
fid=fopen('wordsys','s');
time=datetime();
if (time ge stop) then fid=1; end;
end;
rc=fclose(fid);
run;

*We created three tables with extra bookmarks;
%let tablenum=3;
data _null_;
file wordsys;
put '[Fileopen .name="'"&path.test.pdf"'"]';*Open the file;
*Change a couple bookmarks, to show we can, not recommended, you should edit
the table templates;
put '[Editreplace .find="Table Weight * Height", .replace="Height, by
Weight",.replaceone,.wrap=1]';
put '[Editreplace .find="Table Age * Height", .replace="Height, by
Age",.replaceone, .wrap=1]';

*Go through and delete the extra bookmarks we don't need;
do i=1 to &tablenum;
put '[Editfind .find="Delete me", .direction=0, .wrap=1]';
put '[Editgoto .destination="l-2"]';
put '[Selectcursentence]';
put '[Linedown 6,1]';
put '[Editclear 1]';
end;
*This is based on how SAS currently writes PDF, which will probably change;
*It may take a little playing with to get it to work, and is more for fun
than a
real solution;
put '[FileSave]';
put '[Fileclose]';
put '[Fileexit]';
run;

*******************************************;
So Moral of the story, if you don't have SAS 8.2 you are probably stuck
editing your PDF in Acrobat, unless you want to get really creative...

But with 8.2 Proc Document makes it pretty easy!!

Let me know if you have Questions,

Kevin
Kdelaney@cdc.gov

-----Original Message-----
From: j erickson [mailto:dguinn@TRISTATEGT.ORG]
Sent: Monday, July 07, 2003 5:50 PM
Subject: pdfmark

how do i control the number of lines in a table of contents that refer to a
bookmark. I keep getting 2 lines in the toc which link to the same location.

The first line in the toc is just as I want it with the appropriate
proclabel. The second line (which i am trying to eliminate) says "output
from proc gslide".

Also how can I control the nesting of bookmarks. i.e. if i have a proc print
and a proc means for the same customer i would like both lines in the toc to
be indented below the customer name.

Is there a good reference for pdfmark besides the "ods printer faq" which is
too brief.

here are the pertinent lines of sas code i am using.

ods ps pdfmark file="&MEMB.F345.ps"  pdfnote toc;
ods proclabel "&bname";
ods ps anchor="&cseqnum";

 0
Reply khd8 (68) 7/8/2003 2:15:01 PM

1 Replies
73 Views

Similar Articles

12/17/2013 7:30:01 AM
page loaded in 39737 ms. (0)

Similar Artilces:

EPSfile ioerror and pdfmark
I have an EPS file generated with Photoshop that we had used for over a year without a problem. However recently as our volumes have gone up we've started to get the following error: %%[ Error: ioerror; OffendingCommand: pdfmark ]%% Stack: [{photoshop_metadata_stream} (<?xpacket begin=3D"=EF=BB=BF" id=3D"W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x=3D"adobe:ns:meta/" x:xmptk=3D"3.1.1-111"> <rdf:RDF xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Descripti...)] (<?xpacket begin=3D"=EF...

stamp PDF files with pdfmark ?
Hello, I need to put a simple stamp at the bottom of my generated PDF files (this is a single string). I would like to know if it would be possible to do that with the help of Adobe's PDFMark ? I tried some samples from the PDFMark Manual, it works great however I could not find the way to put a simple string into the PDF :-( I will look further but any help is appreciated ... Thanks Chris nufin <nufin> wrote: >I need to put a simple stamp at the bottom of my generated PDF files >(this is a single string). I would like to know if it would be possible >to do that wit...

pdfmark oddity with imported eps
Has anybody experienced this and or have a workaround. In Acrobat Distiller 7.0, when using pdfmark to set the DOCINFO for the PDF... If I set the Title and Author and then call in an eps, the resulting PDF contains the Title and Author of the embeded eps. I have tried calling pdfmark at the end of the document after the eps has been embeded but the results are still this same. I'm not sure, but I don't think this was the case with Distiller 6 multiset_iii@yahoo.com wrote: > > Has anybody experienced this and or have a workaround. > > In Acrobat Distiller 7.0, when u...

embedding images using pdfmarks
Hello, I am trying to embed a jpeg image into a PDF produced by distilling a PS file. This image will be used for creating the appearance of a push-button [widget annotation]. My question is, how do I get the binary data of a jpeg image into the XObject's stream, using a pdfmark? The pdfmark standard [version 6, Page 17] mentions two methods for adding content to a stream: 1. [ {streamname} string /PUT pdfmark--- Can the binary contents of the image file be pushed through in a string? If yes, the content might imbalance the delimiting parenthesis of the string. Will escaping the parenth...

pdfmark, annotations, and PDF/X
The code below (which puts a clickable link on a page) distills correctly on both Mac and PC distiller, if the settings are "Standard" or "Smallest File Size". With settings of any of the PDF/X or PDF/A variants, it errors "Annotations were found inside the BleedBox, TrimBox, or ArtBox". Please, how can I prevent this, or test for the likelihood of the non-distillation? %! /pdfmark where {pop} {/globaldict where {pop globaldict} {userdict} ifelse /pdfmark /cleartomark load put} ifelse (Test page) mark exch /Label exch /PAGELABEL pdfmark /TimesNewRomanPS-BoldMT...

Embedding EPS images using pdfmark
In 2004 Thomas Merz answered to a similar question for embedding JPEG images as button symbols using pdfmark instructions. http://groups.google.com/group/comp.text.pdf/browse_thread/thread/56fa7b86e555b6cc I successfully rebuilt the situation and added a rectangle to hide the original image (because the button was meant to be non-printing). I am still experimenting with using a direct EPS instead of the JPEG- turned-into-EPS, but until now to no avail. I would be glad for any hints. - Michael On Apr 28, 9:50=A0pm, Michael M=FCller-Hillebrand <i...@cap-studio.de> wrote: > In 2004 ...

including eps files with pdfmark links
Hello, Hopefully I can explain clearly what I'm trying to do. I have a whole bunch of figures in postscript format to include in a LaTeX document. Currently I have a shell script that generates a large .tex file with entries like the following for each figure. % % mydwg % \begin{figure}[htbp] \centering \setlength{\hsize}{7.5in} \includegraphics[angle=90,width=7.5in,height=9.0in]{mydwg.eps} \caption{mydwg} \label{fig:mydwg} \end{figure} \clearpage The caption and the label come from the name of the file. I may or may not reference these figures directly in the text. I'm using t...

Using the Graphics Encapsulation pdfmarks (BP,EP,SP)
I am working on adapting a currently working postscript flow so that it can be readily "distilled" to PDF. As I have mentioned in other postings earlier this year, the current flow makes heavy use of pre-RIPed postscript files stored on the Xerox RIP's hard disk. These pre-RIPed files of course have source versions on our PCs, which I convert to EPS so they can be run'ed from the postscript. I am programming a version of the flow that can be sent to the printer, displayed on screen, or distilled to PDF, all using the same ps file. I am using this structure to determine if ...

[pdfmark] create Image XObject from PS file during PS->PDF conversion
Hi newsgroup, I'm trying to create an Image XObject from an external PS file, containing an image or a vector graphics, using pdfmarks and the `(file.eps) (r) file' Postscript command during destilling (preferably by means of Ghostscript). The resulting XObject is later to be used as a ressource, not for usual display on the page. Help (maybe working code snippets?) is greatly appreciated. Thanks, Alexander Alexander Grahn wrote: > Hi newsgroup, > > I'm trying to create an Image XObject from an external PS file, > containing an image or a vector graphics, using pd...