strange backgroundBitmap behavior

General TRichView support forum. Please post your questions here
Post Reply
axidavid
Posts: 2
Joined: Wed Feb 18, 2009 10:22 am

strange backgroundBitmap behavior

Post by axidavid »

hi

we need to set the background bitmap for an A4 page (210 cm X 297 cm)

so we provide the component a bitmap of that exact size

Code: Select all

rvVisuCde: TRichViewEdit;

rvVisuCde.BackgroundBitmap.LoadFromFile(Chemin + '\Logo9.bmp');
rvVisuCde.BackgroundStyle := bsTopLeft;
it seems that the bitmap doesn't fit the page.
we have to magnify it for about 16% if we want it to perfectly fit the A4 page

is there something we are doing wrong
or are we missing something ??

we are using Delphi 5

thanks for your answer

David


here are the properties of out TRichView :

Code: Select all

object rvVisuCde: TRichViewEdit
    Left = 0
    Top = 41
    Width = 775
    Height = 504
    ReadOnly = False
    Align = alClient
    TabOrder = 3
    Visible = False
    BackgroundStyle = bsTopLeft
    DocParameters.PageWidth = 21
    DocParameters.PageHeight = 29.7
    DocParameters.Units = rvuCentimeters
    DocParameters.LeftMargin = 5
    DocParameters.RightMargin = 5
    DocParameters.TopMargin = 5
    DocParameters.BottomMargin = 5
    DoInPaletteMode = rvpaCreateCopies
    RTFOptions = [rvrtfDuplicateUnicode, rvrtfSaveEMFAsWMF, rvrtfSaveJpegAsJpeg, rvrtfSaveBitmapDefault, rvrtfSaveDocParameters]
    RVFOptions = [rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveDocProperties, rvfoLoadDocProperties]
    Style = RVStyle1
    WordWrap = False
  end
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

What's the bitmap size in pixels?
axidavid
Posts: 2
Joined: Wed Feb 18, 2009 10:22 am

Post by axidavid »

in pixel the size is 672 X 951
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If screen resolution is 96 dpi, bitmap size in cm is calculated as N/96*2.54
So this bitmap has size 17.78 x 25.16 cm
Post Reply