BookmarkSubscribeRSS Feed
SuzyG_
Calcite | Level 5

I have been asked to output a table in both RTF and HTML.  I have a macro that adds "Page x of y" to the title in the RTF output, but have been unsuccessful in finding anything that will work in HTML. Is there a way to directly convert the RTF file (with the correct page numbers) into an HTML document?

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, HTML does not have pages as such from my recollection.  I would go back and check what the requirement for HTML is, I wouldn't expect reviewers want to see a HTML document, least I have never heard of it.

One option, maybe use Word to open the RTF and then save to HTML.  Thing is HTML is just one long page so it may look odd having page numberings half way down the page - dependant on the renderer used to view.

Cynthia_sas
SAS Super FREQ

Hi:

  You are correct. Any page numbers that are put on an HTML document happen in the printing interface between the browser and the printer.  By then, SAS is out of the picture. The HTML specification by the W3C does not have page numbering in the specification for the HTML tags. There may be something in the CSS specification about paged media, but I believe that HTML displayed on the screen is considered continuous media, not paged media. You can look at the W3C CSS spec here http://www.w3.org/TR/CSS21/page.html

  Generally the only ODS destinations that support "Page X of Y" page numbering are RTF and PDF -- and you don't necessarily need a macro for them, you can just use ODS ESCAPECHAR functions {thispage} and {lastpage} with the current ESCAPECHAR.

cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1119 views
  • 0 likes
  • 3 in conversation