Created
June 4, 2012 19:24
-
-
Save danielfarrell/2870306 to your computer and use it in GitHub Desktop.
pdf2image patch for osx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/pdf2image.cc b/src/pdf2image.cc | |
index d0d5c95..4a8d359 100644 | |
--- a/src/pdf2image.cc | |
+++ b/src/pdf2image.cc | |
@@ -295,12 +295,6 @@ int main(int argc, char *argv[]) { | |
globalParams->setPSPaperHeight(h); | |
globalParams->setPSNoText(gFalse); | |
- psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(), | |
- doc->getCatalog(), firstPage, lastPage, psModePS); | |
- | |
- doc->displayPages(psOut, firstPage, lastPage, static_cast<int>(72*scale), static_cast<int>(72*scale), 0, gTrue, gTrue,gTrue,NULL); | |
- delete psOut; | |
- | |
GString *gsCmd = new GString(GHOSTSCRIPT); | |
GString *tw, *th, *sc; | |
gsCmd->append(" -sDEVICE="); | |
@@ -320,13 +314,13 @@ int main(int argc, char *argv[]) { | |
th = GString::fromInt(static_cast<int>(scale*h)); | |
gsCmd->append(th); | |
gsCmd->append(" -q \""); | |
- gsCmd->append(psFileName); | |
+ gsCmd->append(fileName); | |
gsCmd->append("\""); | |
if( !executeCommand(gsCmd->getCString()) && !errQuiet) { | |
error(-1, "Failed to launch Ghostscript!\n"); | |
} | |
- unlink(psFileName->getCString()); | |
+ unlink(htmlFileName->getCString()); | |
delete tw; | |
delete th; | |
delete sc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment