Open imansa opened 3 years ago
pdf file is an standard pdf file and is converted before with other pdf to image php classes like https://github.com/spatie/pdf-to-image
hmm.. will have to look into, @mablae do you think you can check this issue ?
I modified this library for me.
public function getNumberOfPages(){ if($this->number_of_pages == -1){ if($this->gs_command == "gswin32c.exe" || $this->gs_command == "gswin64c.exe"){ $this->pdf_path = str_replace('\', '/', $this->pdf_path); $delimiter = "\/"; $exit=preg_split("/".$delimiter."([^".$delimiter."]+)$/", $this->pdf_path,-1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); $ex="--permit-file-read=".$exit[0]."/"; } $pages = $this->executeGS('-q '.$ex.' -dNODISPLAY -c "('.$this->pdf_path.') (r) file runpdfbegin pdfpagecount = quit"',true); $this->number_of_pages = intval($pages); } return $this->number_of_pages; }
I'm running into the same problem. Have you had time to look at this?
this is result of running following php sample codes in command line
GPL Ghostscript 9.52: Unrecoverable error, exit code 1
error is for running
getNumberOfPages
methodsample.pdf
is near to php file and there is animages
folder there