extra.py 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. # This file was automatically generated by SWIG (https://www.swig.org).
  2. # Version 4.4.0
  3. #
  4. # Do not make changes to this file unless you know what you are doing - modify
  5. # the SWIG interface file instead.
  6. from sys import version_info as _swig_python_version_info
  7. # Import the low-level C/C++ module
  8. if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
  9. from . import _extra
  10. else:
  11. import _extra
  12. try:
  13. import builtins as __builtin__
  14. except ImportError:
  15. import __builtin__
  16. def _swig_repr(self):
  17. try:
  18. strthis = "proxy of " + self.this.__repr__()
  19. except __builtin__.Exception:
  20. strthis = ""
  21. return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  22. def _swig_setattr_nondynamic_instance_variable(set):
  23. def set_instance_attr(self, name, value):
  24. if name == "this":
  25. set(self, name, value)
  26. elif name == "thisown":
  27. self.this.own(value)
  28. elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
  29. set(self, name, value)
  30. else:
  31. raise AttributeError("You cannot add instance attributes to %s" % self)
  32. return set_instance_attr
  33. def _swig_setattr_nondynamic_class_variable(set):
  34. def set_class_attr(cls, name, value):
  35. if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
  36. set(cls, name, value)
  37. else:
  38. raise AttributeError("You cannot add class attributes to %s" % cls)
  39. return set_class_attr
  40. def _swig_add_metaclass(metaclass):
  41. """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
  42. def wrapper(cls):
  43. return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
  44. return wrapper
  45. class _SwigNonDynamicMeta(type):
  46. """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
  47. __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
  48. # pylint: disable=all
  49. def page_merge(doc_des, doc_src, page_from, page_to, rotate, links, copy_annots, graft_map):
  50. return _extra.page_merge(doc_des, doc_src, page_from, page_to, rotate, links, copy_annots, graft_map)
  51. def JM_merge_range(doc_des, doc_src, spage, epage, apage, rotate, links, annots, show_progress, graft_map):
  52. return _extra.JM_merge_range(doc_des, doc_src, spage, epage, apage, rotate, links, annots, show_progress, graft_map)
  53. def FzDocument_insert_pdf(doc, src, from_page, to_page, start_at, rotate, links, annots, show_progress, final, graft_map):
  54. return _extra.FzDocument_insert_pdf(doc, src, from_page, to_page, start_at, rotate, links, annots, show_progress, final, graft_map)
  55. def page_xref(this_doc, pno):
  56. return _extra.page_xref(this_doc, pno)
  57. def _newPage(*args):
  58. return _extra._newPage(*args)
  59. def JM_add_annot_id(annot, stem):
  60. return _extra.JM_add_annot_id(annot, stem)
  61. def JM_set_annot_callout_line(annot, callout, count):
  62. return _extra.JM_set_annot_callout_line(annot, callout, count)
  63. def JM_get_annot_id_list(page):
  64. return _extra.JM_get_annot_id_list(page)
  65. def _add_caret_annot(*args):
  66. return _extra._add_caret_annot(*args)
  67. def Tools_parse_da(this_annot):
  68. return _extra.Tools_parse_da(this_annot)
  69. def Annot_getAP(annot):
  70. return _extra.Annot_getAP(annot)
  71. def Tools_update_da(this_annot, da_str):
  72. return _extra.Tools_update_da(this_annot, da_str)
  73. def JM_point_from_py(p):
  74. return _extra.JM_point_from_py(p)
  75. def Annot_rect(annot):
  76. return _extra.Annot_rect(annot)
  77. def util_transform_rect(rect, matrix):
  78. return _extra.util_transform_rect(rect, matrix)
  79. def Annot_rect3(annot):
  80. return _extra.Annot_rect3(annot)
  81. def Page_derotate_matrix(*args):
  82. return _extra.Page_derotate_matrix(*args)
  83. def JM_get_annot_xref_list(page_obj):
  84. return _extra.JM_get_annot_xref_list(page_obj)
  85. def xref_object(*args):
  86. return _extra.xref_object(*args)
  87. def Link_is_external(this_link):
  88. return _extra.Link_is_external(this_link)
  89. def Page_addAnnot_FromString(*args):
  90. return _extra.Page_addAnnot_FromString(*args)
  91. def Link_next(this_link):
  92. return _extra.Link_next(this_link)
  93. def page_count_fz2(document):
  94. return _extra.page_count_fz2(document)
  95. def page_count_fz(document):
  96. return _extra.page_count_fz(document)
  97. def page_count_pdf(pdf):
  98. return _extra.page_count_pdf(pdf)
  99. def page_count(*args):
  100. return _extra.page_count(*args)
  101. def page_annot_xrefs(*args):
  102. return _extra.page_annot_xrefs(*args)
  103. def Outline_is_external(outline):
  104. return _extra.Outline_is_external(outline)
  105. def Document_extend_toc_items(*args):
  106. return _extra.Document_extend_toc_items(*args)
  107. def ll_fz_absi(i):
  108. return _extra.ll_fz_absi(i)
  109. def JM_new_texttrace_device(out):
  110. return _extra.JM_new_texttrace_device(out)
  111. def JM_char_bbox(line, ch):
  112. return _extra.JM_char_bbox(line, ch)
  113. def JM_char_quad(line, ch):
  114. return _extra.JM_char_quad(line, ch)
  115. def JM_print_stext_page_as_text(res, page):
  116. return _extra.JM_print_stext_page_as_text(res, page)
  117. def set_skip_quad_corrections(on):
  118. return _extra.set_skip_quad_corrections(on)
  119. def set_subset_fontnames(on):
  120. return _extra.set_subset_fontnames(on)
  121. def set_small_glyph_heights(on):
  122. return _extra.set_small_glyph_heights(on)
  123. def JM_cropbox(page_obj):
  124. return _extra.JM_cropbox(page_obj)
  125. def get_cdrawings(page, extended=None, callback=None, method=None):
  126. return _extra.get_cdrawings(page, extended, callback, method)
  127. def JM_make_spanlist(line_dict, line, raw, buff, tp_rect):
  128. return _extra.JM_make_spanlist(line_dict, line, raw, buff, tp_rect)
  129. def extractWORDS(this_tpage, delimiters):
  130. return _extra.extractWORDS(this_tpage, delimiters)
  131. def extractBLOCKS(_self):
  132. return _extra.extractBLOCKS(_self)
  133. def link_uri(link):
  134. return _extra.link_uri(link)
  135. def page_get_textpage(_self, clip, flags, matrix):
  136. return _extra.page_get_textpage(_self, clip, flags, matrix)
  137. def make_table_dict(tp, table_dict, bbox):
  138. return _extra.make_table_dict(tp, table_dict, bbox)
  139. def JM_make_textpage_dict(tp, page_dict, raw):
  140. return _extra.JM_make_textpage_dict(tp, page_dict, raw)
  141. def pixmap_pixel(pm, x, y):
  142. return _extra.pixmap_pixel(pm, x, y)
  143. def pixmap_n(pixmap):
  144. return _extra.pixmap_n(pixmap)
  145. def JM_search_stext_page(page, needle):
  146. return _extra.JM_search_stext_page(page, needle)
  147. def set_pixel(pm, x, y, color):
  148. return _extra.set_pixel(pm, x, y, color)
  149. def pixmap_copy(pm, src, n):
  150. return _extra.pixmap_copy(pm, src, n)
  151. def ll_JM_color_count(pm, clip):
  152. return _extra.ll_JM_color_count(pm, clip)