Lines Matching refs:filename
195 char filename[256]; in WritePpm() local
196 snprintf(filename, sizeof(filename), "%s.%d.ppm", pdf_name, num); in WritePpm()
197 FILE* fp = fopen(filename, "wb"); in WritePpm()
219 fprintf(stderr, "Failed to write to %s\n", filename); in WritePpm()
222 return std::string(filename); in WritePpm()
226 char filename[256]; in WriteText() local
228 snprintf(filename, sizeof(filename), "%s.%d.txt", pdf_name, num); in WriteText()
230 static_cast<size_t>(chars_formatted) >= sizeof(filename)) { in WriteText()
231 fprintf(stderr, "Filename %s is too long\n", filename); in WriteText()
235 FILE* fp = fopen(filename, "w"); in WriteText()
237 fprintf(stderr, "Failed to open %s for output\n", filename); in WriteText()
244 fprintf(stderr, "Failed to write to %s\n", filename); in WriteText()
253 fprintf(stderr, "Failed to write to %s\n", filename); in WriteText()
262 char filename[256]; in WriteAnnot() local
264 snprintf(filename, sizeof(filename), "%s.%d.annot.txt", pdf_name, num); in WriteAnnot()
266 static_cast<size_t>(chars_formatted) >= sizeof(filename)) { in WriteAnnot()
267 fprintf(stderr, "Filename %s is too long\n", filename); in WriteAnnot()
271 FILE* fp = fopen(filename, "w"); in WriteAnnot()
273 fprintf(stderr, "Failed to open %s for output\n", filename); in WriteAnnot()
395 char filename[256]; in WritePng() local
397 snprintf(filename, sizeof(filename), "%s.%d.png", pdf_name, num); in WritePng()
399 static_cast<size_t>(chars_formatted) >= sizeof(filename)) { in WritePng()
400 fprintf(stderr, "Filename %s is too long\n", filename); in WritePng()
404 FILE* fp = fopen(filename, "wb"); in WritePng()
406 fprintf(stderr, "Failed to open %s for output\n", filename); in WritePng()
413 fprintf(stderr, "Failed to write to %s\n", filename); in WritePng()
416 return std::string(filename); in WritePng()
433 char filename[256]; in WriteBmp() local
434 snprintf(filename, sizeof(filename), "%s.%d.bmp", pdf_name, num); in WriteBmp()
435 FILE* fp = fopen(filename, "wb"); in WriteBmp()
456 fprintf(stderr, "Failed to write to %s\n", filename); in WriteBmp()
459 return std::string(filename); in WriteBmp()
463 char filename[256]; in WriteEmf() local
464 snprintf(filename, sizeof(filename), "%s.%d.emf", pdf_name, num); in WriteEmf()
466 HDC dc = CreateEnhMetaFileA(nullptr, filename, nullptr, nullptr); in WriteEmf()
485 char filename[256]; in WritePS() local
486 snprintf(filename, sizeof(filename), "%s.%d.ps", pdf_name, num); in WritePS()
487 FILE* fp = fopen(filename, "wb"); in WritePS()
508 fprintf(stderr, "Failed to write to %s\n", filename); in WritePS()
521 char filename[256]; in WriteSkp() local
523 snprintf(filename, sizeof(filename), "%s.%d.skp", pdf_name, num); in WriteSkp()
526 static_cast<size_t>(chars_formatted) >= sizeof(filename)) { in WriteSkp()
527 fprintf(stderr, "Filename %s is too long\n", filename); in WriteSkp()
532 SkFILEWStream wStream(filename); in WriteSkp()
534 return std::string(filename); in WriteSkp()
571 const char* filename, in WriteBufferToFile() argument
573 FILE* fp = fopen(filename, "wb"); in WriteBufferToFile()
575 fprintf(stderr, "Failed to open %s for saving %s.", filename, filetype); in WriteBufferToFile()
581 fprintf(stderr, "Successfully wrote %s %s.\n", filetype, filename); in WriteBufferToFile()
583 fprintf(stderr, "Failed to write to %s.\n", filename); in WriteBufferToFile()
669 char filename[256]; in WriteImages() local
670 int chars_formatted = snprintf(filename, sizeof(filename), "%s.%d.%d.png", in WriteImages()
673 static_cast<size_t>(chars_formatted) >= sizeof(filename)) { in WriteImages()
674 fprintf(stderr, "Filename %s for saving image is too long.\n", filename); in WriteImages()
686 WriteBufferToFile(&png_encoding.front(), png_encoding.size(), filename, in WriteImages()
694 char filename[256]; in WriteDecodedThumbnailStream() local
695 if (!GetThumbnailFilename(filename, sizeof(filename), pdf_name, page_num, in WriteDecodedThumbnailStream()
713 fprintf(stderr, "Failed to get decoded thumbnail data for %s.\n", filename); in WriteDecodedThumbnailStream()
717 WriteBufferToFile(thumb_buf.data(), decoded_data_size, filename, in WriteDecodedThumbnailStream()
724 char filename[256]; in WriteRawThumbnailStream() local
725 if (!GetThumbnailFilename(filename, sizeof(filename), pdf_name, page_num, in WriteRawThumbnailStream()
742 fprintf(stderr, "Failed to get raw thumbnail data for %s.\n", filename); in WriteRawThumbnailStream()
746 WriteBufferToFile(thumb_buf.data(), raw_data_size, filename, "raw thumbnail"); in WriteRawThumbnailStream()
750 char filename[256]; in WriteThumbnail() local
751 if (!GetThumbnailFilename(filename, sizeof(filename), pdf_name, page_num, in WriteThumbnail()
771 WriteBufferToFile(&png_encoding.front(), png_encoding.size(), filename, in WriteThumbnail()