Page 1 of 1

strange backgroundBitmap behavior

Posted: Wed Feb 18, 2009 10:37 am
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

Posted: Wed Feb 18, 2009 5:10 pm
by Sergey Tkachenko
What's the bitmap size in pixels?

Posted: Thu Feb 19, 2009 1:01 pm
by axidavid
in pixel the size is 672 X 951

Posted: Thu Feb 19, 2009 1:54 pm
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