Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- controller
- MySQL
- pagination
- ruby
- linux
- Wordpress
- Ruby On Rails
- NGINX
- Git
- javascript
- staging area
- cron
- docker-compose
- centOS7
- docker
- php
- Selenium
- codeigniter4
- ubuntu
- props
- working directory
- dockerfile
- AWS
- vue
- Python
- laravel
- SQL
- ec2
- react
- imagemagick
Archives
- Today
- Total
내가 한 노력들
[ PHP ] PDF파일의 페이지 수를 알아내는 법 본문
$path = "file path";
$pdf = file_get_contents($path);
$number = preg_match_all("/\/Page\W/", $pdf, $math);
echo $number;
결과 (PDF의 페이지가 4장 존재하는 경우)
4
'IT 공부 > PHP' 카테고리의 다른 글
[ PHP ] cURL이용하여 API통신하기 (0) | 2022.09.02 |
---|---|
[ PHP ] ImageMagick을 이용하여, PDF파일을 image로 변경 또는 그 반대 (0) | 2022.07.13 |
[ PHP ] Selenium사용해서, 브라우저 자동화 테스트하기 (0) | 2022.06.14 |
[ PHP ] PDF 파일을 이미지 파일로 ( convert PDF to image ) (0) | 2022.06.01 |
[ PHP ] PHPExcel 를 이용해서 xlsx파일 읽기 (0) | 2022.05.28 |