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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 543 |
544 FPDFBitmap_Destroy(bitmap); | 544 FPDFBitmap_Destroy(bitmap); |
545 | 545 |
546 FORM_DoPageAAction(page, form, FPDFPAGE_AACTION_CLOSE); | 546 FORM_DoPageAAction(page, form, FPDFPAGE_AACTION_CLOSE); |
547 FORM_OnBeforeClosePage(page, form); | 547 FORM_OnBeforeClosePage(page, form); |
548 FPDFText_ClosePage(text_page); | 548 FPDFText_ClosePage(text_page); |
549 FPDF_ClosePage(page); | 549 FPDF_ClosePage(page); |
550 } | 550 } |
551 | 551 |
552 FORM_DoDocumentAAction(form, FPDFDOC_AACTION_WC); | 552 FORM_DoDocumentAAction(form, FPDFDOC_AACTION_WC); |
| 553 FPDFDOC_ExitFormFillEnvironment(form); |
553 FPDF_CloseDocument(doc); | 554 FPDF_CloseDocument(doc); |
554 FPDFDOC_ExitFormFillEnvironment(form); | |
555 FPDFAvail_Destroy(pdf_avail); | 555 FPDFAvail_Destroy(pdf_avail); |
556 | 556 |
557 fprintf(stderr, "Rendered %d pages.\n", rendered_pages); | 557 fprintf(stderr, "Rendered %d pages.\n", rendered_pages); |
558 fprintf(stderr, "Skipped %d bad pages.\n", bad_pages); | 558 fprintf(stderr, "Skipped %d bad pages.\n", bad_pages); |
559 } | 559 } |
560 | 560 |
561 static const char usage_string[] = | 561 static const char usage_string[] = |
562 "Usage: pdfium_test [OPTION] [FILE]...\n" | 562 "Usage: pdfium_test [OPTION] [FILE]...\n" |
563 " --bin-dir=<path> - override path to v8 external data\n" | 563 " --bin-dir=<path> - override path to v8 external data\n" |
564 " --scale=<number> - scale output size by number (e.g. 0.5)\n" | 564 " --scale=<number> - scale output size by number (e.g. 0.5)\n" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 RenderPdf(filename, file_contents, file_length, options); | 618 RenderPdf(filename, file_contents, file_length, options); |
619 free(file_contents); | 619 free(file_contents); |
620 } | 620 } |
621 | 621 |
622 FPDF_DestroyLibrary(); | 622 FPDF_DestroyLibrary(); |
623 v8::V8::ShutdownPlatform(); | 623 v8::V8::ShutdownPlatform(); |
624 delete platform; | 624 delete platform; |
625 | 625 |
626 return 0; | 626 return 0; |
627 } | 627 } |
OLD | NEW |