scalrichview can not print the embed image.

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
bsanlang
Posts: 80
Joined: Sun Sep 24, 2006 1:03 am

scalrichview can not print the embed image.

Post 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.
toolwiz
Posts: 150
Joined: Wed Nov 30, 2005 3:27 am

Post by toolwiz »

Text seems to be rendered by TRVStyle (see OnDrawStyleText).

I cannot figure out where Images are being rendered.

-David
bsanlang
Posts: 80
Joined: Sun Sep 24, 2006 1:03 am

Post by bsanlang »

The richviewedit can print the images.
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post by proxy3d »

Send an example of this document on [email protected]
bsanlang
Posts: 80
Joined: Sun Sep 24, 2006 1:03 am

Post by bsanlang »

I have send the file to your e-mail.
bsanlang
Posts: 80
Joined: Sun Sep 24, 2006 1:03 am

Post by bsanlang »

The images of scalerichview' readme.rvf file can not be printed.
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post by proxy3d »

The nearest 3 days, bug will be corrected.
This week there will be a updating.
toolwiz
Posts: 150
Joined: Wed Nov 30, 2005 3:27 am

Post 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
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post 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;
bsanlang
Posts: 80
Joined: Sun Sep 24, 2006 1:03 am

Post by bsanlang »

The images of the srvdemo for srv 1.4.1 can not be printed.
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post 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.
Post Reply