I have problem to resize Image to fit in grid cell
[note – example, cell has span 3 columns 2 rows ] .
I attached simple example, code and results, one pdf with image, another without image,... also I attached image [tif file] that I try to embed.
Could you help me with this ?
I could not find any example related with it ..
Hi,
I don't think the PDF engine has any kind of scaling functionality. You would have to calculate the size of the page and the remaining size of the cell and then reduce the size of your image in code to fit.
That is what I guess …
And I wrote simple function to do it but again can not figure out how to do it ..
My problem now is :
- I scale image to size that I need
- I used IGroup for layout
- I render data with this flow :
- add grid to new Group
- add images to new Group
- add grid to new Group ...and so .. see example PDF
But when I could not figure out how to add 2 IMAGES, side by side to Group?
I attached function that will resize image and try to add to Group but how to add 2 images , side by side ?
Is it possible to set position of image in Group ?
note - when I try to add IMAGES to SITE or SECTION without Group, I can set Image in position that I need,
but next row is on next page ...
Attached is both PDF with Group and with Site
I'm not sure exactly what you are trying to do. Are you adding images into a cell in the grid? Or is this outside the grid?
If you need to place two images side-by-side, there are a number of ways you can achieve this. One thing you could do is use a Grid or a Table with 2 columns and a single row and place the images into the cells of the grid, for example.
We try to put image to cell in grid or table pattern [ 2 columns or so] but had issue with size and layout..Finally we used IGroup to add images. And use standard dnet graphic libs to control size and layout.Now we have memory issue but it different question..