-2

Im stumbled with this problem. Im merging multiple PDF-files into one depending on what PDF's the client choose.

If i choose the smallest size PDF's and merge it works fine but as soon as its a lil bigger, like around 1MB i get Fatal error: Allowed memory size of xxxxxx bytes exhausted (tried to allocate xxxx).

I know its a php.ini problem, just put it higher but i cant change it unless i pay for a bussniess account...

Is there any workaround, like lower the PDF quality size then higher it again? I really don't know what to do :S

You can try it yourself here: pdf.devharis.com

Choose the cheapest two and order them..., then try some bigger it crashes...

Martin Schröder
  • 4,176
  • 7
  • 47
  • 81
Rovdjuret
  • 1,458
  • 3
  • 19
  • 40
  • 2
    Do you have permissions to make system calls with your hosting account? If so you could try pdftk, as it will merge multiple pdfs easily and any memory usage would be outside PHP. http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ – WebChemist Dec 28 '12 at 23:20

1 Answers1

0

I'm not going to try that site because I'm not going to give you my information and I don't read whatever language that is, but I will try to answer your question.

Altering PDFs is an intensive task, if you are using cheap hosting, then it's time to upgrade. Also knowing how much memory you're allowed would be beneficial.

nwalke
  • 3,170
  • 6
  • 35
  • 60
  • Its not any phising site or whatever you think and i appriciate your help. Its not any cheap hosting, its a regular one which i pay like 110 dollars for each year. Anyway im allowed to 64M, i guess that should be enough to handle a couple of PDFs around 600k each? :S – Rovdjuret Dec 28 '12 at 21:59
  • It would be best to put that information in the question then. 110 dollars a year is cheap... but that's besides the point. Have you set your php.ini to use all 64 megs? – nwalke Dec 28 '12 at 22:02