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 FPDF_CloseDocument(doc); |
553 FPDFDOC_ExitFormFillEnvironment(form); | 554 FPDFDOC_ExitFormFillEnvironment(form); |
554 FPDF_CloseDocument(doc); | |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 RenderPdf(filename, file_contents, file_length, options); | 613 RenderPdf(filename, file_contents, file_length, options); |
614 free(file_contents); | 614 free(file_contents); |
615 } | 615 } |
616 | 616 |
617 FPDF_DestroyLibrary(); | 617 FPDF_DestroyLibrary(); |
618 v8::V8::ShutdownPlatform(); | 618 v8::V8::ShutdownPlatform(); |
619 delete platform; | 619 delete platform; |
620 | 620 |
621 return 0; | 621 return 0; |
622 } | 622 } |
OLD | NEW |