diff options
Diffstat (limited to 'dviware/dvisvgm/src/PDFToSVG.cpp')
-rw-r--r-- | dviware/dvisvgm/src/PDFToSVG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dviware/dvisvgm/src/PDFToSVG.cpp b/dviware/dvisvgm/src/PDFToSVG.cpp index b0e3df58ba..9cb30d3971 100644 --- a/dviware/dvisvgm/src/PDFToSVG.cpp +++ b/dviware/dvisvgm/src/PDFToSVG.cpp @@ -45,7 +45,7 @@ void PDFToSVG::checkGSAndFileFormat () { if (!PDFHandler::available()) { ostringstream oss; if (gsVersion() > 0) { - oss << "To process PDF files, either Ghostscript < 10.1 or mutool is required.\n"; + oss << "To process PDF files, either Ghostscript < 10.01.0 or mutool is required.\n"; oss << "The installed Ghostscript version " << Ghostscript().revisionstr() << " isn't supported.\n"; throw MessageException(oss.str()); } @@ -59,7 +59,10 @@ void PDFToSVG::checkGSAndFileFormat () { /** Returns the total number of pages in the PDF file. */ int PDFToSVG::totalPageCount () const { if (_totalPageCount < 0) { - _totalPageCount = psInterpreter().pdfPageCount(filename()); + if (_useGS) + _totalPageCount = psInterpreter().pdfPageCount(filename()); + else + _totalPageCount = PDFHandler::numberOfPages(filename()); if (_totalPageCount < 1) throw MessageException("can't retrieve number of pages from file " + filename()); } |