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 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 if (!ParseCommandLine(argc, argv, &format, &files)) { | 371 if (!ParseCommandLine(argc, argv, &format, &files)) { |
372 printf("Usage: pdfium_test [OPTION] [FILE]...\n"); | 372 printf("Usage: pdfium_test [OPTION] [FILE]...\n"); |
373 printf("--ppm write page images <pdf-name>.<page-number>.ppm\n"); | 373 printf("--ppm write page images <pdf-name>.<page-number>.ppm\n"); |
374 #ifdef _WIN32 | 374 #ifdef _WIN32 |
375 printf("--bmp write page images <pdf-name>.<page-number>.bmp\n"); | 375 printf("--bmp write page images <pdf-name>.<page-number>.bmp\n"); |
376 printf("--emf write page meta files <pdf-name>.<page-number>.emf\n"); | 376 printf("--emf write page meta files <pdf-name>.<page-number>.emf\n"); |
377 #endif | 377 #endif |
378 return 1; | 378 return 1; |
379 } | 379 } |
380 | 380 |
381 FPDF_InitLibrary(NULL); | 381 FPDF_InitLibrary(); |
Tom Sepez
2014/12/12 22:36:12
OK for now, but interestingly, we're probably goin
jam
2014/12/12 22:55:56
i'm curious, why do that instead of initializing v
| |
382 | 382 |
383 UNSUPPORT_INFO unsuppored_info; | 383 UNSUPPORT_INFO unsuppored_info; |
384 memset(&unsuppored_info, '\0', sizeof(unsuppored_info)); | 384 memset(&unsuppored_info, '\0', sizeof(unsuppored_info)); |
385 unsuppored_info.version = 1; | 385 unsuppored_info.version = 1; |
386 unsuppored_info.FSDK_UnSupport_Handler = Unsupported_Handler; | 386 unsuppored_info.FSDK_UnSupport_Handler = Unsupported_Handler; |
387 | 387 |
388 FSDK_SetUnSpObjProcessHandler(&unsuppored_info); | 388 FSDK_SetUnSpObjProcessHandler(&unsuppored_info); |
389 | 389 |
390 while (!files.empty()) { | 390 while (!files.empty()) { |
391 const char* filename = files.front(); | 391 const char* filename = files.front(); |
(...skipping 14 matching lines...) Expand all Loading... | |
406 } else { | 406 } else { |
407 RenderPdf(filename, pBuf, len, format); | 407 RenderPdf(filename, pBuf, len, format); |
408 } | 408 } |
409 free(pBuf); | 409 free(pBuf); |
410 } | 410 } |
411 | 411 |
412 FPDF_DestroyLibrary(); | 412 FPDF_DestroyLibrary(); |
413 | 413 |
414 return 0; | 414 return 0; |
415 } | 415 } |
OLD | NEW |