Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Papersize problem with label printer

edited December 2006 in General
Hello,

I use RB and BDS 2006. I have installed one label printer Zebra 3782
and one HP Inkjet printer. I print labels in the zebra printer of size
70mm * 10mm. If i have the zebra printer setup as default i print the
labels without problem, but if the inkect is setup as default printer,
then when i preview the labels to print in the screen are right, but
then, when in the select printer dialog i change from the inkjet
printer to the label printer, the label printer prints the labels like
in and A4 sheet, and when go back to the preview form i show and A4
form not the label size selected.

--

Comments

  • edited December 2006
    Hi Chus,

    Take a look at the following article on printing to continuous paper.
    Perhaps this will help resolve any issue you are currently having.

    ----------------------------------------------------
    Article: Printing to Continuous Paper
    ----------------------------------------------------

    1. Layout

    For continuous printing (for example a receipt) use Title/Summary and
    removing the Header/Footer. Set the PrintHeight of each to phDynamic. Layout
    the DetailBand to print a single line item. Set the margins to 0 or to the
    smallest that the printer driver will support (some printers have an
    unprintable area).

    With this configuration The Report will generate a Title followed by a
    variable number of Detail bands that span pages if needed, and then finally
    print a Summary at the end.

    2. Pagination

    a. dtPrinter

    Some printer drivers have a continuous paper size setting. If not then try
    setting the paper size to be very small - perhaps the size of the tallest
    band in the layout. Or try setting the page height to be the size of a
    detail band. Note that some printer drivers will only accept page sizes
    within a certain range of paper sizes.

    b. dtReportTextFile

    With the above layout, the report text file will generate the page breaks
    properly, however the device will fill up a page with blank lines. You can
    control the number of lines per page by configuring the CharacterGrid
    property in the Report.BeforePrint event:

    example:


    procedure TForm1.ppReport1BeforePrint(Sender: TObject);
    var
    lDevice: TppReportTextFileDevice;
    begin

    if (ppReport1.FileDevice <> nil) and (ppReport1.FileDevice is
    TppReportTextFileDevice)then
    begin
    lDevice := TppReportTextFileDevice(ppReport1.FileDevice);

    {120 characters per line, 66 lines per page}
    lDevice.CharacterGrid(120, 66);
    end;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2006
    Nico Cizik (Digital Metaphors) wrote:

    Hi Nico, may i have not explained well.

    I print in the printer without problem if the printer is the default
    windows printer. The problem is that is not the default printer, the i
    preview right the labels, but when in the print dialog when i change
    from the default printer to the label printer, then prints like in an
    A4 sheet, and when go back to the preview form, then it is resized to
    A4.
  • edited December 2006
    Hi Chus,

    When you change the printer name at runtime, the other printer setup options
    will not be automatically changed. For instance, if the paper size is set
    to A4 by default and you simply select a new printer, you will also need to
    set the new paper size for that printer. Take a look at the advanced
    properties of the label printer before you print to it (Properties button on
    the print dialog) and see if the proper paper size is selected. If not you
    can change is manually there or write some code to do so before the report
    prints to the printer.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.