Julian,
I did not see a provision for attachments so I am sending the requested file to support@wptools.de
John
Julian,
I did not see a provision for attachments so I am sending the requested file to support@wptools.de
John
I am using wptools 4.25 in Delphi 6. I am using wprichtext.SaveToFile to save the editor text as an RTF file. I have Word 2007.
When I open the RTF file in Word, the space between lines is huge. I browsed the forum and found the discussions where changing a line in WPwrtRTF to p := StrEPCopy(p,'0'); is discussed.
I made that change and recompiled wptools. I made sure that the changed WPwrtRTF file was being recompiled by putting in a syntax error below the change. When the compile stopped at that point I removed the syntax error and recompiled wptools again. I also rebuilt my source code.
I still get the large space between lines when I do SaveToFile and then open the saved file in Word 2007.
Eventually I am migrating the code to Delphi 2009 and wptools 6. But that is going to take a while. In the short term I need to solve this problem. I'm assuming that I missed a step, or did something wrong.
Thanks,
John
I am using D5 and WPT 4.2. I have been doing some debugging with MemProof and have started getting the following error.
[Fatal Error] CDMainK.pas(12): Unit WPDefs was compiled with a different version of Graphics.TCanvas
Since I don't have a copy of WPDefs.Pas, I was wondering if there is anyway to get around this compiler error.
Thanks
John
I have a RichText that has Shape objects painted to it. The shapes are 18 pixels (line height) by 4 pixels. Each shape I add to the RichText is visible in the RichText.
My problem is that I cannot get all the shapes to show in a twpPreviewDlg, twPreview, or wpPDFPrinter when I use RichText.PrintPageOnCanvas. All of the text prints fine. But the Shapes do not.
At best the shapes show in the top half of a page. Any shapes in the lower half of the page do not show. RichText.Print also has problems with the shapes. In short, either PrintPageOnCavas has a problem, or I just cannot figure out how to use it correctly
I can iterate the Shape objects using RichText.TextObjects.List[x].
I can iterate the Shape objects using RichText.TextObjects.GotoNext.
I can use GoToNext and AtCP to get the objects and paint them to the canvas using obj.PaintTo(toCanvas,r) as shown below. But this only seems to work for wpPDF. I need to be able to use TwpPreviewDlg or TwpPreviev or RichText.Print.
Is there a bug in Preview or in PrintPageOnCanvas? Or am I doing something wrong?
CODE FOR PAINTING INDIVIDUAL OBJECTS
wpRichTextMargin.TextObjects.GotoNext;
obj := wpRichTextMargin.textobjects.AtCP;
x := (wpRichTextMargin.CPColNr+1) * 11;
Y := wpRichTextMargin.CPParNr * muldiv(wpRichTextMargin.ActiveLine.Height,screen.PixelsPerInch, 1440);
r.TopLeft := Point(x,Y);
r.BottomRight := Point(obj.Width+x,obj.Height+y);
TwpoShape(obj).PaintTo(toCanvas,r);
inc(wpRichTextMargin.Memo.cursor_pos);