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
creating large pdf or postscript files
Re: creating large pdf or postscript files
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?
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?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: creating large pdf or postscript files
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
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
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
can you use a 64 bit version on a 32 bit os?
Re: creating large pdf or postscript files
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.