Dear Aurelien, Funny. There seems to be an implementation limit for the size of the media box in Acrobat. Note that your PDF at N=100 is properly displayed with alternate PDF viewers -- I checked with Apples Preview.app without any problem. However, I found it not being displayed with Acrobat Prof. 8.2.1 as you described it. Making a detailed diff between N=50 and N=100 PDF file I found the additional content *and* the larger media box. When shrinking just the media box, the page suddenly reappeared.
However, I could not find a hint about this implementation limit in the PDF
doc. (There are common implementation limits listed in appendix C, but I didn't
find something about a maximal page size.)
There are several ways out here. You could just create smaller output (in terms
of size). Either change the numbers or change the unit (this can easily be done
by pyx.unit.set(uscale=0.1) in the beginning of your file). Alternatively you
can set a paperformat and the fittosize flag in the writePDFfile method. All
these different solutions fixed the issue for me.
Best,
André
Am 30.03.2010 um 19:10 schrieb Aurelien Mazurie:
>
> Hi fellow PyX users,
> I have used PyX with great success in the past years, but today I
> seem to have a problem with the following code:
>
> import pyx
>
> N = 50
>
> c = pyx.canvas.canvas()
>
> x, y = 0, 0
> for i in range(50):
> for j in range(N):
> c.fill(pyx.path.rect(x, y, 10, 10))
> x += 10
>
> y += 10
> x = 0
>
> c.writePDFfile("dummy.pdf")
>
> The resulting .pdf file correctly display when N is equal to 50, but
> not when N = 100 (for example). I.e., on a Windows box the second case
> would result in a .pdf that would display a blank page. Moreover, the
> bounding box seems to be incorrect, with the blank page being taller
> than it is wide.
>
> Any idea why I obtain this? For information, here are the two .pdf
> files I obtain: http://outbox.oenone.net/N50.pdf and
> http://outbox.oenone.net/N100.pdf
>
> Best,
>
> Aurelien
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user
--
by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
/ \ \ / ) [email protected], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
