- Offizieller Beitrag
ZitatI had found, I mean, didn´t find two properties and one event that I was
using. Is there any workaround for these?Properties:
- PageNumberOffset (I was using to allow the user to define a "start
page number")
- HideInsertPoints (It was part of the "mailmerge" process. I don´t
know if it is needed anymore, maybe it´s the "default behavior")
PageNumberOffset is not supported anymore since the new algorithm is much more complicated in taking care that multiple documents printed in one printing cue get correct numbers (BeginPrint/EndPrint)
You can modify the page numbering on the fly using the OnTextObjGetTextEx event. You will need to read the precalculated the value and modify it acording to your needs.
procedure TWPTBXForm.WPRichText1TextObjGetTextEx(RefCanvas: TCanvas;
TXTObject: TWPTextObj; var PrintString: WideString; var WidthInPix,
HeightInPix: Integer; var PaintObject: TWPTextObj; Xres, YRes: Integer);
var n : Integer;
begin
if (TXTObject.ObjType=wpobjTextObject) and
(TXTObject.Name='PAGE') then
begin
n := StrToIntDef(PrintString,0);
if n<=1 then
PrintString := ' '
else PrintString := IntToStr(n-1);
end;
end;
Alles anzeigen
HideInsertPoints did not only hide the mailmerge fields, it also deletes them when the file was saved. To hide them use
InsertPointTextAttr.Hidden := TRUE;
to delete them save the document with the format string
'RTF-nomergefields'; Of course procedure DeleteFields can also be used.
ZitatEvent:
OnParagraphAttrChange (It was used to update a toolbutton that shows
the active "space between" value. I could use OnChangeCursorPos, but it is fired for each character change, not paragraph change.
Since this event is triggered in idle times it shgould not slow your application down, please use OnChangeCursorPos
ZitatAlso, about the "NumberOfCopies" property. Do you intend to add it to the next releases?
Not decided yet. Printer.Copies worked pretty well.