Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing to Dymo Labelwriter 330 Turbo

Posted on 2006-06-06
5
Medium Priority
?
781 Views
Last Modified: 2010-04-05
Hi,

A customer wants to print addresses directly from within my Delphi-program to a Dymo Labelwriter 330 Turbo.
I don't have this printer myself, so it is hard to see what kind of functionality is required here.
I'm using an MS Access database, Delphi 7 pro.

Does anybody have experience with this? Any help is most welcome.

Regards,
Stef
0
Comment
Question by:Stef Merlijn
  • 3
5 Comments
 
LVL 4

Expert Comment

by:tomerlei
ID: 16843193
Hi Stef,
I dont know the specific dymo you have but i have a p-touch label printer and with the right driver installed it functions as a normal printer, have you tried to print using regular printing method? (even Richedit print method)
0
 
LVL 5

Accepted Solution

by:
Scay7 earned 2000 total points
ID: 16847761
Well if you need to print from a richtext and set its margins and amout of copies... try this function

function PrintRichText(RTLeftMargin, RTRightMargin, RTTopMargin, RTBottomMargin: single;
RichTextMeasurement: TRichTextMeasurements; Copies: Integer): Boolean;
var
  PixelsX, PixelsY, LeftSpace, TopSpace : Integer;
  LeftMargin, RightMargin, TopMargin, BottomMargin: single;
  R : trect;
begin
  Result := False; // default return value
  rtleftmargin := strtofloat(sleft);
  rttopmargin := strtofloat(stop);
  rtrightmargin := strtofloat(sleft);
  rtbottommargin := strtofloat(stop);
  if RichTextMeasurement <> rtmNone then
    begin
      // get pixels per inch
      PixelsX := GetDeviceCaps(Printer.Handle, LOGPIXELSX);
      PixelsY := GetDeviceCaps(Printer.Handle, LOGPIXELSY);

      // get non-printable margins
      LeftSpace := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETX);
      TopSpace := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETY);

      LeftMargin := RTLeftMargin;
      RightMargin := RTRightMargin;
      TopMargin := RTTopMargin;
      BottomMargin := RTBottomMargin;

      // If the measurement is set in Centimetres, recalculate
      if RichTextMeasurement = rtmCentimetres then
        begin
          LeftMargin := LeftMargin / 2.54;
          RightMargin := RightMargin / 2.54;
          TopMargin := TopMargin / 2.54;
          BottomMargin := BottomMargin / 2.54;
        end;

        // Set the Margins
        R.Left := Round(PixelsX * LeftMargin) - LeftSpace;
        R.Right := Printer.PageWidth - Round(PixelsX * RightMargin) - LeftSpace;
        R.Top := Round(PixelsY * TopMargin) - TopSpace;
        R.Bottom := Printer.PageHeight - Round(PixelsY * BottomMargin) - TopSpace;
        form1.RichEdit4.PageRect:= R;
        Application.ProcessMessages;
    end;

  // Print the required number of copies
  while Copies > 0 do
    begin
      form1.RichEdit4.Print('MyApp: Copy '+IntToStr(Copies));
      Dec(Copies);
      Application.ProcessMessages;
    end;
  Result := True;
end;

With the code above and this information:
http://www.superwarehouse.com/Dymo_LabelWriter_330_Turbo/68010/ps/119282

Im sure you can make a mok up of the dimensions and give it a try to the customer. Put in a series of test that the customer can bring back to you so that you can fine tune the settings on your side :P

Peace Scay7
0
 
LVL 5

Assisted Solution

by:Scay7
Scay7 earned 2000 total points
ID: 16847782
I just saw from that site that it mentioned that they give examples for DELPHI:

"Provides OLE, DLL, and DDE interfaces to application developers. Supports popular development platforms such as Visual Basic, C/C++, Access, FoxPro, Power Builder and Delphi. Includes sample applications in C, Visual Basic, Access, Delphi, FoxPro, Power Builder and Delphi
Includes add-ins that enable one-click address labels direct from the main toolbars of Microsoft ® Word, Outlook, the Palm Desktop, GoldMine ® and ACT!™. Also directly supported by Corex ® CardScan ® and TeleMagic ®"

mabey ask for those examples... then you can make a proper app to go with this printer...

Peace Scay7
0
 
LVL 5

Assisted Solution

by:Scay7
Scay7 earned 2000 total points
ID: 16847812
K sorry about my posts... think i found the dev KIT that comes with that printer...

http://global.dymo.com/deAT/Software/LabelWriter_400_Turbo.html

Software TAB
click dev aid
click soft dev kit

scroll to the bottom should be an exe there for download...

hope that helps

Peace Scay7
0
 

Author Comment

by:Stef Merlijn
ID: 16849537
I will download the SDK and software from the website and see where that brings me.
Thanks for now.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 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