[英]How to get the total number of pages of the existing pdf in ruby on rails?
如何获取rails中现有pdf的总页数 ?
You can use pdf-reader (also available as a ruby gem). 您可以使用pdf-reader (也可用作ruby gem)。 Usage is as simple as 用法很简单
reader = PDF::Reader.new("somefile.pdf")
puts reader.page_count
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.