BookmarkSubscribeRSS Feed
RameshReddy
Calcite | Level 5

Dear Team,

i have html quotes in text that i want show in proper format thru ods pdf,

below code is located in data set,

<p><font face='Zurich BT, sans-serif'><font size='2' style='font-size: 11pt'>As per the calendar of reviews approved by

the Board of Directors of the Bank, the Audit Committee is required to review, on a half-yearly basis, the loss assets

with a balance of </font></font><font face='Rupee Foradian, sans-serif'><font size='2' style='font-size: 11pt'>`

</font></font><font face='Zurich BT, sans-serif'><font size='2' style='font-size: 11pt'>1.0 million and above in each

account outstanding for more than two years and where legal action has not been initiated.</font></font></p>

i want to show this in pdf like below format,

Asper the calendar of reviews approved by the Board of Directors of theBank, the Audit Committee is required to review, on a half-yearlybasis, the loss assets with a balance of `1.0million and above in each account outstanding for more than two yearsand where legal action has not been initiated.

thanks

4 REPLIES 4
NN
Quartz | Level 8 NN
Quartz | Level 8

Hi,

I think you should look at ODS PDF TEXT =

and ODS ESCAPECHAR=

It should help in what i think you are trying to achieve.

RameshReddy
Calcite | Level 5

thanks for ur response NN,,but ODS ESCAPER is still showing same status

Tom
Super User Tom
Super User

You cannot render HTML code into PDF with SAS.  You could generate an HTML file an use another tool like Adobe Acrobat to convert the HTML into a PDF file.

Now if what you really want to do is display some parts of your PDF file with different fonts then look at this page of tips on using ODS PDF on the SAS website.

http://support.sas.com/rnd/base/ods/odsprinter/

In particular look at this document.

http://support.sas.com/resources/papers/sgf2008/odspdf.pdf

Cynthia_sas
SAS Super FREQ

Hi,

  I'm not entirely sure I understand what the real need is. I do not have either of those fonts on my system, so I could not check the existence of the "grave accent" or the rupee symbol character in the fonts which the OP showed (in the string `1.0 million ). However, in Courier New and Arial and Verdana, the "grave accent" character is Unicode 0060 and the Rupee symbol is Unicode 20A8 in Arial Unicode MS. So if the issue is how to change fonts, that is possible using an ODS ESCAPECHAR and STYLE override. If the issue is how to insert a unicode string, (if the Zurich BT and/or the Rupee Foradian fonts have the grave accent or similar symbol that is needed), then ODS ESCAPECHAR with the UNICODE function allows that.

  The code below was used to create the attached screenshot using ODS PDF and SAS 9.3. I attached additional screenshots that show the "grave accent" symbol in 3 different fonts (using Windows Character Map) and also one that shows the Rupee sign as a Unicode character.

cynthia

data longchar;

length longcharvar $500 shortvar $50;

shortvar = '^{unicode 20A8}1.0 million';

longcharvar = catx(' ',

           '^{style[font_face="Courier New"]As per the calendar of reviews',

           'approved by the Board of Directors}',

           'of the Bank, the Audit committee is required',

           '^{style[font_face="Courier New"]to review, on a half-yearly basis,}',

           'the loss assets with a balance of ^{unicode 0060}1.0 million and',

           'above in each account, outstanding, for more than two years and where',

           'legal action has not been initiated.');

run;

       

options nodate nonumber;

      

ods listing close;

ods escapechar='^';

ods pdf file='c:\temp\insert_unicode_char.pdf' style=journal

        bookmarkgen=yes bookmarklist=hide;

proc report data=longchar nowd

     style(report)={rules=none frame=void cellspacing=0 width=100%}

     style(column)={fontfamily='Verdana, sans-serif' font_size=11pt};

  title 'Use Unicode Escapechar to insert grave accent and switch fonts in mid-sentence';

  column shortvar longcharvar;

  define shortvar / display 'Use Unicode Rupee Symbol';

  define longcharvar/ display 'Use Grave Accent';

run;

ods _all_ close;


grave_accent_arial.jpguse_unicode_in_pdf.jpgrupee_arial_unicode.jpggrave_accent_courier.jpggrave_accent_verdana.jpg

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 1400 views
  • 0 likes
  • 4 in conversation