Thanks for the tip. I found an undocumented event in the TWPFPreviewDlg object called OnPrepareFormEditor that I used to set the Offset fields which worked. Thanks.
- Steve
Thanks for the tip. I found an undocumented event in the TWPFPreviewDlg object called OnPrepareFormEditor that I used to set the Offset fields which worked. Thanks.
- Steve
Can someone please reply to this question? Thanks.
- Steve
When I set these fields of the form editor, there is no visible change to the print output.
I am using WPTools V4.22, WPTools 4.22 RTF Engine, and WPForm V2.3.
Is there some other property of the form editor that must be set in order for these properties to affect print output? I am using the form editor in "LabelDef=true" mode. Is there an issue with using offsets and printing labels?
- Steve
I found a bug in the fix for this problem: If a rich text object has a non-transparent background, the fix logic renders only the background and not any of the formatted text. I made the following changes to the WPFGR.pas to eliminate the problem:
Old Code:
procedure TWPFGGraphicText.DrawIt(toCanvas: TCanvas; r: TRect);... wpfRTFText: begin if (FRTFObject <> nil) and assigned(FWPFOnRenderRTFObject) then begin // OLD CODE - USING ZOOMING VALUE if FEditor.FResInfo.FZooming=100 then begin if assigned(FWPFOnCanvasRTFObject) then FWPFOnCanvasRTFObject(FRTFObject, toCanvas, r, Data.Angle, Feditor.FResInfo.FZooming, 0, FALSE); FWPFOnRenderRTFObject(FRTFObject, toCanvas, r, Data.Angle, FEditor.FResInfo.FZooming, 0, FEditor.FPrintInfo.FPrinting, nil); end else // New code - change canvas resolution according to ZOOM begin saveddc := SaveDC( toCanvas.Handle );
New Code:
procedure TWPFGGraphicText.DrawIt(toCanvas: TCanvas; r: TRect);
...
wpfRTFText:
begin
if (FRTFObject <> nil) and assigned(FWPFOnRenderRTFObject) then
begin
// OLD CODE - USING ZOOMING VALUE
if FEditor.FResInfo.FZooming=100 then
begin
if assigned(FWPFOnCanvasRTFObject) then
FWPFOnCanvasRTFObject(FRTFObject, toCanvas,
r, Data.Angle, Feditor.FResInfo.FZooming, 0, FALSE);
FWPFOnRenderRTFObject(FRTFObject, toCanvas, r, Data.Angle,
FEditor.FResInfo.FZooming, 0, FEditor.FPrintInfo.FPrinting, nil);
end
else // New code - change canvas resolution according to ZOOM
begin
toCanvas.Brush.Style:=bsClear;
saveddc := SaveDC( toCanvas.Handle );
Alles anzeigen
I just cleared the brushstyle before saving the device context. FYI.
- Steve Kowal