Delphi program fails to print on only some computers/printers

Posted on 2005-05-15
Last Modified: 2010-04-05
Program written with Delphi 3 on WinXP OS fails to print on only certain computers. A test program using DOS printing as well as varying printer codes in Delphi merely ejects a blank page when attempting to print on such printers. No problem printing from origiinal machine that was used to write the programs. Difficult to test this because it malfunctions on distant machines.
Question by:DeCordova
    LVL 6

    Expert Comment

    what report generator component  you use?

    Author Comment

    Using TPrintDialog. It appears to be the only one available on my version of Delphi 3.
    LVL 2

    Accepted Solution


    The best and easiest way:

    put "printers" in uses list then


    procedure TForm1.FormCreate(Sender: TObject);
    combobox1.items:=printer.items; // get lst of ALL INSTALLED printers

    procedure TForm1.ComboBox1Change(Sender: TObject);
      printer.PrinterIndex:=combobox1.ItemIndex //setting printer

    procedure TForm1.Button1Click(Sender: TObject);
    form1.print// or whatever You want to print

    Author Comment

    That appears to do the same thing as PrintDialog1.Execute which only picks a printer. No problem with that. I am having some success by programming pixels to be equivalent regardless of which printer is used.

    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

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    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…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 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

    16 Experts available now in Live!

    Get 1:1 Help Now