[reportlab-users] reportlab-users Digest, Vol 39, Issue 4
kevin
kevin at booksys.com
Tue Oct 2 09:41:57 EDT 2007
Way to go! I can't thank you enough! I feel numb from gazing through
all the adobe pdf / javscript / .... world....mind numbing.
Thanks for the help!
Kevin @ booksys.com
reportlab-users-request at reportlab.com wrote:
> Send reportlab-users mailing list submissions to
> reportlab-users at reportlab.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://two.pairlist.net/mailman/listinfo/reportlab-users
> or, via email, send a message with subject or body 'help' to
> reportlab-users-request at reportlab.com
>
> You can reach the person managing the list at
> reportlab-users-owner at reportlab.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of reportlab-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Automatically set Page Scaling and Print? (Andy Robinson)
> 2. Re: Problem on Mac OSX (Andy Robinson)
> 3. Re: Automatically set Page Scaling and Print? (Paul McNett)
> 4. Re: Problem on Mac OSX (Reed O'Brien)
> 5. Validating PDF (and more) with JHOVE (Dinu Gherman)
> 6. Re: Validating PDF (and more) with JHOVE (Andy Robinson)
> 7. Re: Problem on Mac OSX (Y Tu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 1 Oct 2007 20:40:07 +0100
> From: "Andy Robinson" <andy at reportlab.com>
> Subject: Re: [reportlab-users] Automatically set Page Scaling and
> Print?
> To: "Support list for users of Reportlab software"
> <reportlab-users at reportlab.com>
> Message-ID:
> <956003ae0710011240m9fe9c5ek80d71ada88f42bff at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On 01/10/2007, Robin Becker <robin at reportlab.com> wrote:
>
>> .......
>> well it didn't turn out too hard. I added this at the end of canvas
>>
>>
>> canvas.setViewerPreference('PrintScaling',PDFName('None'))
>>
>
> Well done, Robin.
>
>> It seems all the entries in ViewerPreferences are names so perhaps we can agree
>> to eliminate the callers use of PDFName.
>>
>
> I agree, simple strings (or None, or whatever it needs) are the best.
> Is it possible to list the common preferences available in the
> docstring?
>
> We had a glitch this week on an (internal) project using PDFNames - we
> accidentally used pathnames with forward slashes in some Form XObject
> names, which caused Acrobat Reader to open without errors but display
> blank pages. To guard against this I think we should check internally
> that the string passed in is a valid PDF Name, and raise a helpful
> ValueError if they pass in something which isn't.
>
> - Andy
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 1 Oct 2007 20:44:13 +0100
> From: "Andy Robinson" <andy at reportlab.com>
> Subject: Re: [reportlab-users] Problem on Mac OSX
> To: "Support list for users of Reportlab software"
> <reportlab-users at reportlab.com>
> Message-ID:
> <956003ae0710011244x66b46dc2w41522de1535f5250 at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> I think this is a problem with the specific copy of the Python Imaging
> Library you have installed on your Mac OS. On many platforms, PIL is
> compiled with jpeg support. It seems your PIL isn't. We also had
> this from a customer on Mac OS last week.
>
> Can anyone who knows Mac OS well recommend what versions of PIL to
> install, or what options are needed to recompile it with JPEG support?
>
> On your second question, we don't normally run scripts from within an
> interactive prompt.
> If you want to, you need to run the same code which is at the bottom
> of that script e.g.
>
>
>>>> import os
>>>> os.chdir('c:\\code\\reportlab\\test')
>>>> import unittest
>>>> import test_pdfgen_general
>>>> unittest.TextTestRunner().run(test_pdfgen_general.makeSuite())
>>>>
> .
> ----------------------------------------------------------------------
> Ran 1 test in 1.011s
>
>
> - Andy
>
>
>
> On 01/10/2007, Y Tu <ytu888 at hotmail.com> wrote:
>
>> I installed PIL and ReportLab on Mac OS X. The test-run with command "from
>> PIL import Image" followed by "import _imaging", and "from
>> reportlab.graphics import renderPDF" succeeded. However, when I run the test
>> script (eportlab/test/test_pdfgen_general.py) coming with
>> the package, I got the following error. How to fix the problem. Another
>> question is how to run the script under the python prompt (>>>) after
>> importing the scirpt by "import test_pdfgen_general.py". Thank yuo very
>> much.
>>
>>
>> nypivs-lee:/Applications/MacPython 2.5/reportlab/test lee$
>> python test_pdfgen_general.py
>> E
>> ======================================================================
>> ERROR: Make a PDFgen document with most graphics features
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "test_pdfgen_general.py", line 833, in test0
>> run(outputfile('test_pdfgen_general.pdf'))
>> File "test_pdfgen_general.py", line 796, in run
>> c = makeDocument(filename)
>> File "test_pdfgen_general.py", line 725, in makeDocument
>> c.drawImage(tgif, 4*inch, 9.25*inch, w, h, mask='auto')
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfgen/canvas.py",
>> line 629, in drawImage
>> imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfdoc.py",
>> line 1840, in __init__
>> self.loadImageFromA85(src)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfdoc.py",
>> line 1846, in loadImageFromA85
>> imagedata = map(string.strip,pdfutils.makeA85Image(source,IMG=IMG))
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfutils.py",
>> line 35, in makeA85Image
>> raw = img.getRGBData()
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/lib/utils.py",
>> line 612, in getRGBData
>> self._data = im.tostring()
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/Image.py",
>> line 513, in tostring
>> self.load()
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/ImageFile.py",
>> line 180, in load
>> d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/Image.py",
>> line 375, in _getdecoder
>> raise IOError("decoder %s not available" % decoder_name)
>> IOError: decoder jpeg not available
>>
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.321s
>>
>> FAILED (errors=1)
>>
>> ________________________________
>> Invite your mail contacts to join your friends list with Windows Live
>> Spaces. It's easy! Try it!
>> _______________________________________________
>> reportlab-users mailing list
>> reportlab-users at reportlab.com
>> http://two.pairlist.net/mailman/listinfo/reportlab-users
>>
>>
>>
>
>
>
More information about the reportlab-users
mailing list