"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xpdf/pdftohtml.cc" between
xpdf-4.01.01.tar.gz and xpdf-4.02.tar.gz

About: Xpdf is a PDF viewer for X.

pdftohtml.cc  (xpdf-4.01.01):pdftohtml.cc  (xpdf-4.02)
skipping to change at line 174 skipping to change at line 174
// set up the HTMLGen object // set up the HTMLGen object
htmlGen = new HTMLGen(resolution); htmlGen = new HTMLGen(resolution);
if (!htmlGen->isOk()) { if (!htmlGen->isOk()) {
exitCode = 99; exitCode = 99;
goto err1; goto err1;
} }
htmlGen->setZoom(zoom); htmlGen->setZoom(zoom);
htmlGen->setDrawInvisibleText(!skipInvisible); htmlGen->setDrawInvisibleText(!skipInvisible);
htmlGen->setAllTextInvisible(allInvisible); htmlGen->setAllTextInvisible(allInvisible);
htmlGen->setExtractFontFiles(gTrue);
htmlGen->startDoc(doc); htmlGen->startDoc(doc);
// convert the pages // convert the pages
for (pg = firstPage; pg <= lastPage; ++pg) { for (pg = firstPage; pg <= lastPage; ++pg) {
htmlFileName = GString::format("{0:s}/page{1:d}.html", htmlDir, pg); htmlFileName = GString::format("{0:s}/page{1:d}.html", htmlDir, pg);
pngFileName = GString::format("{0:s}/page{1:d}.png", htmlDir, pg); pngFileName = GString::format("{0:s}/page{1:d}.png", htmlDir, pg);
if (!(htmlFile = fopen(htmlFileName->getCString(), "wb"))) { if (!(htmlFile = fopen(htmlFileName->getCString(), "wb"))) {
error(errIO, -1, "Couldn't open HTML file '{0:t}'", htmlFileName); error(errIO, -1, "Couldn't open HTML file '{0:t}'", htmlFileName);
delete htmlFileName; delete htmlFileName;
delete pngFileName; delete pngFileName;
goto err2; goto err2;
} }
if (!(pngFile = fopen(pngFileName->getCString(), "wb"))) { if (!(pngFile = fopen(pngFileName->getCString(), "wb"))) {
error(errIO, -1, "Couldn't open PNG file '{0:t}'", pngFileName); error(errIO, -1, "Couldn't open PNG file '{0:t}'", pngFileName);
fclose(htmlFile); fclose(htmlFile);
delete htmlFileName; delete htmlFileName;
delete pngFileName; delete pngFileName;
goto err2; goto err2;
} }
pngURL = GString::format("page{0:d}.png", pg); pngURL = GString::format("page{0:d}.png", pg);
err = htmlGen->convertPage(pg, pngURL->getCString(), err = htmlGen->convertPage(pg, pngURL->getCString(), htmlDir,
&writeToFile, htmlFile, &writeToFile, htmlFile,
&writeToFile, pngFile); &writeToFile, pngFile);
delete pngURL; delete pngURL;
fclose(htmlFile); fclose(htmlFile);
fclose(pngFile); fclose(pngFile);
delete htmlFileName; delete htmlFileName;
delete pngFileName; delete pngFileName;
if (err != errNone) { if (err != errNone) {
error(errIO, -1, "Error converting page {0:d}", pg); error(errIO, -1, "Error converting page {0:d}", pg);
exitCode = 2; exitCode = 2;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)