hpdf_pages.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * << Haru Free PDF Library >> -- hpdf_pages.c
  3. *
  4. * URL: http://libharu.org
  5. *
  6. * Copyright (c) 1999-2006 Takeshi Kanno <[email protected]>
  7. * Copyright (c) 2007-2009 Antony Dovgal <[email protected]>
  8. *
  9. * Permission to use, copy, modify, distribute and sell this software
  10. * and its documentation for any purpose is hereby granted without fee,
  11. * provided that the above copyright notice appear in all copies and
  12. * that both that copyright notice and this permission notice appear
  13. * in supporting documentation.
  14. * It is provided "as is" without express or implied warranty.
  15. *
  16. */
  17. #ifndef _HPDF_PAGES_H
  18. #define _HPDF_PAGES_H
  19. #include "hpdf_gstate.h"
  20. #include "hpdf_ext_gstate.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /*----------------------------------------------------------------------------*/
  25. /*----- HPDF_Pages -----------------------------------------------------------*/
  26. HPDF_Pages
  27. HPDF_Pages_New (HPDF_MMgr mmgr,
  28. HPDF_Pages parent,
  29. HPDF_Xref xref);
  30. HPDF_BOOL
  31. HPDF_Pages_Validate (HPDF_Pages pages);
  32. HPDF_STATUS
  33. HPDF_Pages_AddKids (HPDF_Pages parent,
  34. HPDF_Dict kid);
  35. HPDF_STATUS
  36. HPDF_Page_InsertBefore (HPDF_Page page,
  37. HPDF_Page target);
  38. typedef struct _HPDF_PageAttr_Rec *HPDF_PageAttr;
  39. typedef struct _HPDF_PageAttr_Rec {
  40. HPDF_Pages parent;
  41. HPDF_Dict fonts;
  42. HPDF_Dict xobjects;
  43. HPDF_Dict ext_gstates;
  44. HPDF_GState gstate;
  45. HPDF_Point str_pos;
  46. HPDF_Point cur_pos;
  47. HPDF_Point text_pos;
  48. HPDF_TransMatrix text_matrix;
  49. HPDF_UINT16 gmode;
  50. HPDF_Dict contents;
  51. HPDF_Stream stream;
  52. HPDF_Xref xref;
  53. HPDF_UINT compression_mode;
  54. HPDF_PDFVer *ver;
  55. } HPDF_PageAttr_Rec;
  56. /*----------------------------------------------------------------------------*/
  57. /*----- HPDF_Page ------------------------------------------------------------*/
  58. HPDF_BOOL
  59. HPDF_Page_Validate (HPDF_Page page);
  60. HPDF_Page
  61. HPDF_Page_New (HPDF_MMgr mmgr,
  62. HPDF_Xref xref);
  63. void*
  64. HPDF_Page_GetInheritableItem (HPDF_Page page,
  65. const char *key,
  66. HPDF_UINT16 obj_class);
  67. const char*
  68. HPDF_Page_GetXObjectName (HPDF_Page page,
  69. HPDF_XObject xobj);
  70. const char*
  71. HPDF_Page_GetLocalFontName (HPDF_Page page,
  72. HPDF_Font font);
  73. const char*
  74. HPDF_Page_GetExtGStateName (HPDF_Page page,
  75. HPDF_ExtGState gstate);
  76. HPDF_Box
  77. HPDF_Page_GetMediaBox (HPDF_Page page);
  78. HPDF_STATUS
  79. HPDF_Page_SetBoxValue (HPDF_Page page,
  80. const char *name,
  81. HPDF_UINT index,
  82. HPDF_REAL value);
  83. void
  84. HPDF_Page_SetFilter (HPDF_Page page,
  85. HPDF_UINT filter);
  86. HPDF_STATUS
  87. HPDF_Page_CheckState (HPDF_Page page,
  88. HPDF_UINT mode);
  89. #ifdef __cplusplus
  90. }
  91. #endif /* __cplusplus */
  92. #endif /* _HPDF_PAGES_H */