Solved

Setting the paper size in Delphi for a endless label: Brother Printer QL 550

Posted on 2007-03-27
8
2,807 Views
Last Modified: 2013-11-22
In Delphi I can set the paper size of a label Printer (see code below). But I can't set the paper size in the Brother QL 550 when the Label is endless.

So if I have labels 38mm x 90mm the procedure works well. When I have a endless label I get a error from the Brother Printing Driver saying the the label is endless and not compatible.






***********************************************************************
    Printer.GetPrinter(Device, Driver, Port, DeviceMode);
    OpenPrinter(Device, hPrinter, nil);
    try
      DevMode := PDevMode(GlobalLock(DeviceMode));
      try
        with DevMode^ do
        begin
          dmFields := dmFields or DM_PAPERSIZE;
          dmPaperSize := DMPAPER_USER;
          dmFields := dmFields or DM_PAPERWIDTH;
          dmPaperWidth := 380; //  39 mm : in 1/ 10 mm;
          dmFields := dmFields or DM_PAPERLENGTH;
          dmPaperLength := 900; // 90 mm : in 1/ 10 mm
          ResetDC(Printer.Handle, DevMode^);
        end;
      finally
        GlobalUnlock(DeviceMode);
      end;
    finally
      ClosePrinter(hPrinter);
    end;
0
Comment
Question by:vonburg
  • 4
  • 2
8 Comments
 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
From what I can see, you set the size in the Printer Options dialog NOT the Print Job Options.
There seems to be a separate setup called Label Format definiiton that you must perform
using the Printer Setup. I'm not sure if the Printer devMode fields will hold that info. It is
more than likely stored in the registry.

What I'd do, if I had one of these printers, is fill the label format definition and then show the
DevMode values for the printer in a test program. Then you shoul dbe able to use the same
values when you want to set them. I'd also check the registry for that info.

Last resort, I'd contact Borther's Support group to see if they have any info. I could not gather
how to do it from the available downloadable docs.
0
 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
Also, if you get the p-SDK, you can use the COMObject to do the printing and not have
to worry about this as you would create a label template to set the dimensions.
0
 

Author Comment

by:vonburg
Comment Utility
If I do not set the size in the Printer Option, I get only a error message.
With all fixed sized Labels, setting the Printer Option works fine!  Same with Dymo LabelWriter 400.

It's not practicable to set the size of a label in the Printer Setup. And there is no setup for that in the Brother Tools.

0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
The documents say that there is a paper size setup in the Printer Options screen.
0
 

Author Comment

by:vonburg
Comment Utility
No I get a screen with the actual size and with the selected size - only two buttons for abort and restart (if the labels where changed)

I don't like to setup any size in a Printer Option screen. It has to be made under program controll (Delphi)

Once again fixed label size work without any Printer Option screen!
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 250 total points
Comment Utility
Well, I couldn't find anyway to do it programatically. I would suggest either
downloading the SDK I mentioned earlier and using the COMObject to print
or contacting their support group to ask them how to do it using Windows API calls.
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now