print escape sequence

theburnoutheburnou Member Posts: 8
Hi,

I am trying to send an invoice report to a generic / text printer using escape sequence to set the font size of the layouts.
The problem is that the not printable ascii codes are modified.
I.E. the escape ascii code (27) is transformed to 2E before printing.

Has anyone an idea ?


Thanks.

Comments

  • SavatageSavatage Member Posts: 7,142
    maybe there is a better way to achieve your goal.

    I'm not sure what your trying to exactly? can you explain a bit more?
  • theburnoutheburnou Member Posts: 8
    The goal is to print the output of a navision invoice report to a dot matrix printer on a windows system. The problem is that we need to print between 700 and 900 pages a day. We tested that using a generic text driver is much faster than using the proper window driver. So the font size set in the navision report is no longer available in this print mode. We need to tell the printer what font size to use by sending it the correct escape sequenses. But Navision modify these codes (beginning by char(27)) maybe because these are non printable codes.

    Is there a way to send by a navisio report these non printable ascii codes to a printer ?
  • kinekine Member Posts: 12,562
    Please, look into the printer properties, there are pages for setting the esc sequences for many purposes (font size etc.) See on-line help for how to set them...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,118
    In the properties of the printer (Generic-printer), you have a page called "Font Selection". In here you can put the escape-sequences for a few things (eg Bold or Underline).
    In the Navisision report, you just have to put the property Bold or Underline to Yes.
    I never used the escape sequences for 10/12/17 cpi, but in case those don't work and you don't use bold or underline, you can put the code for N cpi in the bold or underline sequence.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • JohnJohn Member Posts: 43
    You can copy the escape codes to the documentation section.
    If you open the sourcecode to edit this, you will have to copy the escape codes from the documentation section to the (OnPreReport) functional section.
    They do work after compiling. Only when you open de sourcecode to edit
    are modified.

    An other way is to declare Char variables and set these to the numeric values voor the asci values. E.g. Char_Quote := 27;
  • kinekine Member Posts: 12,562
    John wrote:
    An other way is to declare Char variables and set these to the numeric values voor the asci values. E.g. Char_Quote := 27;

    It is not solution, because the code will not reach printer. Windows driver will change it...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,118
    kine wrote:
    It is not solution, because the code will not reach printer. Windows driver will change it...
    Exactly, the only method I found is the one I described.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.