Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
write.h
Go to the documentation of this file.
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_HELPERS_WRITE_H_
6#define SAMPLES_HELPERS_WRITE_H_
7
8#include <memory>
9#include <string>
10
11#include "public/fpdfview.h"
12
13#ifdef PDF_ENABLE_SKIA
14class SkPicture;
15class SkWStream;
16#endif // PDF_ENABLE_SKIA
17
18std::string WritePpm(const char* pdf_name,
19 int num,
20 void* buffer_void,
21 int stride,
22 int width,
23 int height);
24void WriteText(FPDF_TEXTPAGE textpage, const char* pdf_name, int num);
25void WriteAnnot(FPDF_PAGE page, const char* pdf_name, int num);
26std::string WritePng(const char* pdf_name,
27 int num,
28 void* buffer,
29 int stride,
30 int width,
31 int height);
32
33#ifdef _WIN32
34std::string WriteBmp(const char* pdf_name,
35 int num,
36 void* buffer,
37 int stride,
38 int width,
39 int height);
40void WriteEmf(FPDF_PAGE page, const char* pdf_name, int num);
41void WritePS(FPDF_PAGE page, const char* pdf_name, int num);
42#endif // _WIN32
43
44#ifdef PDF_ENABLE_SKIA
45std::unique_ptr<SkWStream> WriteToSkWStream(const std::string& pdf_name,
46 int num,
47 const std::string& extension);
48std::unique_ptr<SkWStream> WriteToSkWStream(const std::string& pdf_name,
49 int num,
50 const std::string& extension,
51 std::string& filename);
52std::string WriteSkp(const char* pdf_name, int num, const SkPicture& picture);
53#endif // PDF_ENABLE_SKIA
54
55void WriteAttachments(FPDF_DOCUMENT doc, const std::string& name);
56void WriteImages(FPDF_PAGE page, const char* pdf_name, int page_num);
57void WriteRenderedImages(FPDF_DOCUMENT doc,
58 FPDF_PAGE page,
59 const char* pdf_name,
60 int page_num);
61void WriteDecodedThumbnailStream(FPDF_PAGE page,
62 const char* pdf_name,
63 int page_num);
64void WriteRawThumbnailStream(FPDF_PAGE page,
65 const char* pdf_name,
66 int page_num);
67void WriteThumbnail(FPDF_PAGE page, const char* pdf_name, int page_num);
68
69#endif // SAMPLES_HELPERS_WRITE_H_
#define FPDF_ANNOT_FILEATTACHMENT
Definition fpdf_annot.h:37
#define FPDF_ANNOT_RICHMEDIA
Definition fpdf_annot.h:46
#define FPDF_ANNOT_STAMP
Definition fpdf_annot.h:33
#define FPDF_ANNOT_FLAG_INVISIBLE
Definition fpdf_annot.h:52
#define FPDF_ANNOT_MOVIE
Definition fpdf_annot.h:39
#define FPDF_ANNOT_FLAG_NOROTATE
Definition fpdf_annot.h:56
#define FPDF_ANNOT_FLAG_NOZOOM
Definition fpdf_annot.h:55
#define FPDF_ANNOT_FLAG_HIDDEN
Definition fpdf_annot.h:53
#define FPDF_ANNOT_FLAG_PRINT
Definition fpdf_annot.h:54
#define FPDF_ANNOT_THREED
Definition fpdf_annot.h:45
#define FPDF_ANNOT_STRIKEOUT
Definition fpdf_annot.h:32
#define FPDF_ANNOT_UNDERLINE
Definition fpdf_annot.h:30
#define FPDF_ANNOT_LINE
Definition fpdf_annot.h:24
#define FPDF_ANNOT_SCREEN
Definition fpdf_annot.h:41
#define FPDF_ANNOT_FLAG_READONLY
Definition fpdf_annot.h:58
FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page)
#define FPDF_ANNOT_WATERMARK
Definition fpdf_annot.h:44
#define FPDF_ANNOT_XFAWIDGET
Definition fpdf_annot.h:47
#define FPDF_ANNOT_WIDGET
Definition fpdf_annot.h:40
#define FPDF_ANNOT_HIGHLIGHT
Definition fpdf_annot.h:29
#define FPDF_ANNOT_TRAPNET
Definition fpdf_annot.h:43
#define FPDF_ANNOT_SQUIGGLY
Definition fpdf_annot.h:31
#define FPDF_ANNOT_SOUND
Definition fpdf_annot.h:38
#define FPDF_ANNOT_INK
Definition fpdf_annot.h:35
#define FPDF_ANNOT_FLAG_LOCKED
Definition fpdf_annot.h:59
#define FPDF_ANNOT_SQUARE
Definition fpdf_annot.h:25
#define FPDF_ANNOT_FREETEXT
Definition fpdf_annot.h:23
#define FPDF_ANNOT_FLAG_NOVIEW
Definition fpdf_annot.h:57
#define FPDF_ANNOT_POLYGON
Definition fpdf_annot.h:27
#define FPDF_ANNOT_CARET
Definition fpdf_annot.h:34
#define FPDF_ANNOT_POPUP
Definition fpdf_annot.h:36
@ FPDFANNOT_COLORTYPE_InteriorColor
Definition fpdf_annot.h:97
@ FPDFANNOT_COLORTYPE_Color
Definition fpdf_annot.h:96
#define FPDF_ANNOT_FLAG_TOGGLENOVIEW
Definition fpdf_annot.h:60
#define FPDF_ANNOT_CIRCLE
Definition fpdf_annot.h:26
#define FPDF_ANNOT_TEXT
Definition fpdf_annot.h:21
#define FPDF_ANNOT_PRINTERMARK
Definition fpdf_annot.h:42
#define FPDF_ANNOT_LINK
Definition fpdf_annot.h:22
#define FPDF_ANNOT_POLYLINE
Definition fpdf_annot.h:28
FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAttachment_GetName(FPDF_ATTACHMENT attachment, FPDF_WCHAR *buffer, unsigned long buflen)
FPDF_EXPORT FPDF_ATTACHMENT FPDF_CALLCONV FPDFDoc_GetAttachment(FPDF_DOCUMENT document, int index)
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAttachment_GetFile(FPDF_ATTACHMENT attachment, void *buffer, unsigned long buflen, unsigned long *out_buflen)
FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPage_GetObject(FPDF_PAGE page, int index)
FPDF_EXPORT int FPDF_CALLCONV FPDFPageObj_GetType(FPDF_PAGEOBJECT page_object)
#define FPDF_PAGEOBJ_PATH
Definition fpdf_edit.h:40
#define FPDF_PAGEOBJ_TEXT
Definition fpdf_edit.h:39
#define FPDF_PAGEOBJ_SHADING
Definition fpdf_edit.h:42
#define FPDF_PAGEOBJ_IMAGE
Definition fpdf_edit.h:41
#define FPDF_PAGEOBJ_FORM
Definition fpdf_edit.h:43
FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObjects(FPDF_PAGE page)
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page)
Definition fpdf_text.cpp:59
FPDF_EXPORT unsigned int FPDF_CALLCONV FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index)
Definition fpdf_text.cpp:65
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFPage_GetRawThumbnailData(FPDF_PAGE page, void *buffer, unsigned long buflen)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFPage_GetDecodedThumbnailData(FPDF_PAGE page, void *buffer, unsigned long buflen)
#define FPDFBitmap_BGR
Definition fpdfview.h:1100
#define FPDFBitmap_BGRx
Definition fpdfview.h:1102
#define FPDFBitmap_BGRA
Definition fpdfview.h:1104
#define FPDFBitmap_Unknown
Definition fpdfview.h:1096
#define FPDFBitmap_Gray
Definition fpdfview.h:1098
bool GetThumbnailFilename(char *name_buf, size_t name_buf_size, const char *pdf_name, int page_num, ThumbnailDecodeType decode_type)
Definition write.cc:644
void WriteDecodedThumbnailStream(FPDF_PAGE page, const char *pdf_name, int page_num)
Definition write.cc:838
void WriteRenderedImages(FPDF_DOCUMENT doc, FPDF_PAGE page, const char *pdf_name, int page_num)
Definition write.cc:802
void WriteBufferToFile(const void *buf, size_t buflen, const char *filename, const char *filetype)
Definition write.cc:673
ThumbnailDecodeType
Definition write.cc:642
void WriteRawThumbnailStream(FPDF_PAGE page, const char *pdf_name, int page_num)
Definition write.cc:868
std::vector< uint8_t > EncodeBitmapToPng(ScopedFPDFBitmap bitmap)
Definition write.cc:692
void WriteAnnot(FPDF_PAGE page, const char *pdf_name, int num)
Definition write.cc:339
void WriteImages(FPDF_PAGE page, const char *pdf_name, int page_num)
Definition write.cc:769
std::string WritePng(const char *pdf_name, int num, void *buffer, int stride, int width, int height)
Definition write.cc:451
void WriteThumbnail(FPDF_PAGE page, const char *pdf_name, int page_num)
Definition write.cc:896
void WriteText(FPDF_TEXTPAGE textpage, const char *pdf_name, int num)
Definition write.cc:310
std::string WritePpm(const char *pdf_name, int num, void *buffer_void, int stride, int width, int height)
Definition write.cc:259
void WriteAttachments(FPDF_DOCUMENT doc, const std::string &name)
Definition write.cc:714