[reportlab-users] Image sizes

Yan Seiner yan at seiner.com
Sat Nov 30 16:47:54 EST 2013


Can someone give me some clues on how image sizing works in reportlab?

I am trying to print 3 images across a page from mediawiki.

What I am getting are very small images in the pdf generated by
reportlab, eventhough the images in mediawiki are full-size.

I've tried tweaking these:

img_default_thumb_width = 675
img_max_thumb_width = 1.0 # fraction of print width for floated images
img_max_thumb_height = 1.0
img_min_res = 75
img_inline_scale_factor = 1.0 # factor by which inline images are scaled.
print_width_px = 675 # 540px are assumed to be the equivalent for a full
print width

but at some point I hit a max size of image, and the images in my pdf
document are only 1/4 page wide, instead of the 1/3 or 1/2 page that I need.

I don't really know what the above constants control and how they're
supposed to work.


More information about the reportlab-users mailing list