Last active
December 20, 2015 21:19
-
-
Save mtyaka/6196945 to your computer and use it in GitHub Desktop.
Patches poppler's pdftocairo to be able to write result to stdout. Tested with pdftocairo 0.22.5.
This file contains 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/utils/pdftocairo.cc b/utils/pdftocairo.cc | |
index 192d295..2c4e05a 100644 | |
--- a/utils/pdftocairo.cc | |
+++ b/utils/pdftocairo.cc | |
@@ -664,6 +664,9 @@ static GooString *getImageFileName(GooString *outputFileName, int numDigits, int | |
{ | |
char buf[10]; | |
GooString *imageName = new GooString(outputFileName); | |
+ if (imageName->cmp("fd://0") == 0) { // stdout | |
+ return imageName; | |
+ } | |
if (!singleFile) { | |
snprintf(buf, sizeof(buf), "-%0*d", numDigits, page); | |
imageName->appendf(buf); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment