set page size from picturebox size

Hi,
I have report which has Picture1 object and it is binded tot DB it means each time it has diferent width and height.
Actually I want to set page size by Picture size something like following but the problem is different unit measure in Picture(Pixel) and page(mm) !!
FastReport.PictureObject p = report1.FindObject("Picture1") as PictureObject;
            
            ReportPage page1 = report1.Pages[0] as ReportPage;
            page1.PaperWidth = p.Width;
            page1.PaperHeight = p.Height;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.