print to a dot matrix printer


Hellow !! [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> I want to print on a dot matrix printer. How to set the paper size programmatically ? Thanks...[/img]

Comments

  • edited September 2013
    rommel wrote: »
    How to set the paper size programmatically ?

    You can set the paper size, by using the OnPrintPage event.

    procedure TFMain.frxReportPrintPage(Page: TfrxReportPage; CopyNo: Integer);
    begin
    Page.PaperSize:= DMPAPER_FANFOLD_STD_GERMAN;
    end;


    Regards
  • edited 7:19PM
    Using frxDotMatrixExport you can set InitString to whatever the control codes have to be.
    Also set the EscModel and check/edit the printers.xml file.

    Note that you should always initialize the dot matrix printer completely, starting with a <Reset> command, followed by all the codes necessary to achieve the desired result.
    The reason for this is that one never knows what other program has made use of the printer and possibly changed its settings. Full initialization ensures that one does not get odd results at random intervals.
  • edited 7:19PM
    Groffy wrote: »
    Groffy wrote: »
    How to set the paper size programmatically ?

    You can set the paper size, by using the OnPrintPage event.

    procedure TFMain.frxReportPrintPage(Page: TfrxReportPage; CopyNo: Integer);
    begin
    Page.PaperSize:= DMPAPER_FANFOLD_STD_GERMAN;
    end;


    Regards

    hellow !!
    I've tried but does not work, why?

  • edited 7:19PM
    technisoft wrote: »
    Using frxDotMatrixExport you can set InitString to whatever the control codes have to be.
    Also set the EscModel and check/edit the printers.xml file.

    Note that you should always initialize the dot matrix printer completely, starting with a <Reset> command, followed by all the codes necessary to achieve the desired result.
    The reason for this is that one never knows what other program has made use of the printer and possibly changed its settings. Full initialization ensures that one does not get odd results at random intervals.

    thanks for this reply but this solution does not help me because many reports are not dotmatrix,
    also working with different printer modelsmany is not practicable must to find the escape codes of them ...
    i'am sorry !!!, another idea please ????
  • edited September 2013
    Using frxDotMatrixExport you can set InitString to whatever the control codes have to be.
    Also set the EscModel and check/edit the printers.xml file.

    Note that you should always initialize the dot matrix printer completely, starting with a <Reset> command, followed by all the codes necessary to achieve the desired result.
    The reason for this is that one never knows what other program has made use of the printer and possibly changed its settings. Full initialization ensures that one does not get odd results at random intervals.

    thanks for this reply but this solution does not help me because many reports are not dotmatrix,
    also working with different printer modelsmany is not practicable must to find the escape codes of them ...
    i'am sorry !!!, another idea please ????
    printers.xml will give you limited options to manage the fonts.
    You could create a new printer with a custom page size in Windows itself. That is not straightforward and the client is unlikely to be able to do that without assistance.

    Dot-matrix printers are from another computer area and you will have to accommodate that by making provisions in your program to manager the printers and by having the client doing some setup work for the printer they use. IOW there is no easy solution.

    Dot-matrix and non-dot-matrix printers are 2 different kettles of fish, as far as the report is concerned. You really need 2 reports, one for each type of printer. One reason for this is simply practical. Dot-matrix printers are usually used for pre-printed forms whereas ink-jet and laser printers print on blank paper.

    One alternative is to use the dot-matrix printer like a graphics printer but that will not get you around problems like page size and will produce very slow and low quality output.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.