<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unicode in ODS PDF not working with proc template in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673159#M202450</link>
    <description>&lt;P&gt;Thanks ballardw for the reply!&lt;BR /&gt;Apologize for not providing more info.&amp;nbsp; Please see the snippet of code below. Style template is the original one but the data on which it is being used is a test data. Thanks once again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods path(prepend) work.templat(update);&lt;BR /&gt;proc template;&lt;BR /&gt;define style cust;&lt;BR /&gt;parent=styles.rtf;&lt;BR /&gt;replace fonts / 'titlefont2'=("Courier New, Courier",8pt)&lt;BR /&gt;'titlefont'=("Courier New, Courier",8pt)&lt;BR /&gt;'Strongfont'=("Courier New, Courier",8pt)&lt;BR /&gt;'EmphasisFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'FixedEmphasisFont'=("Courier New, Courier",2)&lt;BR /&gt;'FixedStrongFont'=("Courier New, Courier",2)&lt;BR /&gt;'FixedHeadingFont'=("Courier New, Courier",2)&lt;BR /&gt;'BatchFixedFont'=("SAS Monospace,Courier New, Courier",2)&lt;BR /&gt;'FixedFont'=("Courier New, Courier",2)&lt;BR /&gt;'headingEmphasisFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'headingFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'docFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'footFont'=("Courier New, Courier",8pt);&lt;BR /&gt;style table from table / rules=groups&lt;BR /&gt;frame=above&lt;BR /&gt;cellspacing=0.25&lt;BR /&gt;cellpadding=1.0;&lt;BR /&gt;replace header / rules=none frame=void&lt;BR /&gt;font = fonts('HeadingFont');&lt;BR /&gt;style systemtitle from systemtitle / asis=on;&lt;BR /&gt;style systemfooter from systemfooter / asis=on;&lt;BR /&gt;replace headersAndFooters from cell / font=fonts('HeadingFont')&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white;&lt;BR /&gt;replace Body from Document "Controls the Body file. " / bottommargin = 1in&lt;BR /&gt;topmargin = 1in&lt;BR /&gt;rightmargin = 1in&lt;BR /&gt;leftmargin = 1in;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf file="C:\Users\dummy\Desktop\test.pdf" style=styles.cust notoc;&lt;BR /&gt;proc report data=sashelp.cars(where = (make = 'Toyota')) nowd split='*' headline headskip ls=132 ps=47 missing spacing=1 formchar(2)='_';&lt;BR /&gt;column model msrp MPG_City;&lt;BR /&gt;define model / "Model 模型";&lt;BR /&gt;define msrp /"MSRP" center width=10 ;&lt;BR /&gt;define MPG_City / "AVG 平均&amp;#129;" center width=14 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jul 2020 14:55:53 GMT</pubDate>
    <dc:creator>CP20</dc:creator>
    <dc:date>2020-07-29T14:55:53Z</dc:date>
    <item>
      <title>Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673129#M202436</link>
      <description>&lt;P&gt;All,&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for looking into this!&lt;BR /&gt;&lt;BR /&gt;Here is the problem -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am printing chinese characters in pdf using proc report and ods pdf. Initially there was no issue but as soon as I created a proc template and used the style from proc template in ods pdf, it is not able to print the characters correctly. Upon searching I think the reason is I need to "embed" the style cause there is a chance that PDF won't recognize the style+unicode [in oppose to just style which usually works with ods pdf].&lt;BR /&gt;Has anyone encountered a situation like this or any suggestion of how to overcome this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 13:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673129#M202436</guid>
      <dc:creator>CP20</dc:creator>
      <dc:date>2020-07-29T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673145#M202445</link>
      <description>&lt;P&gt;As a minimum you should share 1) the definition of the template, one assumes you mean a style; 2) some data in the form of a data step that will behave as described; 3) the proc report code using that data; and 4) the Ods PDF statement used to create the document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is how many moving parts you have involved and without some concrete examples to work with a lot of guessing is the main result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the report worked more or less correctly without the custom style then one suspects the main issue is the style definition.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 14:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673145#M202445</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-29T14:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673159#M202450</link>
      <description>&lt;P&gt;Thanks ballardw for the reply!&lt;BR /&gt;Apologize for not providing more info.&amp;nbsp; Please see the snippet of code below. Style template is the original one but the data on which it is being used is a test data. Thanks once again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods path(prepend) work.templat(update);&lt;BR /&gt;proc template;&lt;BR /&gt;define style cust;&lt;BR /&gt;parent=styles.rtf;&lt;BR /&gt;replace fonts / 'titlefont2'=("Courier New, Courier",8pt)&lt;BR /&gt;'titlefont'=("Courier New, Courier",8pt)&lt;BR /&gt;'Strongfont'=("Courier New, Courier",8pt)&lt;BR /&gt;'EmphasisFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'FixedEmphasisFont'=("Courier New, Courier",2)&lt;BR /&gt;'FixedStrongFont'=("Courier New, Courier",2)&lt;BR /&gt;'FixedHeadingFont'=("Courier New, Courier",2)&lt;BR /&gt;'BatchFixedFont'=("SAS Monospace,Courier New, Courier",2)&lt;BR /&gt;'FixedFont'=("Courier New, Courier",2)&lt;BR /&gt;'headingEmphasisFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'headingFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'docFont'=("Courier New, Courier",8pt)&lt;BR /&gt;'footFont'=("Courier New, Courier",8pt);&lt;BR /&gt;style table from table / rules=groups&lt;BR /&gt;frame=above&lt;BR /&gt;cellspacing=0.25&lt;BR /&gt;cellpadding=1.0;&lt;BR /&gt;replace header / rules=none frame=void&lt;BR /&gt;font = fonts('HeadingFont');&lt;BR /&gt;style systemtitle from systemtitle / asis=on;&lt;BR /&gt;style systemfooter from systemfooter / asis=on;&lt;BR /&gt;replace headersAndFooters from cell / font=fonts('HeadingFont')&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white;&lt;BR /&gt;replace Body from Document "Controls the Body file. " / bottommargin = 1in&lt;BR /&gt;topmargin = 1in&lt;BR /&gt;rightmargin = 1in&lt;BR /&gt;leftmargin = 1in;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf file="C:\Users\dummy\Desktop\test.pdf" style=styles.cust notoc;&lt;BR /&gt;proc report data=sashelp.cars(where = (make = 'Toyota')) nowd split='*' headline headskip ls=132 ps=47 missing spacing=1 formchar(2)='_';&lt;BR /&gt;column model msrp MPG_City;&lt;BR /&gt;define model / "Model 模型";&lt;BR /&gt;define msrp /"MSRP" center width=10 ;&lt;BR /&gt;define MPG_City / "AVG 平均&amp;#129;" center width=14 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 14:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673159#M202450</guid>
      <dc:creator>CP20</dc:creator>
      <dc:date>2020-07-29T14:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673172#M202455</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;Just a side note. HEADLINE, HEADSKIP, LS, PS and SPACING option, as well as WIDTH= are all ignored by ODS PDF. Those are all LISTING only options that are ignored by ODS PDF.&lt;BR /&gt;&lt;BR /&gt;I see the Chinese characters in your header, but are those characters available in the Courier New font that you've specified???&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. I have not run your code yet but to test the display in Courier New and several other fonts, I compared what you originally posted with how Word displays the characters in some selected fonts without having SAS in the picture at all. Here's what I see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1596036335534.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47769i13E7835B506CAD7C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1596036335534.png" alt="Cynthia_sas_0-1596036335534.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that without SAS being involved, Arial, Calibri and Courier New all put an extra character at the end of the string for Avg -- the other string looks OK to me. Is this what you say is an issue? If so, the issue is not coming from SAS or the template. It's coming from the font you're using.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673172#M202455</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-07-29T15:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673176#M202457</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;BR /&gt;&lt;BR /&gt;Thanks for the side note. Probably in rush I just copied over.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;At this point, I have very little knowledge of how the fonts work. From your question it seems like not all the font's support Chinese characters. So in that case, how do we check whether "Courier New" supports Chinese or in fact any other fonts? I am sorry if I am reply your question with a question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673176#M202457</guid>
      <dc:creator>CP20</dc:creator>
      <dc:date>2020-07-29T15:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673178#M202458</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how my output looks -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CP20_0-1596036701834.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47770iD17EC9E6A4EAB939/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CP20_0-1596036701834.png" alt="CP20_0-1596036701834.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673178#M202458</guid>
      <dc:creator>CP20</dc:creator>
      <dc:date>2020-07-29T15:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673188#M202461</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Clearly you had the fonts available on your system when you typed or copied and pasted the code. That is the font you need to use. But the other issue is that you don't know whether your document viewers will have the same font on their system. So you'll need to either find a common font that has all the characters or you'll need to do font embedding. Without knowing what fonts you are using with SAS on your system, it nothing more than guessing at this point. You would be better served, I think, by opening a track with Tech Support for more directed help on using fonts for your reports.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 16:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673188#M202461</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-07-29T16:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673405#M202581</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for checking into this.&amp;nbsp;&lt;BR /&gt;I found out a solution. Since the SAS font template wasn't compatible with PDF font, I tried different fonts and it worked. We can provide a list of font family in the style template to overcome the issue. For e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace fonts / 'titlefont2'=("&amp;lt;sans-serif&amp;gt;, Courier New, Courier",8pt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks once again!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 12:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673405#M202581</guid>
      <dc:creator>CP20</dc:creator>
      <dc:date>2020-07-30T12:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode in ODS PDF not working with proc template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673468#M202607</link>
      <description>Hi:&lt;BR /&gt;  Please revisit your template code. The REPLACE statement was deprecated in SAS 9.2 and the preferred usage is either the CLASS or STYLE statement. If you are still running SAS 9.1, then REPLACE was usable syntax in template code. In newer versions of SAS, you should try not to use REPLACE.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 30 Jul 2020 15:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unicode-in-ODS-PDF-not-working-with-proc-template/m-p/673468#M202607</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-07-30T15:35:40Z</dc:date>
    </item>
  </channel>
</rss>

