Adding an image to a PDF using iTextSharp and scale it properly

后端 未结 5 1520
忘掉有多难
忘掉有多难 2020-12-01 10:27

here\'s my code. It correctly adds the pictures I want and everything works except that the images are using their native resolution, so if the image is big

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 11:07

    You can try something like this:

          Image logo = Image.GetInstance("pathToTheImage")
          logo.ScaleAbsolute(500, 300)
    

提交回复
热议问题