graphs are not shown in pdf when option CONTENTS is used in ODS PDF

Discussion in 'SAS (Statistical Analysis Software)' started by thomas, Nov 2, 2008.

  1. thomas

    thomas Guest


    I've got a problem when I want to include a table of contents in a pdf
    via option "contents" in ODS PDF statement.
    In that case, graphs are not shown in pdf anymore (as it is the case
    when option "contents is not used).

    For illustration see the example below.

    By the way, another question: It is possible to reduce number of
    levels in table of contents as it is done by pdftoc=2 for bookmarks?

    Thank you for any hints.

    ods listing close;
    filename output1 'd:\test_output1.pdf';
    ODS pdf file=output1 startpage=no contents pdftoc=2;

    title "test program";

    data temp1;
    set sashelp.class;
    ods pdf startpage=now;
    ods proclabel 'Descriptive statistics';
    title3 "height";
    ods pdf startpage=now;
    proc tabulate data=temp1 contents="table 2: height";
    var height;
    table height * (N="N" mean="Mean" stddev="SD");
    ods proclabel 'Figures';
    title3 "scatterplot";
    ods graphics on;
    proc sgplot data=sashelp.class;
    scatter x=height y=weight;
    ods graphics off;
    ods pdf close;
    ods listing;
    thomas, Nov 2, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.