![]() The PDF document is cached and the client application sends an. ![]() These functions above will be used in my pdf2searchablepdf project here. PDF Info service gets the information related to the PDF file, with the specified PDF path. THE ECONOMIC IMPACT OF BAKING IN NEVADA DIRECT JOBS:4,581 WAGES:181.21 MILLION ECONOMIC IMPACT:641.76 MILLION TAX REVENUES:175.The pdfinfo technique in Ocaso's answer below is also very fast-the same as the pdftoppm one. Testing them with the time command in front shows that the strings one is extremely slow, taking ~0.200 sec on a 142 pg pdf, whereas the pdftoppm one is very fast, taking ~0.020 sec or less on the same pdf. # SUPER SLOW! Putting `time` just in front of the `strings` cmd shows it takes ~0.200 sec on a 142 # num_pgs="$(getNumPgsInPdf "path/to/mypdf.pdf")" pdfinfo Portable Document Format (PDF) document information extractor (version 4.04) SYNOPSIS pdfinfo options PDF-file DESCRIPTION Pdfinfo prints the contents of the Info’ dictionary (plus some other useful information) from a Portable Document Format (PDF) file. # Usage (works on ALL PDFs-whether password-protected or not!): Here are a couple wrapper functions to test these: # get the total number of pages in a PDF technique 1. That's it! Wrapper functions and speed testing part with this regular expression ( (*)\.$), then I pipe that to grep again with this regular expression ( *) to find just the number, which is 142 in this case. So, I pipe that stderr msg to stdout with 2>
0 Comments
Leave a Reply. |