1 // Copyright 2018 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef SAMPLES_PDFIUM_TEST_WRITE_HELPER_H_ 6 #define SAMPLES_PDFIUM_TEST_WRITE_HELPER_H_ 7 8 #include <string> 9 10 #include "public/fpdfview.h" 11 12 #ifdef PDF_ENABLE_SKIA 13 class SkPicture; 14 #endif 15 16 std::string WritePpm(const char* pdf_name, 17 int num, 18 void* buffer_void, 19 int stride, 20 int width, 21 int height); 22 void WriteText(FPDF_TEXTPAGE textpage, const char* pdf_name, int num); 23 void WriteAnnot(FPDF_PAGE page, const char* pdf_name, int num); 24 std::string WritePng(const char* pdf_name, 25 int num, 26 void* buffer, 27 int stride, 28 int width, 29 int height); 30 31 #ifdef _WIN32 32 std::string WriteBmp(const char* pdf_name, 33 int num, 34 void* buffer, 35 int stride, 36 int width, 37 int height); 38 void WriteEmf(FPDF_PAGE page, const char* pdf_name, int num); 39 void WritePS(FPDF_PAGE page, const char* pdf_name, int num); 40 #endif // _WIN32 41 42 #ifdef PDF_ENABLE_SKIA 43 std::string WriteSkp(const char* pdf_name, int num, const SkPicture& picture); 44 #endif // PDF_ENABLE_SKIA 45 46 void WriteAttachments(FPDF_DOCUMENT doc, const std::string& name); 47 void WriteImages(FPDF_PAGE page, const char* pdf_name, int page_num); 48 void WriteRenderedImages(FPDF_DOCUMENT doc, 49 FPDF_PAGE page, 50 const char* pdf_name, 51 int page_num); 52 void WriteDecodedThumbnailStream(FPDF_PAGE page, 53 const char* pdf_name, 54 int page_num); 55 void WriteRawThumbnailStream(FPDF_PAGE page, 56 const char* pdf_name, 57 int page_num); 58 void WriteThumbnail(FPDF_PAGE page, const char* pdf_name, int page_num); 59 60 #endif // SAMPLES_PDFIUM_TEST_WRITE_HELPER_H_ 61