lastPage) to text, and writes the text to a file on disk (
lastPage is -1, this function will convert up to the
last page in the PDF file. (See also
pdfConvertToTextFile returns 1 if successful, or 0 if the
file could not be created or if text extraction is prohibited by this
This function is identical to
pdfConvertToTextString except that
it extracts to a file on disk rather than to a string in memory.
See the "Setting parameters" section in the function list for settings that affect text extraction.