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 » Fri Apr 18, 2008 6:18 am

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 » Fri Apr 18, 2008 6:32 am

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 » Fri Apr 18, 2008 4:18 pm

The richviewedit can print the images.

proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post by proxy3d » Fri Apr 18, 2008 5:26 pm

Send an example of this document on [email protected]

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

Post by bsanlang » Mon Apr 21, 2008 11:15 am

I have send the file to your e-mail.

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

Post by bsanlang » Wed Apr 23, 2008 12:50 am

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 » Thu Apr 24, 2008 1:36 pm

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 » Fri Apr 25, 2008 6:54 am

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 » Thu May 01, 2008 11:29 am

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 » Wed May 07, 2008 12:46 am

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 » Wed May 07, 2008 8:25 am

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