Page 1 of 1

Set Table Position To Actual Paper Location

Posted: Tue Aug 29, 2006 2:08 am
by DickBryant
I need to create a 2x5 table which will print to an exact location on the printed page at exact height and width. This will be a template for the Avery 2 column, 5 row "business card" stock.

It isn't clear to me how to translate the 'pixel' measurements for setting up margins, row heights and widths to actually correspond to mm (or inches) when the document is printed.

Can you help with this?

Posted: Mon Sep 04, 2006 1:45 pm
by Sergey Tkachenko
First, you need to make your RichView independent of the screen resolution, otherwise the results will depend on small fonts/large fonts mode.
To do it, assign nonzero value (recommended: 96) to the global variable RichViewPixelsPerInch. It makes printing of tables and pictures independent of the screen mode.
You can do the same for text: assign the same value to RVStyle.TextStyles.PixelsPerInch.

Converting from pixels to inches:
InchValue = PixelsValue/RichViewPixelsPerInch
Converting from pixels to mm:
MMValue = (PixelsValue*127)/(RichViewPixelsPerInch*5)

Posted: Tue Sep 05, 2006 2:04 am
by DickBryant
Thanks, Sergey - very timely - I'm starting on this code in the morning :-)