wubzz / pdf-merge

Merge multiple PDF Files into a single PDF document

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More than 15 pdfs causes an invalid file

happilymarrieddad opened this issue · comments

Everytime I try to generate a pdf from more than 15 other pdfs, it returns an invalid pdf file that none of the readers I have can parse. It's almost like there is a memory issue or something.

commented

@happilymarrieddad Going to need some more information on this, such as PDF filenames (length) and filesizes, what your node process CPU/Memory usage is.

oh sorry man,

selection_130

"/var/www/fusion/public/images/temp/printlabel-116251044535424852258676.pdf" "/var/www/fusion/public/images/temp/printlabel-116252042333645460811575.pdf" "/var/www/fusion/public/images/temp/printlabel-11625305474470039689505.pdf" "/var/www/fusion/public/images/temp/printlabel-11625408987722079016849.pdf" "/var/www/fusion/public/images/temp/printlabel-11625505457466533471083.pdf" "/var/www/fusion/public/images/temp/printlabel-11625605714969587011638.pdf" "/var/www/fusion/public/images/temp/printlabel-116257021536666893112044.pdf" "/var/www/fusion/public/images/temp/printlabel-1162580028078796213059976.pdf" "/var/www/fusion/public/images/temp/printlabel-1162590690549601558802.pdf" "/var/www/fusion/public/images/temp/printlabel-11626006436126211579158.pdf" "/var/www/fusion/public/images/temp/printlabel-11626108978347740286463.pdf" "/var/www/fusion/public/images/temp/printlabel-116262010192026265854248.pdf" "/var/www/fusion/public/images/temp/printmultiplelabels-05170397100087565.pdf"

more like that...
pdf-merge doesn't give me any errors but here is what easy-pdf-merge gives me.

selection_131

I understand you're not using java but I can't seem to get an error with your package. It just returns an invalid pdf. I open it in any viewer and it fails. Thanks!

I can send you the pdf's we're trying to merge.. it's not sensitive material.

Any movement on this? I am not receiving any errors either.

commented

@happilymarrieddad @prescottprue Generally this module will only throw an error if whatever the thirdparty module PDFtk spits back out is stderr.. I tested a merge of 50 PDF documents just now and it worked completely fine, all with very long names like you suggested.

My guess is this has something to do with the actual PDF files. Password protected? Encrypted? Corrupt? Hard to guess.. If you don't mind sharing them somewhere, I'll have a closer look.

My first through maybe it was due to duplicate names, since you listed a couple of duplicates, but doesn't look like that's the case either (tested, works)

hmm I'll upload some example pdfs in probably a day. Sorry I'm really busy at work and can't get to this today.