使用cmd批处理文件获取pdf中的页数 [英] Get number of pages in a pdf using a cmd batch file

查看:855
本文介绍了使用cmd批处理文件获取pdf中的页数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以看到有很多问题要用C,PHP和其他方法获取pdf格式的页面数,但我想知道使用批处理文件或cmd是否有一种简单的方法来获取页面数?

解决方案

使用 pdftk :

pdftk my.pdf dump_data | grep NumberOfPages

起到了作用.

I can see there are a lot of questions for getting the number of pages in a a pdf with C, PHP and others but am wondering with a batch file or cmd is there a simple way of getting the number of pages?

解决方案

Using pdftk:

pdftk my.pdf dump_data | grep NumberOfPages

does the trick.

这篇关于使用cmd批处理文件获取pdf中的页数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆