With this code below, i can open a file into a visual editor (stock placed component no modifications) and send it to a printer and everything prints fine
Var vEditor: TWPRichText;begin vEditor := TWPRichText.CreateDynamic; try vEditor.PrinterSetup; editor.SaveToStream(FStream); if FStream.Size > 0 then begin FStream.Position := 0; vEditor.LoadFromStream(FStream); vEditor.PrintParameter.PrintOptions := vEditor.PrintParameter.PrintOptions + [wpAlwaysHideFieldmarkers]; vEditor.Print(); vEditor.Clear; end; finally FreeAndNil(vEditor); end;
AND!
Var
vEditor: TWPRichText;
begin
vEditor := TWPRichText.CreateDynamic;
try
vEditor.PrinterSetup;
editor.SaveToStream(FStream);
if FStream.Size > 0 then
begin
FStream.Position := 0;
vEditor.LoadFromStream(FStream);
vEditor.PrintParameter.PrintOptions := vEditor.PrintParameter.PrintOptions + [wpAlwaysHideFieldmarkers];
vEditor.Print();
vEditor.Clear;
end;
finally
FreeAndNil(vEditor);
end;
Alles anzeigen
BUT!
When the same code is executed via a service on a remote machine, the printing does not print out any headers at all.
Any ideas on why this would be the case ?
The only difference on the server side the data is streamed from a TBlobfield into a memory stream then the same process is followed to print a document and the printer to send to is returned dynamically from a database.
Any particular reason why this would not print out a documents headers ?
(Yes the physical printer is setup correctly)