[reportlab-users] Image sizes

Andy Robinson andy at reportlab.com
Sat Nov 30 18:02:35 EST 2013


I'm really sorry, but ReportLab's staff can only comment on the
reportlab library, and not the mediawiki code. None of our staff at
ReportLab actually know the code which converts wiki pages into
Reportab's object model.

When creating a PDF, you have full control of the size of the image in
points; and however many pixels there are, they get stretched and
squeezed to the size you give. There is no magic sizing in our
framework.

I'm hoping someone who has worked on the mediawiki code can comment...

- Andy


On 30 November 2013 21:47, Yan Seiner <yan at seiner.com> wrote:

> 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.

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users




--
Andy Robinson
Managing Director
ReportLab Europe Ltd.
Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK
Tel +44-20-8405-6420


More information about the reportlab-users mailing list