Page 1 of 1
scalrichview can not print the embed image.
Posted: Fri Apr 18, 2008 6:18 am
by bsanlang
I have insert a image and use SRichViewEdit1.PrintAll to print. But It is only printed text.
If the image is on the first line, It can be print. The other can not.
Posted: Fri Apr 18, 2008 6:32 am
by toolwiz
Text seems to be rendered by TRVStyle (see OnDrawStyleText).
I cannot figure out where Images are being rendered.
-David
Posted: Fri Apr 18, 2008 4:18 pm
by bsanlang
The richviewedit can print the images.
Posted: Fri Apr 18, 2008 5:26 pm
by proxy3d
Send an example of this document on
[email protected]
Posted: Mon Apr 21, 2008 11:15 am
by bsanlang
I have send the file to your e-mail.
Posted: Wed Apr 23, 2008 12:50 am
by bsanlang
The images of scalerichview' readme.rvf file can not be printed.
Posted: Thu Apr 24, 2008 1:36 pm
by proxy3d
The nearest 3 days, bug will be corrected.
This week there will be a updating.
Posted: Fri Apr 25, 2008 6:54 am
by toolwiz
While you're at it, can you please provide a way to get the page coordinates of images so I can create a URL annotation for them in a PDF file? It works on the very first page, but after that, I cannot figure out how to get proper coordinates. There is no callback or any other way I can find that says when an image is being rendered to the printer canvas.
Thanks
-David
Posted: Thu May 01, 2008 11:29 am
by proxy3d
Use function
convertRVtoSRV(p : TPoint) : TPoint;
It converts coordinates RV in coordinates SRV.
Code: Select all
var
PageNo : Integer;
PageRect : TRect;
DrawItemPos: TPoint;
PosInSRV : TPoint;
....
DrawItemPos.X := DrawItemPos.X + SRV.RichViewEdit.HScrollPos;
DrawItemPos.Y := DrawItemPos.Y + SRV.RichViewEdit.VScrollPos * SRV.RichViewEdit.VSmallStep;
// Page number with PosInSRV
PageNo := SRV.getRVPageNo(DrawItemPos);
// Position on Screen
PosInSRV := SRV.convertRVtoSRV(DrawItemPos);
// Absolute position in SRV
PosInSRV.X := Round(PosInSRV.X + SRV.OffsetDocX);
PosInSRV.Y := Round(PosInSRV.Y + SRV.OffsetDocY);
// Area Page in SRV
PageRect := SRV.RectPage(PageNo);
// Position in PageNo
PosInSRV.X := PosInSRV.X - PageRect.Left;
PosInSRV.Y := PosInSRV.Y - PageRect.Top;
Posted: Wed May 07, 2008 12:46 am
by bsanlang
The images of the srvdemo for srv 1.4.1 can not be printed.
Posted: Wed May 07, 2008 8:25 am
by proxy3d
It is a problem with MS Metafile. This problem is not solved yet in version 1.4.1.
The next update will solve this problem. I am changing the ScaleRichView drawing and printing methods to remove working via metafiles.