8 Replies Latest reply on May 7, 2013 4:10 AM by mom image

    SEAM PDF-generation, image scaling

    Ari Takku Newbie

      According to documentation, PDF-document images can be scaled by using appropriate attributes of <p:image ... />, namely height and width.


      Even though (or because of) I didn't find it in documentation, I'm asking if scaling is possible without prior knowledge over the image's dimensions. E.g. with some attribute <p:image scale="30%"... or by calculating the height/width if other is missing (e.g. if dimensions are 100x100 and I enter height as 5, the width would be calculated as 5 as well). Currently I think that if other value is missing, another value defaults to zero, which is rendered as no image at all in PDF-document. If I skip the width and height, the image will blow up to fill more space than it's dimensions call for.


      I have case with tens of images rendered in different scenarios, and only solution within my grasp is manually defining the dimensions to each of them. I'm hoping that there is some elegant way out of this.


      Any help is highly appreciated.