Is it possible to change style of automatically generated table of content (proc report to pdf) and to add a header as it is absent on this page (or custom text before content). If it is, please, give a hint.
I am not sure what you mean by "Header" ... when I run Example 1 below, I see the string 'Table of Contents' at the top of my PDF contents page. If you run Example 1 and do NOT see 'Table of Contents' at the top of the page, then you should work with Tech Support.
In Example 2, I create a new style template based on STYLES.PRINTER and change the Content Title style attribute of the TEXT element to something silly, like "Wombat". Then, when I use the new template, I see the new string in the PDF output -- at the top of the contents information.
** 1) header is "Table of Contents";
ods pdf file='c:\temp\toc.pdf' contents=on;
proc print data=sashelp.class;
proc freq data=sashelp.class;
ods pdf close;
Not sure. Normally, I would use a title statement to get an image (such as a logo) into a PDF file, but with the contents page, there is no title used on that page. So, that leaves you with a style template change to use PREIMAGE on one of the contents-related style elements.
But, I'm not sure that PREIMAGE is one of the style attributes that you can set in a style template for a Table of Contents page. This would be a question for Tech Support.