Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Printing    [ Add a report in this area ]  
Report #:  1562   Status: Reported
Documents cannot be printed in RAW or EMF mode.
Project:  Delphi Build #:  6.0.6.240
Version:    6.0 Submitted By:   Rick Beerendonk
Report Type:  Minor failure / Design problem Date Reported:  6/19/2002 2:54:04 AM
Severity:    Infrequently encountered problem Last Updated: 1/8/2008 3:33:10 PM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (8 Total Ratings)
4.25 out of 5
Total Votes: None
Description
In Windows 95, 98 and ME printing kan be either RAW or EMF. Some printers only work correctly in one of these modes.

I would like to influence the mode for every document I print. The mode can be specified in the DocInfo which is a parameter for the StartDoc API. Unfortunaltely due to the structure of TPrinter, I am unable to set the DocInfo.lpszDatatype to 'RAW' or 'EMF'.
Steps to Reproduce:
See description. The problem is in the static TPrinter.BeginDoc procedure:

procedure TPrinter.BeginDoc;
var
  DocInfo: TDocInfo;
begin
  CheckPrinting(False);
  SetState(psHandleDC);
  Canvas.Refresh;
  TPrinterCanvas(Canvas).UpdateFont;
  FPrinting := True;
  FAborted := False;
  FPageNumber := 1;
  FillChar(DocInfo, SizeOf(DocInfo), 0);
  with DocInfo do
  begin
    cbSize := SizeOf(DocInfo);
    lpszDocName := PChar(Title);
    // --> I LIKE TO ADD SOMETHING HERE!!! <--
  end;
  SetAbortProc(DC, AbortProc);
  StartDoc(DC, DocInfo);
  StartPage(DC);
end;
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01