diff --git a/pdf.c b/pdf.c
index f773872dac9bbdad314abcdcd5bfa745f1ea4e24..90c94744d7d3e5e3be03c3e193752d3545fb78fd 100644
--- a/pdf.c
+++ b/pdf.c
@@ -5206,8 +5206,7 @@ main(int argc, char *argv[])
 	/* extract text if requested */
 	if (xfile != NULL || Xfile != NULL) {
 		process_page_content(&aux);
-		if (aux.ntextobjs > 0)	// XXX always create output file?
-			text_extract(&aux, xfile, Xfile);
+		text_extract(&aux, xfile, Xfile);
 	}
 
 	return 0;