Page 1 of 1

creating large pdf or postscript files

Posted: 2011-01-20T14:16:23-07:00
by troyd1
I want to create a 60,000 image multipage postscript or pdf file from png graphics. To test, I put 1,000 of them into a directory and then did "convert *.png multi.pdf or ps" both use up 2 gigs of memory and then abort. Is there a way to handle this. What I am trying to accomplish is to create a large sequential print file for a printer to print. The printer that I am working with can handle either of these formats. I tested with a few graphics and it works perfect. I believe it is trying to hold everything in memory and then writing it out instead of doing it incrementally.

Thanks in advance for any help, Troy

Re: creating large pdf or postscript files

Posted: 2011-01-20T14:26:08-07:00
by fmw42

Re: creating large pdf or postscript files

Posted: 2011-01-20T16:02:55-07:00
by troyd1
Thanks. I have the q16 version, and don;t think the q8 version will make a difference.

I saw this which is a way to limit memory:

env MAGICK_TMPDIR=/data nice -5 \
convert -limit memory 32 -limit map 32 \
huge_9Gb_file.psd -scene 1 +adjoin layer_%d.png

I tried a simple: convert -limit area 1000mb *.png mult.pdf

I keep getting an error that says: convert: invalid argument for option 1000mb: -limit.

What am I doing wrong? I have about 2 gig of memory to work with and 1tb of hard disk space. I am on a windows machine.
Also, where will it use temp if there is not an environmental variable set?

Re: creating large pdf or postscript files

Posted: 2011-01-20T16:05:56-07:00
by fmw42
Sorry I am not a Windows user and have not really experimented with those arguments. So you will need expert help from Magick or Anthony or some one with more experience than I.

Re: creating large pdf or postscript files

Posted: 2011-01-21T15:13:11-07:00
by troyd1
Thanks for your help anyway. I have found that I can do convert -limit memory 500 -limit map 500 *.png *.pdf and it does not run out of memory. I have 8 gig of memory and it still crashes at 2 gig if I don't do the -limit. Is there a reason for this and is there a way to use all 8 gig's? I was thinking a solution for me would be to buy more memory as my machine will hold more, but it will not be of value if the program does not use it.

Re: creating large pdf or postscript files

Posted: 2011-01-21T17:47:59-07:00
by magick
Are you using the 64-bit version of ImageMagick? If not, try it. It should be able to exceed the 2GB 32-bit Windows limit.

Re: creating large pdf or postscript files

Posted: 2011-01-22T06:40:40-07:00
by troyd1
can you use a 64 bit version on a 32 bit os?

Re: creating large pdf or postscript files

Posted: 2011-01-22T08:30:00-07:00
by magick
No you need a 64-bit OS. Windows 32-bit has a limit of 3GB address space and in general a process gets less than that when requesting memory.