<?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 Use/selection of Outline font for separator page simulation - Script in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/use-selection-of-outline-font-for-separator-page-simulation/m-p/3997019#M8082</link>
    <description>Using HP 5Si, HP9050dsn, and HP9050mfp printers&lt;BR /&gt;&lt;BR /&gt;The following is a vbscript file that creates a simulation of a PCL separator page.&lt;BR /&gt;I am using a version in a VB application that is running on a server and prints documents&lt;BR /&gt;directly from the server. The VB application provides a UserId to this routine to embed&lt;BR /&gt;the UserId in the separator page and then prepends this file in front of the document&lt;BR /&gt;print-stream.&lt;BR /&gt;&lt;BR /&gt;It works fine except that the UserId is very dark because of it's size. I would prefer to &lt;BR /&gt;use an outline font or something else that would not use so much toner.&lt;BR /&gt;&lt;BR /&gt;I have preceded the lines in question with "******************************".&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any help.&lt;BR /&gt;Tim&lt;BR /&gt;&lt;BR /&gt;PS If you know of a more appropriate area for this posting, please let me know.&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;Option Explicit&lt;BR /&gt;&lt;BR /&gt;Call BannerTest &lt;BR /&gt;&lt;BR /&gt;Sub BannerTest()    'BannerTest&lt;BR /&gt;Dim sFName, sPrinter, sPath&lt;BR /&gt;sPrinter = "\\Dcpp100\z_HP52$"&lt;BR /&gt;sFName = "XXX.pcl"&lt;BR /&gt;sPath = GetVbsPath                              ' Script Path&lt;BR /&gt;If CreateBannerPS(sPath, sFName, "TBS2", sPrinter) Then&lt;BR /&gt;  PrintDoc sPath &amp;amp; sFName, sPrinter&lt;BR /&gt;End If&lt;BR /&gt;Msgbox "Banner Sheet printed to: " &amp;amp; Replace(Replace(Replace(sPrinter, "z_", ""), "$", ""), "\\", "")&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;'Creates Banner Sheet Print-Stream file&lt;BR /&gt;Function CreateBannerPS(ByVal Path, ByVal FName, ByVal UserId, ByVal sPrinter)&lt;BR /&gt;Dim fso, ts&lt;BR /&gt;Set fso = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;CreateBannerPS = "False"&lt;BR /&gt;'On Error Resume Next&lt;BR /&gt;Set ts = fso.CreateTextFile(Path &amp;amp; FName, True)   'Overwrites existing file&lt;BR /&gt;'If Err.Number = 58 Then Exit Function                              'File already exists&lt;BR /&gt;'ts.WriteLine " %-12345X@PJL SET PAGEPROTECT=OFF"&lt;BR /&gt;ts.WriteLine " %-12345X@PJL ENTER LANGUAGE=PCL"         'Enter PCL language&lt;BR /&gt;ts.WriteLine " E"             'Printer Reset&lt;BR /&gt;ts.WriteLine " *t600R"      'Resolution - 600 DPI&lt;BR /&gt;ts.WriteLine " &amp;amp;u600D"    'Unit-of-Measure - units per inch&lt;BR /&gt;ts.WriteLine " *r0F"          'Presentation&lt;BR /&gt;ts.WriteLine " &amp;amp;l0o1E"      'Top Margin&lt;BR /&gt;ts.WriteLine " &amp;amp;l0S"          'Simplex/Duplex&lt;BR /&gt;ts.WriteLine " &amp;amp;l7H"          'Paper Source&lt;BR /&gt;ts.WriteLine " &amp;amp;l2a8c1E"      'Top Margin&lt;BR /&gt;ts.WriteLine " *p0x0Y"      'Units of Measure&lt;BR /&gt;ts.WriteLine " *c0t5760x7704Y"   '???&lt;BR /&gt;ts.WriteLine " &amp;amp;l1X"          'Number of copies&lt;BR /&gt;ts.WriteLine " *b0M"          'Compression mode&lt;BR /&gt;ts.WriteLine " (19U (s4099t0b0s10h0P"    'Font Id, Typeface, Stroke weight, style, pitch, spacing&lt;BR /&gt;ts.WriteLine " &amp;amp;d@"                   'Underline disable&lt;BR /&gt;ts.WriteLine " *v0o0T"                'transparency mode, current pattern&lt;BR /&gt;ts.WriteLine " *p415Y   *p330X============================================================"&lt;BR /&gt;ts.Write " (19U"               'Symbol set - Windows ANSI&lt;BR /&gt;ts.Write " (s4099T"           'Typeface - Courier (Scalable)&lt;BR /&gt;'ts.Write " (s3t"           'Typeface - Courier&lt;BR /&gt;'ts.Write " (s16602T"           'Typeface - Arial&lt;BR /&gt;'ts.Write " (s-4B"               'Stroke Weight: -4 Extra Light - Does not seem to work&lt;BR /&gt;'ts.Write " (s160S"                'Style: 0-Upright, 1-Italic, 32-Outline - Does not seem to work&lt;BR /&gt;'ts.Write " (s0.75H"           'Pitch - characters per inch&lt;BR /&gt;'ts.Write " (s0P"                'Spacing - 0 for fixed, 1 for proportional&lt;BR /&gt;'Ec (0UEc (s0PEc (s10HEc (s12VEc (s0SEc (s3BEc (s3T&lt;BR /&gt;&lt;BR /&gt;'******************************&lt;BR /&gt;ts.WriteLine " (0U (s0P (s0.75H (s12V (s0S (s3B (s3T"                 'Upright - works&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s1S (s3B (s3T"                 'Italic - works&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s32S (s3B (s3T"                'Outline - Does not work 'ts.WriteLine " (0U (s0P (s0.75H (s12V (s24S (s3B (s3T"                'expanded - Does not work&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s160S (s3B (s3T"                'Outline/shadow - Does not work&lt;BR /&gt;&lt;BR /&gt;ts.WriteLine " *p1600Y   *p600X" &amp;amp; UserId&lt;BR /&gt;ts.WriteLine " (19U (s4099t0b0s10h0P &amp;amp;d@"&lt;BR /&gt;ts.WriteLine " *p2200Y   *p330XPrint Server: *p1225X" &amp;amp; Replace(Replace(Replace(sPrinter, "z_", ""), "$", ""), "\\", "")&lt;BR /&gt;ts.WriteLine " *p2300Y   *p330XDate Printed: *p1225X" &amp;amp; MMDDYYYY(Now)&lt;BR /&gt;ts.WriteLine " *p2400Y   *p330XTime Printed: *p1225X" &amp;amp; HHNNSS(Now)&lt;BR /&gt;ts.WriteLine " *p2600Y  *p330X============================================================"&lt;BR /&gt;ts.Close: Set ts = Nothing: Set fso = Nothing&lt;BR /&gt;If Err.Number = 0 Then CreateBannerPS = True&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function HHNNSS(strIn)  'Formats time in Hh:Nn:Ss AM/PM format&lt;BR /&gt;Dim tmpDate&lt;BR /&gt;If IsDate(strIn) = False Then&lt;BR /&gt;  HHNNSS = "Time Err"&lt;BR /&gt;Else&lt;BR /&gt;  tmpDate = CDate(strIn)&lt;BR /&gt;  HHNNSS = Mdd(Hour(tmpDate)) &amp;amp;":" &amp;amp; Mdd(Minute(tmpDate)) &amp;amp;":" &amp;amp; Mdd(Second(tmpDate))&lt;BR /&gt;  If Hour(tmpDate) &amp;gt; 12 then&lt;BR /&gt;    HHNNSS = HHNNSS &amp;amp; " PM"&lt;BR /&gt;  Else&lt;BR /&gt;    HHNNSS = HHNNSS &amp;amp; " AM"&lt;BR /&gt;  End If&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function MMDDYYYY(strIn)  'Formats Date in MM/DD/YYYY format&lt;BR /&gt;Dim tmpDate&lt;BR /&gt;If IsDate(strIn) = False Then&lt;BR /&gt;  MMDDYYYY = "Date Err"&lt;BR /&gt;Else&lt;BR /&gt;  tmpDate = CDate(strIn)&lt;BR /&gt;  MMDDYYYY = Mdd(Month(tmpDate)) &amp;amp;"/" &amp;amp; Mdd(Day(tmpDate)) &amp;amp;"/" &amp;amp; Right(Year(tmpDate),4)&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function Mdd(strIn)   'Make Double Digit&lt;BR /&gt;If Len(strIn) = 1 Then&lt;BR /&gt;  Mdd = "0" &amp;amp; strIn&lt;BR /&gt;Else&lt;BR /&gt;  Mdd = strIn&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Sub PrintDoc(sPathFName, sPrinter)&lt;BR /&gt;Dim WshShell,sCopy&lt;BR /&gt;Set WshShell = CreateObject("WScript.Shell")&lt;BR /&gt;sCopy="cmd /C ""copy /b " &amp;amp; sPathFName &amp;amp; " " &amp;amp; sPrinter &amp;amp; Chr(32)&lt;BR /&gt;WshShell.Run sCopy,0,False&lt;BR /&gt;Set WshShell = Nothing&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Function GetVbsPath()     'Returns path of Script file&lt;BR /&gt;Dim arrayScr, sTmp, i&lt;BR /&gt;arrayScr = Split(WScript.ScriptFullName, "\", -1, 1)&lt;BR /&gt;For i = 0 to UBound(arrayScr) - 1&lt;BR /&gt;  sTmp = sTmp &amp;amp; arrayScr(i) &amp;amp; "\"&lt;BR /&gt;Next&lt;BR /&gt;GetVbsPath = sTmp&lt;BR /&gt;End Function</description>
    <pubDate>Wed, 09 May 2007 15:56:46 GMT</pubDate>
    <dc:creator>Tim2 Shaffer</dc:creator>
    <dc:date>2007-05-09T15:56:46Z</dc:date>
    <item>
      <title>Use/selection of Outline font for separator page simulation - Script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/use-selection-of-outline-font-for-separator-page-simulation/m-p/3997019#M8082</link>
      <description>Using HP 5Si, HP9050dsn, and HP9050mfp printers&lt;BR /&gt;&lt;BR /&gt;The following is a vbscript file that creates a simulation of a PCL separator page.&lt;BR /&gt;I am using a version in a VB application that is running on a server and prints documents&lt;BR /&gt;directly from the server. The VB application provides a UserId to this routine to embed&lt;BR /&gt;the UserId in the separator page and then prepends this file in front of the document&lt;BR /&gt;print-stream.&lt;BR /&gt;&lt;BR /&gt;It works fine except that the UserId is very dark because of it's size. I would prefer to &lt;BR /&gt;use an outline font or something else that would not use so much toner.&lt;BR /&gt;&lt;BR /&gt;I have preceded the lines in question with "******************************".&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any help.&lt;BR /&gt;Tim&lt;BR /&gt;&lt;BR /&gt;PS If you know of a more appropriate area for this posting, please let me know.&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;Option Explicit&lt;BR /&gt;&lt;BR /&gt;Call BannerTest &lt;BR /&gt;&lt;BR /&gt;Sub BannerTest()    'BannerTest&lt;BR /&gt;Dim sFName, sPrinter, sPath&lt;BR /&gt;sPrinter = "\\Dcpp100\z_HP52$"&lt;BR /&gt;sFName = "XXX.pcl"&lt;BR /&gt;sPath = GetVbsPath                              ' Script Path&lt;BR /&gt;If CreateBannerPS(sPath, sFName, "TBS2", sPrinter) Then&lt;BR /&gt;  PrintDoc sPath &amp;amp; sFName, sPrinter&lt;BR /&gt;End If&lt;BR /&gt;Msgbox "Banner Sheet printed to: " &amp;amp; Replace(Replace(Replace(sPrinter, "z_", ""), "$", ""), "\\", "")&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;'Creates Banner Sheet Print-Stream file&lt;BR /&gt;Function CreateBannerPS(ByVal Path, ByVal FName, ByVal UserId, ByVal sPrinter)&lt;BR /&gt;Dim fso, ts&lt;BR /&gt;Set fso = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;CreateBannerPS = "False"&lt;BR /&gt;'On Error Resume Next&lt;BR /&gt;Set ts = fso.CreateTextFile(Path &amp;amp; FName, True)   'Overwrites existing file&lt;BR /&gt;'If Err.Number = 58 Then Exit Function                              'File already exists&lt;BR /&gt;'ts.WriteLine " %-12345X@PJL SET PAGEPROTECT=OFF"&lt;BR /&gt;ts.WriteLine " %-12345X@PJL ENTER LANGUAGE=PCL"         'Enter PCL language&lt;BR /&gt;ts.WriteLine " E"             'Printer Reset&lt;BR /&gt;ts.WriteLine " *t600R"      'Resolution - 600 DPI&lt;BR /&gt;ts.WriteLine " &amp;amp;u600D"    'Unit-of-Measure - units per inch&lt;BR /&gt;ts.WriteLine " *r0F"          'Presentation&lt;BR /&gt;ts.WriteLine " &amp;amp;l0o1E"      'Top Margin&lt;BR /&gt;ts.WriteLine " &amp;amp;l0S"          'Simplex/Duplex&lt;BR /&gt;ts.WriteLine " &amp;amp;l7H"          'Paper Source&lt;BR /&gt;ts.WriteLine " &amp;amp;l2a8c1E"      'Top Margin&lt;BR /&gt;ts.WriteLine " *p0x0Y"      'Units of Measure&lt;BR /&gt;ts.WriteLine " *c0t5760x7704Y"   '???&lt;BR /&gt;ts.WriteLine " &amp;amp;l1X"          'Number of copies&lt;BR /&gt;ts.WriteLine " *b0M"          'Compression mode&lt;BR /&gt;ts.WriteLine " (19U (s4099t0b0s10h0P"    'Font Id, Typeface, Stroke weight, style, pitch, spacing&lt;BR /&gt;ts.WriteLine " &amp;amp;d@"                   'Underline disable&lt;BR /&gt;ts.WriteLine " *v0o0T"                'transparency mode, current pattern&lt;BR /&gt;ts.WriteLine " *p415Y   *p330X============================================================"&lt;BR /&gt;ts.Write " (19U"               'Symbol set - Windows ANSI&lt;BR /&gt;ts.Write " (s4099T"           'Typeface - Courier (Scalable)&lt;BR /&gt;'ts.Write " (s3t"           'Typeface - Courier&lt;BR /&gt;'ts.Write " (s16602T"           'Typeface - Arial&lt;BR /&gt;'ts.Write " (s-4B"               'Stroke Weight: -4 Extra Light - Does not seem to work&lt;BR /&gt;'ts.Write " (s160S"                'Style: 0-Upright, 1-Italic, 32-Outline - Does not seem to work&lt;BR /&gt;'ts.Write " (s0.75H"           'Pitch - characters per inch&lt;BR /&gt;'ts.Write " (s0P"                'Spacing - 0 for fixed, 1 for proportional&lt;BR /&gt;'Ec (0UEc (s0PEc (s10HEc (s12VEc (s0SEc (s3BEc (s3T&lt;BR /&gt;&lt;BR /&gt;'******************************&lt;BR /&gt;ts.WriteLine " (0U (s0P (s0.75H (s12V (s0S (s3B (s3T"                 'Upright - works&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s1S (s3B (s3T"                 'Italic - works&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s32S (s3B (s3T"                'Outline - Does not work 'ts.WriteLine " (0U (s0P (s0.75H (s12V (s24S (s3B (s3T"                'expanded - Does not work&lt;BR /&gt;'ts.WriteLine " (0U (s0P (s0.75H (s12V (s160S (s3B (s3T"                'Outline/shadow - Does not work&lt;BR /&gt;&lt;BR /&gt;ts.WriteLine " *p1600Y   *p600X" &amp;amp; UserId&lt;BR /&gt;ts.WriteLine " (19U (s4099t0b0s10h0P &amp;amp;d@"&lt;BR /&gt;ts.WriteLine " *p2200Y   *p330XPrint Server: *p1225X" &amp;amp; Replace(Replace(Replace(sPrinter, "z_", ""), "$", ""), "\\", "")&lt;BR /&gt;ts.WriteLine " *p2300Y   *p330XDate Printed: *p1225X" &amp;amp; MMDDYYYY(Now)&lt;BR /&gt;ts.WriteLine " *p2400Y   *p330XTime Printed: *p1225X" &amp;amp; HHNNSS(Now)&lt;BR /&gt;ts.WriteLine " *p2600Y  *p330X============================================================"&lt;BR /&gt;ts.Close: Set ts = Nothing: Set fso = Nothing&lt;BR /&gt;If Err.Number = 0 Then CreateBannerPS = True&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function HHNNSS(strIn)  'Formats time in Hh:Nn:Ss AM/PM format&lt;BR /&gt;Dim tmpDate&lt;BR /&gt;If IsDate(strIn) = False Then&lt;BR /&gt;  HHNNSS = "Time Err"&lt;BR /&gt;Else&lt;BR /&gt;  tmpDate = CDate(strIn)&lt;BR /&gt;  HHNNSS = Mdd(Hour(tmpDate)) &amp;amp;":" &amp;amp; Mdd(Minute(tmpDate)) &amp;amp;":" &amp;amp; Mdd(Second(tmpDate))&lt;BR /&gt;  If Hour(tmpDate) &amp;gt; 12 then&lt;BR /&gt;    HHNNSS = HHNNSS &amp;amp; " PM"&lt;BR /&gt;  Else&lt;BR /&gt;    HHNNSS = HHNNSS &amp;amp; " AM"&lt;BR /&gt;  End If&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function MMDDYYYY(strIn)  'Formats Date in MM/DD/YYYY format&lt;BR /&gt;Dim tmpDate&lt;BR /&gt;If IsDate(strIn) = False Then&lt;BR /&gt;  MMDDYYYY = "Date Err"&lt;BR /&gt;Else&lt;BR /&gt;  tmpDate = CDate(strIn)&lt;BR /&gt;  MMDDYYYY = Mdd(Month(tmpDate)) &amp;amp;"/" &amp;amp; Mdd(Day(tmpDate)) &amp;amp;"/" &amp;amp; Right(Year(tmpDate),4)&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Function Mdd(strIn)   'Make Double Digit&lt;BR /&gt;If Len(strIn) = 1 Then&lt;BR /&gt;  Mdd = "0" &amp;amp; strIn&lt;BR /&gt;Else&lt;BR /&gt;  Mdd = strIn&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Sub PrintDoc(sPathFName, sPrinter)&lt;BR /&gt;Dim WshShell,sCopy&lt;BR /&gt;Set WshShell = CreateObject("WScript.Shell")&lt;BR /&gt;sCopy="cmd /C ""copy /b " &amp;amp; sPathFName &amp;amp; " " &amp;amp; sPrinter &amp;amp; Chr(32)&lt;BR /&gt;WshShell.Run sCopy,0,False&lt;BR /&gt;Set WshShell = Nothing&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Function GetVbsPath()     'Returns path of Script file&lt;BR /&gt;Dim arrayScr, sTmp, i&lt;BR /&gt;arrayScr = Split(WScript.ScriptFullName, "\", -1, 1)&lt;BR /&gt;For i = 0 to UBound(arrayScr) - 1&lt;BR /&gt;  sTmp = sTmp &amp;amp; arrayScr(i) &amp;amp; "\"&lt;BR /&gt;Next&lt;BR /&gt;GetVbsPath = sTmp&lt;BR /&gt;End Function</description>
      <pubDate>Wed, 09 May 2007 15:56:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/use-selection-of-outline-font-for-separator-page-simulation/m-p/3997019#M8082</guid>
      <dc:creator>Tim2 Shaffer</dc:creator>
      <dc:date>2007-05-09T15:56:46Z</dc:date>
    </item>
  </channel>
</rss>

