OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits.h> | 5 #include <limits.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <wchar.h> | 9 #include <wchar.h> |
10 | 10 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 if (!ParseCommandLine(argc, argv, &format, &files)) { | 388 if (!ParseCommandLine(argc, argv, &format, &files)) { |
389 printf("Usage: pdfium_test [OPTION] [FILE]...\n"); | 389 printf("Usage: pdfium_test [OPTION] [FILE]...\n"); |
390 printf("--ppm write page images <pdf-name>.<page-number>.ppm\n"); | 390 printf("--ppm write page images <pdf-name>.<page-number>.ppm\n"); |
391 #ifdef _WIN32 | 391 #ifdef _WIN32 |
392 printf("--bmp write page images <pdf-name>.<page-number>.bmp\n"); | 392 printf("--bmp write page images <pdf-name>.<page-number>.bmp\n"); |
393 printf("--emf write page meta files <pdf-name>.<page-number>.emf\n"); | 393 printf("--emf write page meta files <pdf-name>.<page-number>.emf\n"); |
394 #endif | 394 #endif |
395 return 1; | 395 return 1; |
396 } | 396 } |
397 | 397 |
398 FPDF_InitLibrary(NULL); | 398 FPDF_InitLibrary(); |
399 | 399 |
400 UNSUPPORT_INFO unsuppored_info; | 400 UNSUPPORT_INFO unsuppored_info; |
401 memset(&unsuppored_info, '\0', sizeof(unsuppored_info)); | 401 memset(&unsuppored_info, '\0', sizeof(unsuppored_info)); |
402 unsuppored_info.version = 1; | 402 unsuppored_info.version = 1; |
403 unsuppored_info.FSDK_UnSupport_Handler = Unsupported_Handler; | 403 unsuppored_info.FSDK_UnSupport_Handler = Unsupported_Handler; |
404 | 404 |
405 FSDK_SetUnSpObjProcessHandler(&unsuppored_info); | 405 FSDK_SetUnSpObjProcessHandler(&unsuppored_info); |
406 | 406 |
407 while (!files.empty()) { | 407 while (!files.empty()) { |
408 const char* filename = files.front(); | 408 const char* filename = files.front(); |
(...skipping 14 matching lines...) Expand all Loading... |
423 } else { | 423 } else { |
424 RenderPdf(filename, pBuf, len, format); | 424 RenderPdf(filename, pBuf, len, format); |
425 } | 425 } |
426 free(pBuf); | 426 free(pBuf); |
427 } | 427 } |
428 | 428 |
429 FPDF_DestroyLibrary(); | 429 FPDF_DestroyLibrary(); |
430 | 430 |
431 return 0; | 431 return 0; |
432 } | 432 } |
OLD | NEW |