PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
view.h
Go to the documentation of this file.
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_VIEW_H_INCLUDED_
4#define PDFSDK_VIEW_H_INCLUDED_
5
11#include <pdfsdk/core.h>
12#include <pdfsdk/graphics.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
22typedef PDErrCode(PDFSDK_CALLCONV* PDFRenderCancelProc)(void* clientData, bool* pCancelled);
23
28typedef PDErrCode(PDFSDK_CALLCONV* PDFRenderUpdateProc)(void* clientData);
29
37
43enum {
44 kPDFRenderPrint = 1 << 0,
47 kPDFRenderNoAnnots = 1 << 2,
51};
52typedef uint32_t PDFRenderFlags;
53
54typedef struct PDFRenderContextRec_* PDFRenderContext;
55
66
71typedef struct {
72 PDFRenderFlags flags;
73 float zoom;
74 PDRotate rotate;
76
90PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateRenderContext(PDFRenderContext* pcontext);
91
101PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFRenderContextPurgeCaches(PDFRenderContext context);
102
117PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawPage(PDPage page,
118 GXRenderTarget target,
119 const PDFRenderCommonParams* commonParams,
120 const PDFRenderViewParams* viewParams);
121
139PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawFormXObject(PDEXObject xobject,
140 GXRenderTarget target,
141 const PDFRenderCommonParams* params,
142 const PDMatrix* pageMatrix);
143
159PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawContent(PDEContent content,
160 GXRenderTarget target,
161 const PDFRenderCommonParams* params,
162 const PDMatrix* pageMatrix);
163
182PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawAnnot(PDAnnot annot,
183 PDAnnotState state,
184 GXRenderTarget target,
185 const PDFRenderCommonParams* commonParams,
186 const PDFRenderViewParams* viewParams,
187 PDRotate pageRotate,
188 const PDMatrix* pageMatrix);
189
199PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToGeometry(PDEElement path, GXGeometry* pgeom);
200
213PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToPaintGeometry(PDEElement path, GXGeometry* pgeom);
214
224PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFTextToGeometry(PDEElement text, GXGeometry* pgeom);
225
243PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFInlineImageToBitmap(PDEElement image,
244 PDFRenderContext cache,
245 GXBitmap* pbitmap);
246
263PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFXObjectImageToBitmap(PDEXObject xobject,
264 PDERenderingIntent intent,
265 PDFRenderContext cache,
266 GXBitmap* pbitmap);
267
282PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFBitmapToXObjectImage(PDDoc doc,
283 GXBitmap bitmap,
284 PDAtom compression,
285 PDEXObject* pxobject);
286
294PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateFontFromFontFace(PDDoc doc, GXFontFace fontface, PDEFont* pfont);
295
302PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFFontGetRenderFontFace(PDEFont font, GXFontFace* pFontface);
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif // PDFSDK_VIEW_H_INCLUDED_
PDAnnotState
Defines visual appearance of an annotation at different times based on user interaction.
Definition annots.h:68
struct PDOCConfigRec_ * PDOCConfig
Definition optional_content.h:39
int32_t PDErrCode
Definition errors.h:44
Graphics API.
Contains rendering parameters.
Definition view.h:59
PDFRenderContext cache
Definition view.h:62
void * mondata
Definition view.h:64
const PDFRenderMonitor * monitor
Definition view.h:63
PDRectI updateRect
Definition view.h:60
PDOCConfig ocConfig
Definition view.h:61
The render monitor structure.
Definition view.h:33
PDFRenderUpdateProc update
Definition view.h:35
PDFRenderCancelProc cancel
Definition view.h:34
Contains view-specific parameters, such as zoom level, orientation and annotation settings.
Definition view.h:71
float zoom
Definition view.h:73
PDRotate rotate
Definition view.h:74
PDFRenderFlags flags
Definition view.h:72
Definition math_types.h:60
Definition math_types.h:44
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToGeometry(PDEElement path, GXGeometry *pgeom)
Converts a PDF path element into a geometric representation.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawContent(PDEContent content, GXRenderTarget target, const PDFRenderCommonParams *params, const PDMatrix *pageMatrix)
Renders PDF content to a specified render target.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawPage(PDPage page, GXRenderTarget target, const PDFRenderCommonParams *commonParams, const PDFRenderViewParams *viewParams)
Renders a PDF page to a specified render target.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawFormXObject(PDEXObject xobject, GXRenderTarget target, const PDFRenderCommonParams *params, const PDMatrix *pageMatrix)
Paints a Form XObject and renders it to a specified render target.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFTextToGeometry(PDEElement text, GXGeometry *pgeom)
Converts a PDF text element into a geometric representation.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateRenderContext(PDFRenderContext *pcontext)
Initializes a new render context for rendering PDF content.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateFontFromFontFace(PDDoc doc, GXFontFace fontface, PDEFont *pfont)
Creates a new PDF font object from a font face.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFFontGetRenderFontFace(PDEFont font, GXFontFace *pFontface)
Retrieves the font face object used for rendering from a PDF font object.
@ kPDFRenderNoContent
Definition view.h:46
@ kPDFRenderNoAnnots
Definition view.h:47
@ kPDFRenderNoMarkupAnnots
Definition view.h:49
@ kPDFRenderPrint
Definition view.h:44
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFInlineImageToBitmap(PDEElement image, PDFRenderContext cache, GXBitmap *pbitmap)
Converts an inline image within a PDF document into a bitmap image.
PDErrCode(PDFSDK_CALLCONV * PDFRenderCancelProc)(void *clientData, bool *pCancelled)
A user-defined callback function used in the event of a cancellation in the rendering.
Definition view.h:22
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawAnnot(PDAnnot annot, PDAnnotState state, GXRenderTarget target, const PDFRenderCommonParams *commonParams, const PDFRenderViewParams *viewParams, PDRotate pageRotate, const PDMatrix *pageMatrix)
Renders a single annotation on a PDF page to the specified render target.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFBitmapToXObjectImage(PDDoc doc, GXBitmap bitmap, PDAtom compression, PDEXObject *pxobject)
Converts a bitmap within a PDF document into a XObject image.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFXObjectImageToBitmap(PDEXObject xobject, PDERenderingIntent intent, PDFRenderContext cache, GXBitmap *pbitmap)
Converts an XObject image within a PDF document into a bitmap image.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFRenderContextPurgeCaches(PDFRenderContext context)
Releases a render context for rendering PDF content.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToPaintGeometry(PDEElement path, GXGeometry *pgeom)
Converts a PDF path element into a geometric representation suitable for painting operations.
PDErrCode(PDFSDK_CALLCONV * PDFRenderUpdateProc)(void *clientData)
A user-defined callback function used in the event of an update in the rendering.
Definition view.h:28