[reportlab-users] Image from string instead of a disk file

Jack Wilkinson jwilkinson at stoneeagle.com
Tue Jun 3 16:40:07 EDT 2014


This is one of those cases where better planning in the beginning might have been a good idea.  But now we're deep in production without resources or time to go back and work out a better solution.

Our reporting mechanism looks something like:

main_program
                result = report_lab_script(some parameters)
                back to main program that processes the result

This works well for now.  But we expect to see the quantity of data increase by major quantities.

The report_lab_script, depending on the parameters handed to it, may open and use between four and nine images each time it gets called.  (It uses the "Image" routine.) That means a lot of file I/O for each page or group of pages produced in each iteration.

I'm curious if there's a way to read all of the images in the beginning of the main_program into strings and then just pass those strings to the report_lab_script so it doesn't have to do the file I/O to read the files every time.  However, "Image" seems to only take a filename.

Just grasping for straws before I end-up re-writing the world.

Appreciate any thoughts...
jack

Jack Wilkinson, Programmer
Services | VPay(r)
P: 972.367-6622
jwilkinson at stoneeagle.com<mailto:jwilkinson at stoneeagle.com>
www.stoneeagle.com<http://www.stoneeagle.com/>
www.vpayusa.com<http://www.vpayusa.com/>

111 W. Spring Valley Rd., #100
Richardson, TX 75081

CONFIDENTIALITY NOTICE: This email, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you received this email and are not the intended recipient, please inform the sender by email reply and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140603/2c7b5d78/attachment.html>


More information about the reportlab-users mailing list