Haru Free PDF Library
|
Data Structures | |
struct | _HPDF_PageSizeValue |
Data structure representing page size (width and height), in points. More... | |
Typedefs | |
typedef struct _HPDF_PageSizeValue | HPDF_PageSizeValue |
Data structure representing page size (width and height), in points. More... | |
Functions | |
HPDF_PageLayout | HPDF_GetPageLayout (HPDF_Doc pdf) |
Return page display layout. More... | |
HPDF_STATUS | HPDF_SetPageLayout (HPDF_Doc pdf, HPDF_PageLayout layout) |
Set page display layout. If attribute is not set, the setting of the viewer application is used. More... | |
HPDF_PageMode | HPDF_GetPageMode (HPDF_Doc pdf) |
Return page display mode. More... | |
HPDF_STATUS | HPDF_SetPageMode (HPDF_Doc pdf, HPDF_PageMode mode) |
Set document display mode. More... | |
HPDF_STATUS | HPDF_SetOpenAction (HPDF_Doc pdf, HPDF_Destination open_action) |
Set the first page to appear when a document is opened. More... | |
HPDF_Page | HPDF_GetCurrentPage (HPDF_Doc pdf) |
Get handle of current page object. More... | |
HPDF_Page | HPDF_AddPage (HPDF_Doc pdf) |
Create new page and add it after the last page of document. More... | |
HPDF_Page | HPDF_InsertPage (HPDF_Doc pdf, HPDF_Page page) |
Create new page and insert it just before specified page. More... | |
HPDF_STATUS | HPDF_AddPageLabel (HPDF_Doc pdf, HPDF_UINT page_num, HPDF_PageNumStyle style, HPDF_UINT first_page, const char *prefix) |
Add page labeling range for document. More... | |
HPDF_STATUS | HPDF_Page_SetWidth (HPDF_Page page, HPDF_REAL value) |
Change page width. More... | |
HPDF_STATUS | HPDF_Page_SetHeight (HPDF_Page page, HPDF_REAL value) |
Change page height. More... | |
HPDF_STATUS | HPDF_Page_SetSize (HPDF_Page page, HPDF_PageSizes size, HPDF_PageDirection direction) |
Change page size and direction to a predefined ones. More... | |
HPDF_STATUS | HPDF_Page_SetRotate (HPDF_Page page, HPDF_UINT16 angle) |
Set rotation angle of the page. More... | |
HPDF_REAL | HPDF_Page_TextWidth (HPDF_Page page, const char *text) |
Get text width in current font size, character spacing and word spacing. More... | |
HPDF_UINT | HPDF_Page_MeasureText (HPDF_Page page, const char *text, HPDF_REAL width, HPDF_BOOL wordwrap, HPDF_REAL *real_width) |
Calculate byte length which can be included within the specified width. More... | |
HPDF_REAL | HPDF_Page_GetWidth (HPDF_Page page) |
Get page width. More... | |
HPDF_REAL | HPDF_Page_GetHeight (HPDF_Page page) |
Get page height. More... | |
HPDF_UINT16 | HPDF_Page_GetGMode (HPDF_Page page) |
Get current graphics mode. More... | |
HPDF_Point | HPDF_Page_GetCurrentPos (HPDF_Page page) |
Get current position for path painting. More... | |
HPDF_Point | HPDF_Page_GetCurrentTextPos (HPDF_Page page) |
Get current position for text showing. More... | |
HPDF_Font | HPDF_Page_GetCurrentFont (HPDF_Page page) |
Get page current font handle. More... | |
HPDF_REAL | HPDF_Page_GetCurrentFontSize (HPDF_Page page) |
Get page current font size. More... | |
HPDF_TransMatrix | HPDF_Page_GetTransMatrix (HPDF_Page page) |
Get page current transformation matrix. More... | |
HPDF_REAL | HPDF_Page_GetLineWidth (HPDF_Page page) |
Get page current line width. More... | |
HPDF_LineCap | HPDF_Page_GetLineCap (HPDF_Page page) |
Get page current line cap. More... | |
HPDF_LineJoin | HPDF_Page_GetLineJoin (HPDF_Page page) |
Get page current line join. More... | |
HPDF_REAL | HPDF_Page_GetMiterLimit (HPDF_Page page) |
Get page current miter limit. More... | |
HPDF_DashMode | HPDF_Page_GetDash (HPDF_Page page) |
Get page current line dash pattern. More... | |
HPDF_REAL | HPDF_Page_GetFlat (HPDF_Page page) |
Get page current flatness value. More... | |
HPDF_REAL | HPDF_Page_GetCharSpace (HPDF_Page page) |
Get page current character spacing value. More... | |
HPDF_REAL | HPDF_Page_GetWordSpace (HPDF_Page page) |
Get page current word spacing value. More... | |
HPDF_REAL | HPDF_Page_GetHorizontalScalling (HPDF_Page page) |
Get page current horizontal scaling value for text showing. More... | |
HPDF_REAL | HPDF_Page_GetTextLeading (HPDF_Page page) |
Get page current text leading value. More... | |
HPDF_TextRenderingMode | HPDF_Page_GetTextRenderingMode (HPDF_Page page) |
Get page current text rendering mode. More... | |
HPDF_REAL | HPDF_Page_GetTextRise (HPDF_Page page) |
Get page current text rise value. More... | |
HPDF_RGBColor | HPDF_Page_GetRGBFill (HPDF_Page page) |
Get page current filling color value (RGB). More... | |
HPDF_RGBColor | HPDF_Page_GetRGBStroke (HPDF_Page page) |
Get page current stroke color value (RGB). More... | |
HPDF_CMYKColor | HPDF_Page_GetCMYKFill (HPDF_Page page) |
Get page current filling color value (CMYK). More... | |
HPDF_CMYKColor | HPDF_Page_GetCMYKStroke (HPDF_Page page) |
Get page current stroke color value (CMYK). More... | |
HPDF_REAL | HPDF_Page_GetGrayFill (HPDF_Page page) |
Get page current filling color value (Gray). More... | |
HPDF_REAL | HPDF_Page_GetGrayStroke (HPDF_Page page) |
Get page current stroke color value (Gray). More... | |
HPDF_ColorSpace | HPDF_Page_GetStrokingColorSpace (HPDF_Page page) |
Get page current stroke color space. More... | |
HPDF_ColorSpace | HPDF_Page_GetFillingColorSpace (HPDF_Page page) |
Get page current filling color space. More... | |
HPDF_TransMatrix | HPDF_Page_GetTextMatrix (HPDF_Page page) |
Get page current text transformation matrix. More... | |
HPDF_UINT | HPDF_Page_GetGStateDepth (HPDF_Page page) |
Get page current graphics state stack depth. More... | |
HPDF_STATUS | HPDF_Page_New_Content_Stream (HPDF_Page page, HPDF_Dict *new_stream) |
Create new content stream on the page. More... | |
HPDF_STATUS | HPDF_Page_Insert_Shared_Content_Stream (HPDF_Page page, HPDF_Dict shared_stream) |
Insert content stream to the page. More... | |
HPDF_STATUS | HPDF_Page_SetSlideShow (HPDF_Page page, HPDF_TransitionStyle type, HPDF_REAL disp_time, HPDF_REAL trans_time) |
Configure slide transition of the page. More... | |
HPDF_STATUS | HPDF_Page_RawWrite (HPDF_Page page, char *data) |
Write raw commands to page stream This command allow user to write some data to page stream unconditionally. More... | |
Page routines are functions for page creation, styling, text setup, line setup and so on.
typedef struct _HPDF_PageSizeValue HPDF_PageSizeValue |
Data structure representing page size (width and height), in points.
Create new page and add it after the last page of document.
Document object handle. |
HPDF_STATUS HPDF_AddPageLabel | ( | HPDF_Doc | pdf, |
HPDF_UINT | page_num, | ||
HPDF_PageNumStyle | style, | ||
HPDF_UINT | first_page, | ||
const char * | prefix | ||
) |
Add page labeling range for document.
The page label is shown in the thumbnails view.
Document object handle. | |
page_num | First page applies labeling range |
style | One of the following numbering styles:
|
first_page | First page number to use |
prefix | Prefix for the page label (NULL is allowed.) |
i, ii, iii, iv, 1, 2, 3, A-8, A-9, ...
Get handle of current page object.
Document object handle. |
NULL
. HPDF_PageLayout HPDF_GetPageLayout | ( | HPDF_Doc | ) |
Return page display layout.
Document object handle. |
HPDF_PageMode HPDF_GetPageMode | ( | HPDF_Doc | ) |
Return page display mode.
Document object handle. |
Create new page and insert it just before specified page.
Document object handle. | |
page | Specify page handle object to insert newly created page right before. |
NULL
and error-handler is called.Get page current character spacing value.
page | Page object handle. |
0
. HPDF_CMYKColor HPDF_Page_GetCMYKFill | ( | HPDF_Page | page | ) |
Get page current filling color value (CMYK).
HPDF_Page_GetCMYKFill() is valid only when the page's filling color space is HPDF_CS_DEVICE_CMYK.
page | Page object handle. |
HPDF_CMYKColor{0, 0, 0, 0}
. HPDF_CMYKColor HPDF_Page_GetCMYKStroke | ( | HPDF_Page | page | ) |
Get page current stroke color value (CMYK).
HPDF_Page_GetCMYKStroke() is valid only when the page's stroke color space is HPDF_CS_DEVICE_CMYK.
page | Page object handle. |
HPDF_CMYKColor{0, 0, 0, 0}
. Get page current font handle.
page | Page object handle. |
NULL
. Get page current font size.
page | Page object handle. |
0
. HPDF_Point HPDF_Page_GetCurrentPos | ( | HPDF_Page | page | ) |
Get current position for path painting.
Application can call HPDF_Page_GetCurrentPos() only when graphics mode is HPDF_GMODE_PATH_OBJECT.
page | Page object handle. |
HPDF_Point{0, 0}
.HPDF_Point HPDF_Page_GetCurrentTextPos | ( | HPDF_Page | page | ) |
Get current position for text showing.
Application can call HPDF_Page_GetCurrentTextPos() only when graphics mode is HPDF_GMODE_TEXT_OBJECT.
page | Page object handle. |
HPDF_Point{0, 0}
. HPDF_DashMode HPDF_Page_GetDash | ( | HPDF_Page | page | ) |
Get page current line dash pattern.
page | Page object handle. |
HPDF_DashMode{{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f}
. HPDF_ColorSpace HPDF_Page_GetFillingColorSpace | ( | HPDF_Page | page | ) |
Get page current filling color space.
page | Page object handle. |
Get page current flatness value.
page | Page object handle. |
HPDF_UINT16 HPDF_Page_GetGMode | ( | HPDF_Page | page | ) |
Get current graphics mode.
page | Page object handle. |
0
. Get page current filling color value (Gray).
HPDF_Page_GetGrayFill() is valid only when the page's filling color space is HPDF_CS_DEVICE_GRAY.
page | Page object handle. |
0
. Get page current stroke color value (Gray).
HPDF_Page_GetGrayStroke() is valid only when the page's stroke color space is HPDF_CS_DEVICE_GRAY.
page | Page object handle. |
0
. Get page current graphics state stack depth.
page | Page object handle. |
0
.Get page height.
page | Page object handle. |
0
. Get page current horizontal scaling value for text showing.
page | Page object handle. |
HPDF_LineCap HPDF_Page_GetLineCap | ( | HPDF_Page | page | ) |
Get page current line cap.
page | Page object handle. |
HPDF_LineJoin HPDF_Page_GetLineJoin | ( | HPDF_Page | page | ) |
Get page current line join.
page | Page object handle. |
Get page current line width.
page | Page object handle. |
Get page current miter limit.
page | Page object handle. |
HPDF_RGBColor HPDF_Page_GetRGBFill | ( | HPDF_Page | page | ) |
Get page current filling color value (RGB).
HPDF_Page_GetRGBFill() is valid only when the page's filling color space is HPDF_CS_DEVICE_RGB.
page | Page object handle. |
HPDF_RGBColor{0, 0, 0}
. HPDF_RGBColor HPDF_Page_GetRGBStroke | ( | HPDF_Page | page | ) |
Get page current stroke color value (RGB).
HPDF_Page_GetRGBStroke() is valid only when the page's stroke color space is HPDF_CS_DEVICE_RGB.
page | Page object handle. |
HPDF_RGBColor{0, 0, 0}
. HPDF_ColorSpace HPDF_Page_GetStrokingColorSpace | ( | HPDF_Page | page | ) |
Get page current stroke color space.
page | Page object handle. |
Get page current text leading value.
page | Page object handle. |
0
. HPDF_TransMatrix HPDF_Page_GetTextMatrix | ( | HPDF_Page | page | ) |
Get page current text transformation matrix.
page | Page object handle. |
HPDF_TransMatrix{1, 0, 0, 1, 0, 0}
. HPDF_TextRenderingMode HPDF_Page_GetTextRenderingMode | ( | HPDF_Page | page | ) |
Get page current text rendering mode.
page | Page object handle. |
0
. Get page current text rise value.
page | Page object handle. |
0
. HPDF_TransMatrix HPDF_Page_GetTransMatrix | ( | HPDF_Page | page | ) |
Get page current transformation matrix.
page | Page object handle. |
HPDF_TransMatrix{1, 0, 0, 1, 0, 0}
.Get page width.
page | Page object handle. |
0
. Get page current word spacing value.
page | Page object handle. |
0
. HPDF_STATUS HPDF_Page_Insert_Shared_Content_Stream | ( | HPDF_Page | page, |
HPDF_Dict | shared_stream | ||
) |
Insert content stream to the page.
page | Page object handle. |
shared_stream | Reference to HPDF_Dict, previously created by HPDF_Page_New_Content_Stream() |
HPDF_UINT HPDF_Page_MeasureText | ( | HPDF_Page | page, |
const char * | text, | ||
HPDF_REAL | width, | ||
HPDF_BOOL | wordwrap, | ||
HPDF_REAL * | real_width | ||
) |
Calculate byte length which can be included within the specified width.
page | Page object handle. |
text | Text to get width |
width | Width of the area to put text. |
wordwrap | Word wrap flag. When there are three words of "ABCDE", "FGH", and "IJKL", and the substring until "J" can be included within the width, if word_wrap parameter is HPDF_FALSE it returns 12 , and if word_wrap parameter is HPDF_TRUE, it returns 10 (the end of the previous word). ![]() |
real_width | If this parameter is not NULL , the real widths of the text is set. An application can set it to NULL , if it is unnecessary. |
0
and calls error handler.HPDF_STATUS HPDF_Page_New_Content_Stream | ( | HPDF_Page | page, |
HPDF_Dict * | new_stream | ||
) |
Create new content stream on the page.
The call can return a reference to the new content stream in new_stream
. This reference can be used on a later pages to call HPDF_Page_Insert_Shared_Content_Stream().
The use case is when you need to place a considerable amount of identical content on multiple pages. On the first occurrence of the content, call HPDF_Page_New_Content_Stream() before you start creating the content in order to place the content in a separate stream. Call HPDF_Page_New_Content_Stream() again after you have finished the content. Then, on subsequent pages, call HPDF_Page_Insert_Shared_Content_Stream() to place the content on that page.
page | Page object handle. |
new_stream | Reference to HPDF_Dict identifying new stream. |
HPDF_STATUS HPDF_Page_RawWrite | ( | HPDF_Page | page, |
char * | data | ||
) |
Write raw commands to page stream This command allow user to write some data to page stream unconditionally.
page | Page object handle. |
data | Data to be written to page stream |
HPDF_STATUS HPDF_Page_SetHeight | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Change page height.
page | Page object handle. |
value | New page height. Valid values are between 3 and 14400 . |
HPDF_STATUS HPDF_Page_SetRotate | ( | HPDF_Page | page, |
HPDF_UINT16 | angle | ||
) |
Set rotation angle of the page.
page | Page object handle. |
angle | Specify the rotation angle of the page. It must be a multiple of 90 degrees. |
HPDF_STATUS HPDF_Page_SetSize | ( | HPDF_Page | page, |
HPDF_PageSizes | size, | ||
HPDF_PageDirection | direction | ||
) |
Change page size and direction to a predefined ones.
page | Page object handle. |
size | Specify a predefined page size value. See _HPDF_PageSizes. |
direction | Specify the direction of the page. |
HPDF_STATUS HPDF_Page_SetSlideShow | ( | HPDF_Page | page, |
HPDF_TransitionStyle | type, | ||
HPDF_REAL | disp_time, | ||
HPDF_REAL | trans_time | ||
) |
Configure slide transition of the page.
page | Page object handle. |
type | The transition style. See HPDF_TransitionStyle. |
disp_time | Page display duration (in seconds). |
trans_time | Transition effect duration (in seconds). Default is 1 second. |
HPDF_STATUS HPDF_Page_SetWidth | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Change page width.
page | Page object handle. |
value | New page width. Valid values are between 3 and 14400 . |
Get text width in current font size, character spacing and word spacing.
page | Page object handle. |
text | Text to get width |
0
and calls error handler.HPDF_STATUS HPDF_SetOpenAction | ( | HPDF_Doc | pdf, |
HPDF_Destination | open_action | ||
) |
Set the first page to appear when a document is opened.
Document object handle. | |
open_action | Set a valid destination object. |
HPDF_STATUS HPDF_SetPageLayout | ( | HPDF_Doc | pdf, |
HPDF_PageLayout | layout | ||
) |
Set page display layout. If attribute is not set, the setting of the viewer application is used.
Document object handle. | |||||||||||
layout | One of the following values:
|
HPDF_STATUS HPDF_SetPageMode | ( | HPDF_Doc | pdf, |
HPDF_PageMode | mode | ||
) |
Set document display mode.
Document object handle. | |||||||||||
mode | One of the following values:
|