diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp index b0e3df58ba8..b1a751915d4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp @@ -2,7 +2,7 @@ ** PDFToSVG.cpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -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()); } |