1
Vote

With Split file size increasing

description

When splitting file, the file size is getting increased. The original file was 1.8 mb , when I splitted it , the splitted file size became 40 mb.

Here is my code-
$result = split_pdf($filenamepath,$splitTo,$splitForm);
$merge = new PDFMerger();
        foreach($result['splittedfiles'] as $file)
        {
          //$merge->add($file);
          $merge->addPDF($file, 'all');
        }
        $fName = str_replace('.pdf', '', $fileName).'_split_'.$k.'.pdf';
        $newFileName = $_SESSION['userFileUpload'].'/'.$fName;
        $merge->merge('file', $newFileName);

        $newMergefiles[] = $fName;
Please let me know where I am making the mistake?

comments