spire-pdf 11.6.1__py3-none-manylinux_2_31_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of spire-pdf might be problematic. Click here for more details.

Files changed (566) hide show
  1. spire/__init__.py +0 -0
  2. spire/pdf/ArtifactPropertyList.py +13 -0
  3. spire/pdf/AspectRatio.py +16 -0
  4. spire/pdf/BookletOptions.py +40 -0
  5. spire/pdf/Clip.py +16 -0
  6. spire/pdf/Collections_PdfCollection.py +121 -0
  7. spire/pdf/CompressionLevel.py +26 -0
  8. spire/pdf/ConfiguerGraphicType.py +18 -0
  9. spire/pdf/CustomFieldType.py +20 -0
  10. spire/pdf/DataFormat.py +16 -0
  11. spire/pdf/DocxOptions.py +228 -0
  12. spire/pdf/FileFormat.py +26 -0
  13. spire/pdf/FileRelatedFieldType.py +24 -0
  14. spire/pdf/Find_TextFindParameter.py +17 -0
  15. spire/pdf/GraphicMode.py +17 -0
  16. spire/pdf/HtmlConverter.py +564 -0
  17. spire/pdf/HtmlToPdfLayoutParams.py +93 -0
  18. spire/pdf/HtmlToPdfResult.py +36 -0
  19. spire/pdf/HttpMethod.py +14 -0
  20. spire/pdf/HttpReadType.py +15 -0
  21. spire/pdf/IOCSPService.py +27 -0
  22. spire/pdf/IPdfComboBoxField.py +388 -0
  23. spire/pdf/IPdfSignatureAppearance.py +20 -0
  24. spire/pdf/IPdfSignatureFormatter.py +31 -0
  25. spire/pdf/IPdfTextBoxField.py +305 -0
  26. spire/pdf/IStructureNode.py +12 -0
  27. spire/pdf/ITSAService.py +27 -0
  28. spire/pdf/ImageFormatType.py +16 -0
  29. spire/pdf/ImageQuality.py +15 -0
  30. spire/pdf/ImageType.py +14 -0
  31. spire/pdf/ImgData.py +208 -0
  32. spire/pdf/LayerExportState.py +15 -0
  33. spire/pdf/LayerPrintState.py +20 -0
  34. spire/pdf/LayerViewState.py +20 -0
  35. spire/pdf/LineBorder.py +73 -0
  36. spire/pdf/LineInfo.py +53 -0
  37. spire/pdf/LineType.py +17 -0
  38. spire/pdf/LoadHtmlType.py +18 -0
  39. spire/pdf/MergerOptions.py +39 -0
  40. spire/pdf/OCSPHttpService.py +32 -0
  41. spire/pdf/OfdConverter.py +89 -0
  42. spire/pdf/OptimizationOptions.py +85 -0
  43. spire/pdf/PDF3DAnimationType.py +15 -0
  44. spire/pdf/Pdf3DActivation.py +113 -0
  45. spire/pdf/Pdf3DActivationMode.py +20 -0
  46. spire/pdf/Pdf3DActivationState.py +14 -0
  47. spire/pdf/Pdf3DAnimation.py +69 -0
  48. spire/pdf/Pdf3DAnnotation.py +167 -0
  49. spire/pdf/Pdf3DBackground.py +84 -0
  50. spire/pdf/Pdf3DCrossSection.py +144 -0
  51. spire/pdf/Pdf3DCrossSectionCollection.py +117 -0
  52. spire/pdf/Pdf3DDeactivationMode.py +15 -0
  53. spire/pdf/Pdf3DDeactivationState.py +15 -0
  54. spire/pdf/Pdf3DLighting.py +42 -0
  55. spire/pdf/Pdf3DLightingStyle.py +24 -0
  56. spire/pdf/Pdf3DNode.py +98 -0
  57. spire/pdf/Pdf3DNodeCollection.py +123 -0
  58. spire/pdf/Pdf3DProjection.py +120 -0
  59. spire/pdf/Pdf3DProjectionClipStyle.py +15 -0
  60. spire/pdf/Pdf3DProjectionOrthoScaleMode.py +18 -0
  61. spire/pdf/Pdf3DProjectionType.py +15 -0
  62. spire/pdf/Pdf3DRenderStyle.py +44 -0
  63. spire/pdf/Pdf3DRendermode.py +158 -0
  64. spire/pdf/Pdf3DView.py +213 -0
  65. spire/pdf/Pdf3DViewCollection.py +124 -0
  66. spire/pdf/PdfAction.py +31 -0
  67. spire/pdf/PdfActionAnnotation.py +28 -0
  68. spire/pdf/PdfActionCollection.py +110 -0
  69. spire/pdf/PdfActionDestination.py +22 -0
  70. spire/pdf/PdfActionLinkAnnotation.py +37 -0
  71. spire/pdf/PdfAlignmentStyle.py +22 -0
  72. spire/pdf/PdfAnnotation.py +161 -0
  73. spire/pdf/PdfAnnotationActions.py +202 -0
  74. spire/pdf/PdfAnnotationBorder.py +86 -0
  75. spire/pdf/PdfAnnotationCollection.py +164 -0
  76. spire/pdf/PdfAnnotationException.py +13 -0
  77. spire/pdf/PdfAnnotationFlags.py +22 -0
  78. spire/pdf/PdfAnnotationIntent.py +14 -0
  79. spire/pdf/PdfAnnotationWidget.py +47 -0
  80. spire/pdf/PdfAnnotationWidgetCollection.py +68 -0
  81. spire/pdf/PdfAnnotationWidgetTypes.py +46 -0
  82. spire/pdf/PdfAppearance.py +113 -0
  83. spire/pdf/PdfAppearanceField.py +26 -0
  84. spire/pdf/PdfAppearanceState.py +94 -0
  85. spire/pdf/PdfApplicationData.py +24 -0
  86. spire/pdf/PdfAttachment.py +39 -0
  87. spire/pdf/PdfAttachmentAnnotation.py +93 -0
  88. spire/pdf/PdfAttachmentAnnotationWidget.py +61 -0
  89. spire/pdf/PdfAttachmentCollection.py +112 -0
  90. spire/pdf/PdfAttachmentIcon.py +17 -0
  91. spire/pdf/PdfAttachmentRelationship.py +24 -0
  92. spire/pdf/PdfAttributeOwner.py +132 -0
  93. spire/pdf/PdfAutomaticField.py +154 -0
  94. spire/pdf/PdfBarcode.py +180 -0
  95. spire/pdf/PdfBarcodeException.py +13 -0
  96. spire/pdf/PdfBarcodeQuietZones.py +112 -0
  97. spire/pdf/PdfBarcodeTextAlignment.py +15 -0
  98. spire/pdf/PdfBitmap.py +112 -0
  99. spire/pdf/PdfBlend.py +36 -0
  100. spire/pdf/PdfBlendBase.py +37 -0
  101. spire/pdf/PdfBlendMode.py +29 -0
  102. spire/pdf/PdfBookletBindingMode.py +18 -0
  103. spire/pdf/PdfBookletCreator.py +67 -0
  104. spire/pdf/PdfBookmark.py +135 -0
  105. spire/pdf/PdfBookmarkCollection.py +95 -0
  106. spire/pdf/PdfBookmarkWidget.py +87 -0
  107. spire/pdf/PdfBorderEffect.py +15 -0
  108. spire/pdf/PdfBorderOverlapStyle.py +14 -0
  109. spire/pdf/PdfBorderStyle.py +17 -0
  110. spire/pdf/PdfBorders.py +113 -0
  111. spire/pdf/PdfBrush.py +25 -0
  112. spire/pdf/PdfBrushes.py +1846 -0
  113. spire/pdf/PdfButtonField.py +221 -0
  114. spire/pdf/PdfButtonIconLayout.py +92 -0
  115. spire/pdf/PdfButtonIconScaleMode.py +14 -0
  116. spire/pdf/PdfButtonIconScaleReason.py +16 -0
  117. spire/pdf/PdfButtonLayoutMode.py +28 -0
  118. spire/pdf/PdfButtonWidgetFieldWidget.py +92 -0
  119. spire/pdf/PdfButtonWidgetItemCollection.py +23 -0
  120. spire/pdf/PdfButtonWidgetWidgetItem.py +63 -0
  121. spire/pdf/PdfCalGrayColor.py +44 -0
  122. spire/pdf/PdfCalGrayColorSpace.py +96 -0
  123. spire/pdf/PdfCalRGBColor.py +102 -0
  124. spire/pdf/PdfCalRGBColorSpace.py +132 -0
  125. spire/pdf/PdfCanvas.py +1714 -0
  126. spire/pdf/PdfCaretAnnotationWidget.py +21 -0
  127. spire/pdf/PdfCellStyle.py +126 -0
  128. spire/pdf/PdfCertificate.py +19 -0
  129. spire/pdf/PdfCertificationFlags.py +15 -0
  130. spire/pdf/PdfCheckBoxField.py +47 -0
  131. spire/pdf/PdfCheckBoxStyle.py +20 -0
  132. spire/pdf/PdfCheckBoxWidgetFieldWidget.py +61 -0
  133. spire/pdf/PdfCheckBoxWidgetWidgetItem.py +16 -0
  134. spire/pdf/PdfCheckBoxWidgetWidgetItemCollection.py +23 -0
  135. spire/pdf/PdfCheckFieldBase.py +37 -0
  136. spire/pdf/PdfChoiceWidgetFieldWidget.py +114 -0
  137. spire/pdf/PdfCjkFontFamily.py +19 -0
  138. spire/pdf/PdfCjkStandardFont.py +70 -0
  139. spire/pdf/PdfCodabarBarcode.py +38 -0
  140. spire/pdf/PdfCode11Barcode.py +36 -0
  141. spire/pdf/PdfCode128ABarcode.py +36 -0
  142. spire/pdf/PdfCode128BBarcode.py +28 -0
  143. spire/pdf/PdfCode128CBarcode.py +14 -0
  144. spire/pdf/PdfCode32Barcode.py +37 -0
  145. spire/pdf/PdfCode39Barcode.py +37 -0
  146. spire/pdf/PdfCode39ExtendedBarcode.py +25 -0
  147. spire/pdf/PdfCode93Barcode.py +37 -0
  148. spire/pdf/PdfCode93ExtendedBarcode.py +36 -0
  149. spire/pdf/PdfCollection.py +46 -0
  150. spire/pdf/PdfColorBlend.py +37 -0
  151. spire/pdf/PdfColorMask.py +50 -0
  152. spire/pdf/PdfColorSpace.py +17 -0
  153. spire/pdf/PdfColorSpaces.py +12 -0
  154. spire/pdf/PdfColumn.py +67 -0
  155. spire/pdf/PdfColumnCollection.py +34 -0
  156. spire/pdf/PdfComboBoxField.py +47 -0
  157. spire/pdf/PdfComboBoxWidgetFieldWidget.py +74 -0
  158. spire/pdf/PdfComboBoxWidgetItemCollection.py +29 -0
  159. spire/pdf/PdfComboBoxWidgetWidgetItem.py +16 -0
  160. spire/pdf/PdfCompareOptions.py +82 -0
  161. spire/pdf/PdfComparer.py +63 -0
  162. spire/pdf/PdfComplexColor.py +23 -0
  163. spire/pdf/PdfCompositeField.py +205 -0
  164. spire/pdf/PdfCompressionLevel.py +42 -0
  165. spire/pdf/PdfCompressor.py +79 -0
  166. spire/pdf/PdfConformanceException.py +13 -0
  167. spire/pdf/PdfConformanceLevel.py +20 -0
  168. spire/pdf/PdfConvertOptions.py +222 -0
  169. spire/pdf/PdfCreationDateField.py +81 -0
  170. spire/pdf/PdfCrossReferenceType.py +16 -0
  171. spire/pdf/PdfCustomAppearance.py +28 -0
  172. spire/pdf/PdfDashStyle.py +19 -0
  173. spire/pdf/PdfDateTimeField.py +91 -0
  174. spire/pdf/PdfDestination.py +225 -0
  175. spire/pdf/PdfDestinationMode.py +17 -0
  176. spire/pdf/PdfDestinationPageNumberField.py +111 -0
  177. spire/pdf/PdfDeviceColorSpace.py +31 -0
  178. spire/pdf/PdfDockStyle.py +18 -0
  179. spire/pdf/PdfDocument.py +1759 -0
  180. spire/pdf/PdfDocumentActions.py +162 -0
  181. spire/pdf/PdfDocumentAuthorField.py +67 -0
  182. spire/pdf/PdfDocumentBase.py +744 -0
  183. spire/pdf/PdfDocumentException.py +13 -0
  184. spire/pdf/PdfDocumentInformation.py +207 -0
  185. spire/pdf/PdfDocumentLinkAnnotation.py +54 -0
  186. spire/pdf/PdfDocumentLinkAnnotationWidget.py +40 -0
  187. spire/pdf/PdfDocumentPageCollection.py +79 -0
  188. spire/pdf/PdfDocumentPrivilege.py +163 -0
  189. spire/pdf/PdfDocumentTemplate.py +241 -0
  190. spire/pdf/PdfDrawWidget.py +28 -0
  191. spire/pdf/PdfDynamicField.py +13 -0
  192. spire/pdf/PdfEdges.py +99 -0
  193. spire/pdf/PdfEmbeddedFileSpecification.py +135 -0
  194. spire/pdf/PdfEmbeddedGoToAction.py +91 -0
  195. spire/pdf/PdfEncryptionAlgorithm.py +16 -0
  196. spire/pdf/PdfEncryptionKeySize.py +20 -0
  197. spire/pdf/PdfException.py +21 -0
  198. spire/pdf/PdfExtend.py +17 -0
  199. spire/pdf/PdfExtendedAppearance.py +48 -0
  200. spire/pdf/PdfField.py +144 -0
  201. spire/pdf/PdfFieldActions.py +201 -0
  202. spire/pdf/PdfFieldCollection.py +111 -0
  203. spire/pdf/PdfFieldWidget.py +154 -0
  204. spire/pdf/PdfFieldWidgetImportError.py +23 -0
  205. spire/pdf/PdfFieldWidgetItem.py +80 -0
  206. spire/pdf/PdfFileAnnotation.py +49 -0
  207. spire/pdf/PdfFileInfo.py +85 -0
  208. spire/pdf/PdfFileLinkAnnotation.py +76 -0
  209. spire/pdf/PdfFileLinkAnnotationWidget.py +39 -0
  210. spire/pdf/PdfFilePathType.py +14 -0
  211. spire/pdf/PdfFileSpecificationBase.py +36 -0
  212. spire/pdf/PdfFillElement.py +31 -0
  213. spire/pdf/PdfFillMode.py +18 -0
  214. spire/pdf/PdfFolder.py +100 -0
  215. spire/pdf/PdfFont.py +61 -0
  216. spire/pdf/PdfFontBase.py +298 -0
  217. spire/pdf/PdfFontFamily.py +24 -0
  218. spire/pdf/PdfFontStyle.py +17 -0
  219. spire/pdf/PdfFontType.py +20 -0
  220. spire/pdf/PdfForm.py +123 -0
  221. spire/pdf/PdfFormAction.py +54 -0
  222. spire/pdf/PdfFormFieldCollection.py +12 -0
  223. spire/pdf/PdfFormFieldWidgetCollection.py +84 -0
  224. spire/pdf/PdfFormWidget.py +148 -0
  225. spire/pdf/PdfFreeTextAnnotation.py +291 -0
  226. spire/pdf/PdfFreeTextAnnotationWidget.py +129 -0
  227. spire/pdf/PdfGoToAction.py +64 -0
  228. spire/pdf/PdfGotoNameAction.py +32 -0
  229. spire/pdf/PdfGradientBrush.py +65 -0
  230. spire/pdf/PdfGraphicsState.py +12 -0
  231. spire/pdf/PdfGraphicsUnit.py +19 -0
  232. spire/pdf/PdfGraphicsWidget.py +55 -0
  233. spire/pdf/PdfGrayConverter.py +60 -0
  234. spire/pdf/PdfGrid.py +91 -0
  235. spire/pdf/PdfGridCell.py +110 -0
  236. spire/pdf/PdfGridCellCollection.py +71 -0
  237. spire/pdf/PdfGridCellContent.py +158 -0
  238. spire/pdf/PdfGridCellContentList.py +23 -0
  239. spire/pdf/PdfGridCellStyle.py +84 -0
  240. spire/pdf/PdfGridColumn.py +65 -0
  241. spire/pdf/PdfGridColumnCollection.py +119 -0
  242. spire/pdf/PdfGridHeaderCollection.py +73 -0
  243. spire/pdf/PdfGridLayoutFormat.py +12 -0
  244. spire/pdf/PdfGridLayoutResult.py +12 -0
  245. spire/pdf/PdfGridRow.py +89 -0
  246. spire/pdf/PdfGridRowCollection.py +50 -0
  247. spire/pdf/PdfGridRowStyle.py +35 -0
  248. spire/pdf/PdfGridStyle.py +105 -0
  249. spire/pdf/PdfGridStyleBase.py +125 -0
  250. spire/pdf/PdfHTMLTextElement.py +142 -0
  251. spire/pdf/PdfHeaderSource.py +14 -0
  252. spire/pdf/PdfHighlightMode.py +18 -0
  253. spire/pdf/PdfHorizontalAlignment.py +16 -0
  254. spire/pdf/PdfHorizontalOverflowType.py +18 -0
  255. spire/pdf/PdfHtmlLayoutFormat.py +148 -0
  256. spire/pdf/PdfICCColor.py +48 -0
  257. spire/pdf/PdfICCColorSpace.py +80 -0
  258. spire/pdf/PdfImage.py +170 -0
  259. spire/pdf/PdfImageHelper.py +81 -0
  260. spire/pdf/PdfImageMask.py +34 -0
  261. spire/pdf/PdfImageType.py +14 -0
  262. spire/pdf/PdfInkAnnotation.py +28 -0
  263. spire/pdf/PdfInkAnnotationWidget.py +21 -0
  264. spire/pdf/PdfJavaScript.py +214 -0
  265. spire/pdf/PdfJavaScriptAction.py +48 -0
  266. spire/pdf/PdfKnownColor.py +39 -0
  267. spire/pdf/PdfKnownColorSpace.py +61 -0
  268. spire/pdf/PdfLabColor.py +102 -0
  269. spire/pdf/PdfLabColorSpace.py +102 -0
  270. spire/pdf/PdfLaunchAction.py +69 -0
  271. spire/pdf/PdfLayer.py +128 -0
  272. spire/pdf/PdfLayerCollection.py +172 -0
  273. spire/pdf/PdfLayerOutline.py +62 -0
  274. spire/pdf/PdfLayoutBreakType.py +14 -0
  275. spire/pdf/PdfLayoutHTMLResult.py +23 -0
  276. spire/pdf/PdfLayoutParams.py +60 -0
  277. spire/pdf/PdfLayoutResult.py +41 -0
  278. spire/pdf/PdfLayoutType.py +15 -0
  279. spire/pdf/PdfLayoutWidget.py +165 -0
  280. spire/pdf/PdfLineAnnotation.py +310 -0
  281. spire/pdf/PdfLineAnnotationWidget.py +241 -0
  282. spire/pdf/PdfLineBorderStyle.py +17 -0
  283. spire/pdf/PdfLineCap.py +15 -0
  284. spire/pdf/PdfLineCaptionType.py +18 -0
  285. spire/pdf/PdfLineEndingStyle.py +22 -0
  286. spire/pdf/PdfLineIntent.py +14 -0
  287. spire/pdf/PdfLineJoin.py +16 -0
  288. spire/pdf/PdfLinearGradientBrush.py +146 -0
  289. spire/pdf/PdfLinearGradientMode.py +16 -0
  290. spire/pdf/PdfLinkAnnotation.py +31 -0
  291. spire/pdf/PdfList.py +122 -0
  292. spire/pdf/PdfListBase.py +143 -0
  293. spire/pdf/PdfListBoxField.py +50 -0
  294. spire/pdf/PdfListBoxWidgetFieldWidget.py +52 -0
  295. spire/pdf/PdfListField.py +79 -0
  296. spire/pdf/PdfListFieldItem.py +83 -0
  297. spire/pdf/PdfListFieldItemCollection.py +121 -0
  298. spire/pdf/PdfListFieldWidgetItem.py +16 -0
  299. spire/pdf/PdfListItem.py +122 -0
  300. spire/pdf/PdfListItemCollection.py +166 -0
  301. spire/pdf/PdfListMarkerAlignment.py +14 -0
  302. spire/pdf/PdfListWidgetFieldItemCollection.py +23 -0
  303. spire/pdf/PdfListWidgetItem.py +74 -0
  304. spire/pdf/PdfListWidgetItemCollection.py +64 -0
  305. spire/pdf/PdfMDPSignatureMaker.py +54 -0
  306. spire/pdf/PdfMargins.py +170 -0
  307. spire/pdf/PdfMarkUpAnnotationWidget.py +111 -0
  308. spire/pdf/PdfMarker.py +100 -0
  309. spire/pdf/PdfMarkerBase.py +107 -0
  310. spire/pdf/PdfMask.py +13 -0
  311. spire/pdf/PdfMatrix.py +269 -0
  312. spire/pdf/PdfMatrixOrder.py +18 -0
  313. spire/pdf/PdfMerger.py +57 -0
  314. spire/pdf/PdfMetafile.py +83 -0
  315. spire/pdf/PdfMetafileLayoutFormat.py +48 -0
  316. spire/pdf/PdfMultipleNumberValueField.py +37 -0
  317. spire/pdf/PdfMultipleValueField.py +12 -0
  318. spire/pdf/PdfNamedAction.py +37 -0
  319. spire/pdf/PdfNewDocument.py +117 -0
  320. spire/pdf/PdfNewPage.py +34 -0
  321. spire/pdf/PdfNumberStyle.py +18 -0
  322. spire/pdf/PdfOrderedMarker.py +112 -0
  323. spire/pdf/PdfOrdinarySignatureMaker.py +32 -0
  324. spire/pdf/PdfPKCS1Formatter.py +59 -0
  325. spire/pdf/PdfPKCS7Formatter.py +55 -0
  326. spire/pdf/PdfPaddings.py +99 -0
  327. spire/pdf/PdfPageBase.py +665 -0
  328. spire/pdf/PdfPageCollection.py +384 -0
  329. spire/pdf/PdfPageCountField.py +92 -0
  330. spire/pdf/PdfPageLabels.py +124 -0
  331. spire/pdf/PdfPageLayout.py +26 -0
  332. spire/pdf/PdfPageMode.py +18 -0
  333. spire/pdf/PdfPageNumberField.py +67 -0
  334. spire/pdf/PdfPageOrientation.py +15 -0
  335. spire/pdf/PdfPageRotateAngle.py +16 -0
  336. spire/pdf/PdfPageSettings.py +275 -0
  337. spire/pdf/PdfPageSize.py +389 -0
  338. spire/pdf/PdfPageTemplateElement.py +271 -0
  339. spire/pdf/PdfPageTransition.py +172 -0
  340. spire/pdf/PdfPageWidget.py +45 -0
  341. spire/pdf/PdfPageWidgetEnumerator.py +54 -0
  342. spire/pdf/PdfPasswordSecurityPolicy.py +22 -0
  343. spire/pdf/PdfPath.py +420 -0
  344. spire/pdf/PdfPen.py +236 -0
  345. spire/pdf/PdfPens.py +1845 -0
  346. spire/pdf/PdfPermissionsFlags.py +23 -0
  347. spire/pdf/PdfPieceInfo.py +42 -0
  348. spire/pdf/PdfPolyLineAnnotation.py +76 -0
  349. spire/pdf/PdfPolyLineAnnotationWidget.py +21 -0
  350. spire/pdf/PdfPolygonAndPolyLineAnnotationWidget.py +21 -0
  351. spire/pdf/PdfPolygonAnnotation.py +129 -0
  352. spire/pdf/PdfPolygonAnnotationWidget.py +21 -0
  353. spire/pdf/PdfPopupAnnotation.py +118 -0
  354. spire/pdf/PdfPopupAnnotationWidget.py +58 -0
  355. spire/pdf/PdfPopupIcon.py +19 -0
  356. spire/pdf/PdfRGBColor.py +351 -0
  357. spire/pdf/PdfRadialGradientBrush.py +136 -0
  358. spire/pdf/PdfRadioButtonItemCollection.py +124 -0
  359. spire/pdf/PdfRadioButtonListField.py +102 -0
  360. spire/pdf/PdfRadioButtonListFieldWidget.py +114 -0
  361. spire/pdf/PdfRadioButtonListItem.py +91 -0
  362. spire/pdf/PdfRadioButtonWidgetItem.py +60 -0
  363. spire/pdf/PdfRadioButtonWidgetWidgetItemCollection.py +29 -0
  364. spire/pdf/PdfResetAction.py +40 -0
  365. spire/pdf/PdfRow.py +36 -0
  366. spire/pdf/PdfRowCollection.py +50 -0
  367. spire/pdf/PdfRubberStampAnnotation.py +163 -0
  368. spire/pdf/PdfRubberStampAnnotationIcon.py +27 -0
  369. spire/pdf/PdfRubberStampAnnotationWidget.py +40 -0
  370. spire/pdf/PdfSection.py +91 -0
  371. spire/pdf/PdfSectionCollection.py +96 -0
  372. spire/pdf/PdfSectionNumberField.py +67 -0
  373. spire/pdf/PdfSectionPageCollection.py +112 -0
  374. spire/pdf/PdfSectionPageCountField.py +64 -0
  375. spire/pdf/PdfSectionPageNumberField.py +64 -0
  376. spire/pdf/PdfSectionTemplate.py +102 -0
  377. spire/pdf/PdfSecurity.py +158 -0
  378. spire/pdf/PdfSecurityPolicy.py +59 -0
  379. spire/pdf/PdfSeparationColor.py +36 -0
  380. spire/pdf/PdfSeparationColorSpace.py +69 -0
  381. spire/pdf/PdfShapeWidget.py +25 -0
  382. spire/pdf/PdfSignature.py +97 -0
  383. spire/pdf/PdfSignatureAppearance.py +153 -0
  384. spire/pdf/PdfSignatureAppearanceField.py +26 -0
  385. spire/pdf/PdfSignatureField.py +79 -0
  386. spire/pdf/PdfSignatureFieldWidget.py +41 -0
  387. spire/pdf/PdfSignatureMaker.py +165 -0
  388. spire/pdf/PdfSignatureProperties.py +61 -0
  389. spire/pdf/PdfSignatureStyledField.py +192 -0
  390. spire/pdf/PdfSinglePageScalingMode.py +22 -0
  391. spire/pdf/PdfSingleValueField.py +13 -0
  392. spire/pdf/PdfSolidBrush.py +78 -0
  393. spire/pdf/PdfSortedList.py +146 -0
  394. spire/pdf/PdfSound.py +104 -0
  395. spire/pdf/PdfSoundAction.py +176 -0
  396. spire/pdf/PdfSoundAnnotation.py +86 -0
  397. spire/pdf/PdfSoundAnnotationWidget.py +69 -0
  398. spire/pdf/PdfSoundChannels.py +18 -0
  399. spire/pdf/PdfSoundEncoding.py +22 -0
  400. spire/pdf/PdfSoundIcon.py +15 -0
  401. spire/pdf/PdfSquareAnnotationWidget.py +45 -0
  402. spire/pdf/PdfStampCollection.py +115 -0
  403. spire/pdf/PdfStandardStructTypes.py +630 -0
  404. spire/pdf/PdfStandardsConverter.py +217 -0
  405. spire/pdf/PdfStateFieldWidget.py +32 -0
  406. spire/pdf/PdfStateItemCollection.py +29 -0
  407. spire/pdf/PdfStateWidgetItem.py +30 -0
  408. spire/pdf/PdfStateWidgetItemCollection.py +23 -0
  409. spire/pdf/PdfStaticField.py +13 -0
  410. spire/pdf/PdfStringFormat.py +284 -0
  411. spire/pdf/PdfStringLayoutResult.py +54 -0
  412. spire/pdf/PdfStringLayouter.py +44 -0
  413. spire/pdf/PdfStructContentItem.py +13 -0
  414. spire/pdf/PdfStructureAttributes.py +83 -0
  415. spire/pdf/PdfStructureElement.py +135 -0
  416. spire/pdf/PdfStructureTreeRoot.py +51 -0
  417. spire/pdf/PdfStyledAnnotationWidget.py +153 -0
  418. spire/pdf/PdfStyledField.py +233 -0
  419. spire/pdf/PdfStyledFieldWidget.py +329 -0
  420. spire/pdf/PdfSubSuperScript.py +15 -0
  421. spire/pdf/PdfSubmitAction.py +212 -0
  422. spire/pdf/PdfSubmitFormFlags.py +25 -0
  423. spire/pdf/PdfTable.py +421 -0
  424. spire/pdf/PdfTableDataSourceType.py +15 -0
  425. spire/pdf/PdfTableException.py +13 -0
  426. spire/pdf/PdfTableExtractor.py +42 -0
  427. spire/pdf/PdfTableLayoutFormat.py +42 -0
  428. spire/pdf/PdfTableLayoutResult.py +22 -0
  429. spire/pdf/PdfTableStyle.py +199 -0
  430. spire/pdf/PdfTaggedContent.py +45 -0
  431. spire/pdf/PdfTemplate.py +124 -0
  432. spire/pdf/PdfTexBoxWidgetItem.py +12 -0
  433. spire/pdf/PdfTextAlignment.py +16 -0
  434. spire/pdf/PdfTextAnnotationIcon.py +19 -0
  435. spire/pdf/PdfTextAnnotationWidget.py +21 -0
  436. spire/pdf/PdfTextBoxField.py +220 -0
  437. spire/pdf/PdfTextBoxFieldWidget.py +212 -0
  438. spire/pdf/PdfTextBoxWidgetItemCollection.py +29 -0
  439. spire/pdf/PdfTextExtractOptions.py +75 -0
  440. spire/pdf/PdfTextExtractor.py +35 -0
  441. spire/pdf/PdfTextFind.py +308 -0
  442. spire/pdf/PdfTextFindCollection.py +23 -0
  443. spire/pdf/PdfTextFindOptions.py +71 -0
  444. spire/pdf/PdfTextFinder.py +81 -0
  445. spire/pdf/PdfTextFragment.py +105 -0
  446. spire/pdf/PdfTextLayout.py +101 -0
  447. spire/pdf/PdfTextLayoutResult.py +33 -0
  448. spire/pdf/PdfTextMarkupAnnotation.py +126 -0
  449. spire/pdf/PdfTextMarkupAnnotationType.py +22 -0
  450. spire/pdf/PdfTextMarkupAnnotationWidget.py +53 -0
  451. spire/pdf/PdfTextReplaceOptions.py +37 -0
  452. spire/pdf/PdfTextReplacer.py +89 -0
  453. spire/pdf/PdfTextState.py +83 -0
  454. spire/pdf/PdfTextStyle.py +15 -0
  455. spire/pdf/PdfTextWebLink.py +63 -0
  456. spire/pdf/PdfTextWebLinkAnnotationWidget.py +39 -0
  457. spire/pdf/PdfTextWidget.py +227 -0
  458. spire/pdf/PdfTilingBrush.py +103 -0
  459. spire/pdf/PdfToDocConverter.py +123 -0
  460. spire/pdf/PdfToHtmlParameter.py +48 -0
  461. spire/pdf/PdfToLinearizedPdfConverter.py +65 -0
  462. spire/pdf/PdfToWordConverter.py +90 -0
  463. spire/pdf/PdfTransitionDimension.py +18 -0
  464. spire/pdf/PdfTransitionDirection.py +17 -0
  465. spire/pdf/PdfTransitionMotion.py +15 -0
  466. spire/pdf/PdfTransitionStyle.py +38 -0
  467. spire/pdf/PdfTrueTypeFont.py +58 -0
  468. spire/pdf/PdfUnidimensionalBarcode.py +173 -0
  469. spire/pdf/PdfUnitConvertor.py +151 -0
  470. spire/pdf/PdfUnorderedMarkerStyle.py +21 -0
  471. spire/pdf/PdfUriAction.py +30 -0
  472. spire/pdf/PdfUriAnnotation.py +72 -0
  473. spire/pdf/PdfUriAnnotationWidget.py +39 -0
  474. spire/pdf/PdfUsedFont.py +83 -0
  475. spire/pdf/PdfVersion.py +20 -0
  476. spire/pdf/PdfVerticalAlignment.py +16 -0
  477. spire/pdf/PdfViewerPreferences.py +162 -0
  478. spire/pdf/PdfVisibility.py +15 -0
  479. spire/pdf/PdfWatermarkAnnotation.py +86 -0
  480. spire/pdf/PdfWatermarkAnnotationWidget.py +19 -0
  481. spire/pdf/PdfWebLinkAnnotationWidget.py +21 -0
  482. spire/pdf/PdfWordWrapType.py +16 -0
  483. spire/pdf/PrintScalingMode.py +16 -0
  484. spire/pdf/ReplaceActionType.py +24 -0
  485. spire/pdf/Security_GraphicMode.py +17 -0
  486. spire/pdf/Security_IPdfSignatureFormatter.py +27 -0
  487. spire/pdf/Security_PdfSignature.py +703 -0
  488. spire/pdf/Security_SignImageLayout.py +18 -0
  489. spire/pdf/SignImageLayout.py +15 -0
  490. spire/pdf/SignInfoType.py +22 -0
  491. spire/pdf/SignTextAlignment.py +15 -0
  492. spire/pdf/SignatureConfiguerText.py +30 -0
  493. spire/pdf/SimpleTextExtractionStrategy.py +17 -0
  494. spire/pdf/StoreType.py +17 -0
  495. spire/pdf/SubmitDataFormat.py +16 -0
  496. spire/pdf/TSAHttpService.py +36 -0
  497. spire/pdf/TabOrder.py +22 -0
  498. spire/pdf/TableWidthType.py +14 -0
  499. spire/pdf/TextAlign.py +22 -0
  500. spire/pdf/TextFindParameter.py +22 -0
  501. spire/pdf/TextLocation.py +15 -0
  502. spire/pdf/Utilities_PdfImageInfo.py +68 -0
  503. spire/pdf/Utilities_PdfTable.py +48 -0
  504. spire/pdf/XFAForm.py +68 -0
  505. spire/pdf/XfaBarcodeField.py +84 -0
  506. spire/pdf/XfaButtonField.py +12 -0
  507. spire/pdf/XfaCheckButtonField.py +30 -0
  508. spire/pdf/XfaChoiceListField.py +53 -0
  509. spire/pdf/XfaDateTimeField.py +43 -0
  510. spire/pdf/XfaDoubleField.py +30 -0
  511. spire/pdf/XfaField.py +43 -0
  512. spire/pdf/XfaFloatField.py +30 -0
  513. spire/pdf/XfaImageField.py +49 -0
  514. spire/pdf/XfaIntField.py +30 -0
  515. spire/pdf/XfaSignatureField.py +12 -0
  516. spire/pdf/XfaTextField.py +30 -0
  517. spire/pdf/XlsxLineLayoutOptions.py +69 -0
  518. spire/pdf/XlsxOptions.py +12 -0
  519. spire/pdf/XlsxTextLayoutOptions.py +18 -0
  520. spire/pdf/__init__.py +699 -0
  521. spire/pdf/common/Boolean.py +194 -0
  522. spire/pdf/common/Byte.py +258 -0
  523. spire/pdf/common/Char.py +742 -0
  524. spire/pdf/common/Color.py +2189 -0
  525. spire/pdf/common/Common.py +152 -0
  526. spire/pdf/common/CultureInfo.py +567 -0
  527. spire/pdf/common/DateTime.py +1149 -0
  528. spire/pdf/common/Double.py +440 -0
  529. spire/pdf/common/EmfType.py +25 -0
  530. spire/pdf/common/Encoding.py +930 -0
  531. spire/pdf/common/FontStyle.py +27 -0
  532. spire/pdf/common/GraphicsUnit.py +29 -0
  533. spire/pdf/common/ICollection.py +73 -0
  534. spire/pdf/common/IDictionary.py +124 -0
  535. spire/pdf/common/IEnumerable.py +44 -0
  536. spire/pdf/common/IEnumerator.py +62 -0
  537. spire/pdf/common/IList.py +148 -0
  538. spire/pdf/common/Int16.py +274 -0
  539. spire/pdf/common/Int32.py +282 -0
  540. spire/pdf/common/Int64.py +258 -0
  541. spire/pdf/common/License.py +177 -0
  542. spire/pdf/common/PixelFormat.py +45 -0
  543. spire/pdf/common/Point.py +300 -0
  544. spire/pdf/common/PointF.py +276 -0
  545. spire/pdf/common/Rectangle.py +451 -0
  546. spire/pdf/common/RectangleF.py +438 -0
  547. spire/pdf/common/Regex.py +964 -0
  548. spire/pdf/common/RegexOptions.py +31 -0
  549. spire/pdf/common/Single.py +418 -0
  550. spire/pdf/common/Size.py +273 -0
  551. spire/pdf/common/SizeF.py +261 -0
  552. spire/pdf/common/SpireObject.py +81 -0
  553. spire/pdf/common/Stream.py +552 -0
  554. spire/pdf/common/String.py +1880 -0
  555. spire/pdf/common/TimeSpan.py +874 -0
  556. spire/pdf/common/UInt16.py +274 -0
  557. spire/pdf/common/UInt32.py +274 -0
  558. spire/pdf/common/UInt64.py +274 -0
  559. spire/pdf/common/__init__.py +383 -0
  560. spire/pdf/lib/Spire.Pdf.Base.so +0 -0
  561. spire/pdf/lib/__init__.py +0 -0
  562. spire/pdf/lib/libSkiaSharp.so +0 -0
  563. spire_pdf-11.6.1.dist-info/METADATA +149 -0
  564. spire_pdf-11.6.1.dist-info/RECORD +566 -0
  565. spire_pdf-11.6.1.dist-info/WHEEL +5 -0
  566. spire_pdf-11.6.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1759 @@
1
+ from enum import Enum
2
+ from plum import dispatch
3
+ from typing import TypeVar,Union,Generic,List,Tuple,overload
4
+ from spire.pdf.common import *
5
+ from spire.pdf import *
6
+ from ctypes import *
7
+ import abc
8
+
9
+ class PdfDocument (SpireObject) :
10
+ """
11
+
12
+ """
13
+ """Initializes a new instance of the class.
14
+
15
+ """
16
+ @dispatch
17
+ def __init__(self):
18
+ GetDllLibPdf().PdfDocument_Create.restype = c_void_p
19
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_Create)
20
+ super(PdfDocument, self).__init__(intPtr)
21
+ @dispatch
22
+ def __init__(self, filename:str):
23
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentF.argtypes=[c_wchar_p]
24
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentF.restype = c_void_p
25
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_CreatePdfDocumentF,filename)
26
+ super(PdfDocument, self).__init__(intPtr)
27
+ @dispatch
28
+ def __init__(self, filename:str, password:str):
29
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentFP.argtypes=[c_wchar_p,c_wchar_p]
30
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentFP.restype = c_void_p
31
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_CreatePdfDocumentFP,filename,password)
32
+ super(PdfDocument, self).__init__(intPtr)
33
+ @dispatch
34
+ def __init__(self, stream:Stream):
35
+ intPtrstream:c_void_p = stream.Ptr
36
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentS.argtypes=[c_void_p]
37
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentS.restype = c_void_p
38
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_CreatePdfDocumentS,intPtrstream)
39
+ super(PdfDocument, self).__init__(intPtr)
40
+ @dispatch
41
+ def __init__(self, stream:Stream, password:str):
42
+ intPtrstream:c_void_p = stream.Ptr
43
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentSP.argtypes=[c_void_p,c_wchar_p]
44
+ GetDllLibPdf().PdfDocument_CreatePdfDocumentSP.restype = c_void_p
45
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_CreatePdfDocumentSP,intPtrstream,password)
46
+ super(PdfDocument, self).__init__(intPtr)
47
+ def __del__(self):
48
+ GetDllLibPdf().PdfDocument_Dispose.argtypes = [c_void_p]
49
+ CallCFunction(GetDllLibPdf().PdfDocument_Dispose,self.Ptr)
50
+ super(PdfDocument, self).__del__()
51
+ # @dispatch
52
+ #
53
+ # def LoadFromBytes(self ,bytes:'Byte[]',password:str):
54
+ # """
55
+ # <summary>
56
+ # Initializes a new instance of the class.
57
+ # </summary>
58
+ # <param name="bytes">The byte array with the file content.</param>
59
+ # <param name="password">The password (user or owner) of the encrypted document.</param>
60
+ # """
61
+ # #arraybytes:ArrayTypebytes = ""
62
+ # countbytes = len(bytes)
63
+ # ArrayTypebytes = c_void_p * countbytes
64
+ # arraybytes = ArrayTypebytes()
65
+ # for i in range(0, countbytes):
66
+ # arraybytes[i] = bytes[i].Ptr
67
+ #
68
+ #
69
+ # GetDllLibPdf().PdfDocument_LoadFromBytes.argtypes=[c_void_p ,ArrayTypebytes,c_wchar_p]
70
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromBytes,self.Ptr, arraybytes,password)
71
+
72
+
73
+ @dispatch
74
+
75
+ def LoadFromStream(self ,stream:Stream,password:str):
76
+ """
77
+ Initializes a new instance.
78
+
79
+ Args:
80
+ stream (Stream): The stream with the file.
81
+ password (str): The password (user or owner) of the encrypted document.
82
+ """
83
+ intPtrstream:c_void_p = stream.Ptr
84
+
85
+ GetDllLibPdf().PdfDocument_LoadFromStreamSP.argtypes=[c_void_p ,c_void_p,c_wchar_p]
86
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromStreamSP,self.Ptr, intPtrstream,password)
87
+
88
+ @dispatch
89
+
90
+ def CreateBooklet(self ,fileName:str,width:float,height:float,bothSides:bool):
91
+ """
92
+ Thie method creates a booklet
93
+
94
+ Args:
95
+ fileName (str): The loaded document filename.
96
+ width (float): The page width.
97
+ height (float): The page height.
98
+ bothSides (bool): if set to <c>true</c> if the result in document should be printed.
99
+ """
100
+ GetDllLibPdf().PdfDocument_CreateBooklet.argtypes=[c_void_p ,c_wchar_p,c_float,c_float,c_bool]
101
+ CallCFunction(GetDllLibPdf().PdfDocument_CreateBooklet,self.Ptr, fileName,width,height,bothSides)
102
+
103
+ @dispatch
104
+
105
+ def VerifySignature(self ,signName:str)->bool:
106
+ """
107
+ Verify pdf document regarding signature.
108
+
109
+ Args:
110
+ signName (str): Signature field name.
111
+
112
+ Returns:
113
+ bool: Signature is validated return true,otherwise false
114
+ """
115
+
116
+ GetDllLibPdf().PdfDocument_VerifySignature.argtypes=[c_void_p ,c_wchar_p]
117
+ GetDllLibPdf().PdfDocument_VerifySignature.restype=c_bool
118
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_VerifySignature,self.Ptr, signName)
119
+ return ret
120
+
121
+ #
122
+ # def GetSignatureContent(self ,signName:str)->List['Byte']:
123
+ # """
124
+ # <summary>
125
+ # Get pdf document regarding signature.
126
+ # </summary>
127
+ # <param name="signName">Signature field name.</param>
128
+ # """
129
+ #
130
+ # GetDllLibPdf().PdfDocument_GetSignatureContent.argtypes=[c_void_p ,c_wchar_p]
131
+ # GetDllLibPdf().PdfDocument_GetSignatureContent.restype=IntPtrArray
132
+ # intPtrArray = CallCFunction(GetDllLibPdf().PdfDocument_GetSignatureContent,self.Ptr, signName)
133
+ # ret = GetObjVectorFromArray(intPtrArray, Byte)
134
+ # return ret
135
+
136
+
137
+ @staticmethod
138
+
139
+ def IsPasswordProtected(fileName:str)->bool:
140
+ """
141
+ Whether the file is password protected.
142
+
143
+ Args:
144
+ fileName (str): The file name.
145
+
146
+ Returns:
147
+ bool: if password protected,return true,or false
148
+ """
149
+ intPtrDoc = None
150
+ GetDllLibPdf().PdfDocument_IsPasswordProtected.argtypes=[ c_void_p,c_wchar_p]
151
+ GetDllLibPdf().PdfDocument_IsPasswordProtected.restype=c_bool
152
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_IsPasswordProtected, intPtrDoc,fileName)
153
+ return ret
154
+
155
+ def HasExtendedRight(self)->bool:
156
+ """
157
+ Indicates whthere contains extended right.
158
+ """
159
+ GetDllLibPdf().PdfDocument_HasExtendedRight.argtypes=[c_void_p]
160
+ GetDllLibPdf().PdfDocument_HasExtendedRight.restype=c_bool
161
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_HasExtendedRight,self.Ptr)
162
+ return ret
163
+
164
+ def RemoveExtendedRight(self):
165
+ """
166
+ Removes the extended right.
167
+ """
168
+ GetDllLibPdf().PdfDocument_RemoveExtendedRight.argtypes=[c_void_p]
169
+ CallCFunction(GetDllLibPdf().PdfDocument_RemoveExtendedRight,self.Ptr)
170
+
171
+ @dispatch
172
+
173
+ def SaveToStream(self ,stream:Stream):
174
+ """
175
+ Save the document to the specified stream.
176
+
177
+ Args:
178
+ stream (Stream): The stream which default saved to the FileFormat.PDF format.
179
+ """
180
+ intPtrstream:c_void_p = stream.Ptr
181
+
182
+ GetDllLibPdf().PdfDocument_SaveToStream.argtypes=[c_void_p ,c_void_p]
183
+ CallCFunction(GetDllLibPdf().PdfDocument_SaveToStream,self.Ptr, intPtrstream)
184
+
185
+ # @dispatch
186
+ #
187
+ # def SaveToStream(self ,fileformat:FileFormat)->List[Stream]:
188
+ # """
189
+ # <summary>
190
+ # Convert the document to streams with the file format.
191
+ # </summary>
192
+ # <param name="fileformat">The file format.</param>
193
+ # <returns>
194
+ # The format file streams.
195
+ # FileFormat.PDF:return only one stream(PDF support paging).
196
+ # FileFormat.XPS:return only one stream(XPS support paging).
197
+ # FileFormat.DOC:return only one stream(DOC support paging).
198
+ # FileFormat.DOCX:return only one stream(DOCX support paging).
199
+ # FileFormat.XLSX:return only one stream(XLSX support paging).
200
+ # FileFormat.PCL:return only one stream(PCL support paging).
201
+ # FileFormat.POSTSCRIPT:return only one stream(POSTSCRIPT support paging).
202
+ # FileFormat.HTML:return only one stream(HTML support paging).
203
+ # FileFormat.SVG:return multiple streams(SVG not support paging,one stream to one page).
204
+ # </returns>
205
+ # """
206
+ # enumfileformat:c_int = fileformat.value
207
+ #
208
+ # GetDllLibPdf().PdfDocument_SaveToStreamF.argtypes=[c_void_p ,c_int]
209
+ # GetDllLibPdf().PdfDocument_SaveToStreamF.restype=IntPtrArray
210
+ # intPtrArray = CallCFunction(GetDllLibPdf().PdfDocument_SaveToStreamF,self.Ptr, enumfileformat)
211
+ # ret = GetObjVectorFromArray(intPtrArray, Stream)
212
+ # return ret
213
+
214
+
215
+ # @dispatch
216
+ #
217
+ # def SaveToStream(self ,startIndex:int,endIndex:int,fileformat:FileFormat)->List[Stream]:
218
+ # """
219
+ # <summary>
220
+ # Convert the document to streams with the file format.
221
+ # </summary>
222
+ # <param name="startIndex">The start index.</param>
223
+ # <param name="endIndex">The end index.</param>
224
+ # <param name="fileformat">The file format.</param>
225
+ # <returns>
226
+ # The format file streams.
227
+ # FileFormat.PDF:return only one stream(PDF support paging).
228
+ # FileFormat.XPS:return only one stream(XPS support paging).
229
+ # FileFormat.DOC:return only one stream(DOC support paging).
230
+ # FileFormat.DOCX:return only one stream(DOCX support paging).
231
+ # FileFormat.XLSX:return only one stream(XLSX support paging).
232
+ # FileFormat.PCL:return only one stream(PCL support paging).
233
+ # FileFormat.POSTSCRIPT:return only one stream(POSTSCRIPT support paging).
234
+ # FileFormat.HTML:return only one stream(HTML support paging).
235
+ # FileFormat.SVG:return multiple streams(SVG not support paging,one stream to one page).
236
+ # </returns>
237
+ # """
238
+ # enumfileformat:c_int = fileformat.value
239
+ #
240
+ # GetDllLibPdf().PdfDocument_SaveToStreamSEF.argtypes=[c_void_p ,c_int,c_int,c_int]
241
+ # GetDllLibPdf().PdfDocument_SaveToStreamSEF.restype=IntPtrArray
242
+ # intPtrArray = CallCFunction(GetDllLibPdf().PdfDocument_SaveToStreamSEF,self.Ptr, startIndex,endIndex,enumfileformat)
243
+ # ret = GetObjVectorFromArray(intPtrArray, Stream)
244
+ # return ret
245
+
246
+
247
+ @dispatch
248
+
249
+ def SaveToStream(self ,stream:Stream,fileformat:FileFormat):
250
+ """
251
+ Convert the document to an stream with the file format.
252
+
253
+ Args:
254
+ stream (Stream): The stream with the file format.
255
+ fileformat (FileFormat): The file format.FileFormat.SVG is not supported, because SVG file has no paging,so can't be saved to a stream.
256
+ """
257
+ intPtrstream:c_void_p = stream.Ptr
258
+ enumfileformat:c_int = fileformat.value
259
+
260
+ GetDllLibPdf().PdfDocument_SaveToStreamSF.argtypes=[c_void_p ,c_void_p,c_int]
261
+ CallCFunction(GetDllLibPdf().PdfDocument_SaveToStreamSF,self.Ptr, intPtrstream,enumfileformat)
262
+
263
+ @dispatch
264
+
265
+ def SaveToFile(self ,filename:str):
266
+ """
267
+ Saves PDF document to file.
268
+
269
+ Args:
270
+ filename (str): A relative or absolute path for the file.
271
+ """
272
+ GetDllLibPdf().PdfDocument_SaveToFile.argtypes=[c_void_p ,c_wchar_p]
273
+ CallCFunction(GetDllLibPdf().PdfDocument_SaveToFile,self.Ptr, filename)
274
+
275
+ @dispatch
276
+
277
+ def SaveToFile(self ,filename:str,fileFormat:FileFormat):
278
+ """
279
+ Saves PDF document to file.
280
+
281
+ Args:
282
+ filename (str): A relative or absolute path for the file.
283
+ fileFormat (FileFormat): File format for the file.
284
+ """
285
+ enumfileFormat:c_int = fileFormat.value
286
+
287
+ GetDllLibPdf().PdfDocument_SaveToFileFF.argtypes=[c_void_p ,c_wchar_p,c_int]
288
+ CallCFunction(GetDllLibPdf().PdfDocument_SaveToFileFF,self.Ptr, filename,enumfileFormat)
289
+
290
+ @dispatch
291
+
292
+ def SaveToFile(self ,filename:str,startIndex:int,endIndex:int,fileFormat:FileFormat):
293
+ """
294
+ Saves PDF document to PDF or other Format files.
295
+ Current only supports save PDF document to SVG and PDF
296
+
297
+ Args:
298
+ filename (str): A relative or absolute path for the file.
299
+ startIndex (int): The start page index.The index starts at 0.
300
+ endIndex (int): The end page index.
301
+ fileFormat (FileFormat): File format for the file.
302
+ """
303
+ enumfileFormat:c_int = fileFormat.value
304
+
305
+ GetDllLibPdf().PdfDocument_SaveToFileFSEF.argtypes=[c_void_p ,c_wchar_p,c_int,c_int,c_int]
306
+ CallCFunction(GetDllLibPdf().PdfDocument_SaveToFileFSEF,self.Ptr, filename,startIndex,endIndex,enumfileFormat)
307
+
308
+ @dispatch
309
+
310
+ def SaveAsImage(self ,pageIndex:int)->Stream:
311
+ """
312
+ Saves PDF document page as image
313
+
314
+ Args:
315
+ pageIndex (int): Page with page index to save as image.
316
+ Returns:
317
+ Stream: Returns page as Image.
318
+ """
319
+ GetDllLibPdf().PdfDocument_SaveAsImage.argtypes=[c_void_p ,c_int]
320
+ GetDllLibPdf().PdfDocument_SaveAsImage.restype=c_void_p
321
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_SaveAsImage,self.Ptr, pageIndex)
322
+ ret = None if intPtr==None else Stream(intPtr)
323
+ return ret
324
+
325
+
326
+ #@dispatch
327
+
328
+ #def SaveAsImage(self ,pageIndex:int,dpiX:int,dpiY:int)->Image:
329
+ # """
330
+ #<summary>
331
+ # Saves PDF document page as image,Set image Dpi
332
+ #</summary>
333
+ #<param name="pageIndex">Page with page index to save as image</param>
334
+ #<param name="dpiX">Pictures X resolution</param>
335
+ #<param name="dpiY">Pictures Y resolution</param>
336
+ #<returns>Returns page as Image</returns>
337
+ # """
338
+
339
+ # GetDllLibPdf().PdfDocument_SaveAsImagePDD.argtypes=[c_void_p ,c_int,c_int,c_int]
340
+ # GetDllLibPdf().PdfDocument_SaveAsImagePDD.restype=c_void_p
341
+ # intPtr = CallCFunction(GetDllLibPdf().PdfDocument_SaveAsImagePDD,self.Ptr, pageIndex,dpiX,dpiY)
342
+ # ret = None if intPtr==None else Image(intPtr)
343
+ # return ret
344
+
345
+
346
+ #@dispatch
347
+
348
+ #def SaveAsImage(self ,pageIndex:int,type:PdfImageType,dpiX:int,dpiY:int)->Image:
349
+ # """
350
+ #<summary>
351
+ # Saves PDF document page as image,Set PdfImageType and image Dpi
352
+ #</summary>
353
+ #<param name="pageIndex">Page index</param>
354
+ #<param name="type">PdfImageType type </param>
355
+ #<param name="dpiX">
356
+ # X resolution
357
+ #</param>
358
+ #<param name="dpiY">
359
+ # Y resolution
360
+ #</param>
361
+ #<returns>Returns page as Image</returns>
362
+ # """
363
+ # enumtype:c_int = type.value
364
+
365
+ # GetDllLibPdf().PdfDocument_SaveAsImagePTDD.argtypes=[c_void_p ,c_int,c_int,c_int,c_int]
366
+ # GetDllLibPdf().PdfDocument_SaveAsImagePTDD.restype=c_void_p
367
+ # intPtr = CallCFunction(GetDllLibPdf().PdfDocument_SaveAsImagePTDD,self.Ptr, pageIndex,enumtype,dpiX,dpiY)
368
+ # ret = None if intPtr==None else Image(intPtr)
369
+ # return ret
370
+
371
+
372
+ @dispatch
373
+
374
+ def SaveAsImage(self ,pageIndex:int,type:PdfImageType)->Stream:
375
+ """
376
+ Saves PDF document page as image
377
+
378
+ Args:
379
+ pageIndex (int): Page with page index to save as image.
380
+ type (PdfImageType): PdfImageType type.
381
+ Returns:
382
+ Stream: Returns page as Image.
383
+ """
384
+ enumtype:c_int = type.value
385
+
386
+ GetDllLibPdf().PdfDocument_SaveAsImagePT.argtypes=[c_void_p ,c_int,c_int]
387
+ GetDllLibPdf().PdfDocument_SaveAsImagePT.restype=c_void_p
388
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_SaveAsImagePT,self.Ptr, pageIndex,enumtype)
389
+ ret = None if intPtr==None else Stream(intPtr)
390
+ return ret
391
+
392
+
393
+
394
+ def Clone(self)->'SpireObject':
395
+ """
396
+ Creates a new object that is a copy of the current instance.
397
+ The resulting clone must be of the same type as or a compatible type to the original instance.
398
+ """
399
+ GetDllLibPdf().PdfDocument_Clone.argtypes=[c_void_p]
400
+ GetDllLibPdf().PdfDocument_Clone.restype=c_void_p
401
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_Clone,self.Ptr)
402
+ ret = None if intPtr==None else SpireObject(intPtr)
403
+ return ret
404
+
405
+ @dispatch
406
+ def Encrypt(self ,securityPolicy:PdfSecurityPolicy):
407
+ """
408
+ Encrypts the document.
409
+
410
+ Args:
411
+ securityPolicy : The security policy.
412
+ """
413
+ intPtrSec:c_void_p = securityPolicy.Ptr
414
+ GetDllLibPdf().PdfDocument_set_Encrypt.argtypes=[c_void_p, c_void_p]
415
+ CallCFunction(GetDllLibPdf().PdfDocument_set_Encrypt,self.Ptr, intPtrSec)
416
+
417
+ @dispatch
418
+ def Decrypt(self ,ownerPassword:str):
419
+ """
420
+ Decrypts the document.
421
+
422
+ Args:
423
+ ownerPassword : The ownerPassword.
424
+ """
425
+ GetDllLibPdf().PdfDocument_set_DecryptO.argtypes=[c_void_p, c_wchar_p]
426
+ CallCFunction(GetDllLibPdf().PdfDocument_set_DecryptO,self.Ptr, ownerPassword)
427
+
428
+ @dispatch
429
+ def Decrypt(self):
430
+ """
431
+ Decrypts the document.
432
+ """
433
+ GetDllLibPdf().PdfDocument_set_Decrypt.argtypes=[c_void_p]
434
+ CallCFunction(GetDllLibPdf().PdfDocument_set_Decrypt,self.Ptr)
435
+
436
+ @dispatch
437
+
438
+ def AppendPage(self ,PdfDocument):
439
+ """
440
+ Appends the specified loaded document to this one.
441
+
442
+ Args:
443
+ PdfDocument (PdfDocument): The loaded document..
444
+ """
445
+ intPtrdoc:c_void_p = PdfDocument.Ptr
446
+
447
+ GetDllLibPdf().PdfDocument_AppendPage.argtypes=[c_void_p ,c_void_p]
448
+ CallCFunction(GetDllLibPdf().PdfDocument_AppendPage,self.Ptr, intPtrdoc)
449
+
450
+ @dispatch
451
+
452
+ def AppendPage(self)->PdfPageBase:
453
+ """
454
+ Appends a new page to this one.
455
+
456
+ Returns:
457
+ PdfPageBase: The new page.
458
+ """
459
+ GetDllLibPdf().PdfDocument_AppendPage1.argtypes=[c_void_p]
460
+ GetDllLibPdf().PdfDocument_AppendPage1.restype=c_void_p
461
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_AppendPage1,self.Ptr)
462
+ ret = None if intPtr==None else PdfPageBase(intPtr)
463
+ return ret
464
+
465
+
466
+ @dispatch
467
+
468
+ def InsertPage(self ,PdfDocument,page:PdfPageBase)->PdfPageBase:
469
+ """
470
+ Imports a page.
471
+
472
+ Args:
473
+ ldDoc (PdfDocument): The loaded document.
474
+ page (PdfPageBase): The page.
475
+
476
+ Returns:
477
+ PdfPageBase: The page in the result document.
478
+ """
479
+ intPtrldDoc:c_void_p = PdfDocument.Ptr
480
+ intPtrpage:c_void_p = page.Ptr
481
+
482
+ GetDllLibPdf().PdfDocument_InsertPage.argtypes=[c_void_p ,c_void_p,c_void_p]
483
+ GetDllLibPdf().PdfDocument_InsertPage.restype=c_void_p
484
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_InsertPage,self.Ptr, intPtrldDoc,intPtrpage)
485
+ ret = None if intPtr==None else PdfPageBase(intPtr)
486
+ return ret
487
+
488
+
489
+ @dispatch
490
+
491
+ def InsertPage(self ,PdfDocument,pageIndex:int)->PdfPageBase:
492
+ """
493
+ Imports a page.
494
+
495
+ Args:
496
+ ldDoc (PdfDocument): The loaded document.
497
+ pageIndex (int): Index of the page.
498
+
499
+ Returns:
500
+ PdfPageBase: The page in the result document.
501
+ """
502
+ intPtrldDoc:c_void_p = PdfDocument.Ptr
503
+
504
+ GetDllLibPdf().PdfDocument_InsertPageLP.argtypes=[c_void_p ,c_void_p,c_int]
505
+ GetDllLibPdf().PdfDocument_InsertPageLP.restype=c_void_p
506
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_InsertPageLP,self.Ptr, intPtrldDoc,pageIndex)
507
+ ret = None if intPtr==None else PdfPageBase(intPtr)
508
+ return ret
509
+
510
+
511
+ @dispatch
512
+
513
+ def InsertPage(self ,PdfDocument,pageIndex:int,resultPageIndex:int)->PdfPageBase:
514
+ """
515
+ Imports a page.
516
+
517
+ Args:
518
+ ldDoc (PdfDocument): The loaded document.
519
+ pageIndex (int): Index of the page.
520
+ resultPageIndex (int): The page index in the result document.
521
+
522
+ Returns:
523
+ PdfPageBase: The page in the result document.
524
+ """
525
+ intPtrldDoc:c_void_p = PdfDocument.Ptr
526
+
527
+ GetDllLibPdf().PdfDocument_InsertPageLPR.argtypes=[c_void_p ,c_void_p,c_int,c_int]
528
+ GetDllLibPdf().PdfDocument_InsertPageLPR.restype=c_void_p
529
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_InsertPageLPR,self.Ptr, intPtrldDoc,pageIndex,resultPageIndex)
530
+ ret = None if intPtr==None else PdfPageBase(intPtr)
531
+ return ret
532
+
533
+
534
+
535
+ def InsertPageRange(self ,PdfDocument,startIndex:int,endIndex:int)->PdfPageBase:
536
+ """
537
+ Imports a page range from a loaded document.
538
+
539
+ Args:
540
+ ldDoc (PdfDocument): The loaded document.
541
+ startIndex (int): The start page index.
542
+ endIndex (int): The end page index.
543
+
544
+ Returns:
545
+ PdfPageBase: The last created page in the result document.
546
+ """
547
+ intPtrldDoc:c_void_p = PdfDocument.Ptr
548
+
549
+ GetDllLibPdf().PdfDocument_InsertPageRange.argtypes=[c_void_p ,c_void_p,c_int,c_int]
550
+ GetDllLibPdf().PdfDocument_InsertPageRange.restype=c_void_p
551
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_InsertPageRange,self.Ptr, intPtrldDoc,startIndex,endIndex)
552
+ ret = None if intPtr==None else PdfPageBase(intPtr)
553
+ return ret
554
+
555
+
556
+ @staticmethod
557
+
558
+ def Merge(dest:PdfDocumentBase,sourceDocuments:List['SpireObject'])->PdfDocumentBase:
559
+ """
560
+ Merges the specified source documents and return destination document.
561
+ ***It is recommended to use method "MergeFiles(string[] inputFiles, string outputFile)" or "MergeFiles(stream[] inputFiles, stream[] outputFile)",
562
+ which automatically release srcFiles and mergeFils resources after merging.***
563
+
564
+ Args:
565
+ dest (PdfDocumentBase): The destination document, where the other documents are merged into.If it's null a new document object will be created.
566
+ sourceDocuments (List['SpireObject']): The source documents.
567
+
568
+ Returns:
569
+ PdfDocumentBase: The document containing merged documents.
570
+ """
571
+ intPtrdest:c_void_p = dest.Ptr
572
+ #arraysourceDocuments:ArrayTypesourceDocuments = ""
573
+ countsourceDocuments = len(sourceDocuments)
574
+ ArrayTypesourceDocuments = c_void_p * countsourceDocuments
575
+ arraysourceDocuments = ArrayTypesourceDocuments()
576
+ for i in range(0, countsourceDocuments):
577
+ arraysourceDocuments[i] = sourceDocuments[i].Ptr
578
+
579
+
580
+ GetDllLibPdf().PdfDocument_Merge.argtypes=[ c_void_p,ArrayTypesourceDocuments]
581
+ GetDllLibPdf().PdfDocument_Merge.restype=c_void_p
582
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_Merge, intPtrdest,arraysourceDocuments)
583
+ ret = None if intPtr==None else PdfDocumentBase(intPtr)
584
+ return ret
585
+
586
+
587
+ @staticmethod
588
+ @dispatch
589
+
590
+ def MergeFiles(inputFiles:List[str])->PdfDocumentBase:
591
+ """
592
+ Merges the PDF documents specified by the paths.
593
+ ***It is recommended to use method "MergeFiles(string[] inputFiles, string outputFile)" or "MergeFiles(stream[] inputFiles, stream[] outputFile)",
594
+ which automatically release srcFiles and mergeFils resources after merging.***
595
+
596
+ Args:
597
+ inputFiles (List[str]): The array of string paths.
598
+
599
+ Returns:
600
+ PdfDocumentBase: A new PDF document containing all merged documents.
601
+ """
602
+ #arrayinputFiles:ArrayTypeinputFiles = ""
603
+ countinputFiles = len(inputFiles)
604
+ ArrayTypeinputFiles = c_wchar_p * countinputFiles
605
+ arrayinputFiles = ArrayTypeinputFiles()
606
+ for i in range(0, countinputFiles):
607
+ arrayinputFiles[i] = inputFiles[i]
608
+
609
+
610
+ GetDllLibPdf().PdfDocument_MergeFiles.argtypes=[c_void_p, ArrayTypeinputFiles,c_int]
611
+ GetDllLibPdf().PdfDocument_MergeFiles.restype=c_void_p
612
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_MergeFiles,None, arrayinputFiles,len(inputFiles))
613
+ ret = None if intPtr==None else PdfDocumentBase(intPtr)
614
+ return ret
615
+
616
+
617
+ @staticmethod
618
+ @dispatch
619
+
620
+ def MergeFiles(streams:List[Stream])->PdfDocumentBase:
621
+ """
622
+ Merges the PDF documents specified by the Stream.
623
+ ***It is recommended to use method "MergeFiles(string[] inputFiles, string outputFile)" or "MergeFiles(stream[] inputFiles, stream[] outputFile)",
624
+ which automatically release srcFiles and mergeFils resources after merging.***
625
+
626
+ Args:
627
+ streams (List[Stream]): The array of Stream.
628
+
629
+ Returns:
630
+ PdfDocumentBase: A new PDF document containing all merged documents.
631
+ """
632
+ #arraystreams:ArrayTypestreams = ""
633
+ countstreams = len(streams)
634
+ ArrayTypestreams = c_void_p * countstreams
635
+ arraystreams = ArrayTypestreams()
636
+ for i in range(0, countstreams):
637
+ arraystreams[i] = streams[i].Ptr
638
+
639
+
640
+ GetDllLibPdf().PdfDocument_MergeFilesS.argtypes=[c_void_p, ArrayTypestreams,c_int]
641
+ GetDllLibPdf().PdfDocument_MergeFilesS.restype=c_void_p
642
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_MergeFilesS,None, arraystreams,countstreams)
643
+ ret = None if intPtr==None else PdfDocumentBase(intPtr)
644
+ return ret
645
+ #
646
+
647
+
648
+ #@staticmethod
649
+ #@dispatch
650
+
651
+ #def MergeFiles(firstInputFile:str,secInputFile:str)->PdfDocumentBase:
652
+ # """
653
+ #<summary>
654
+ # Merges the PDF documents specified by the paths.
655
+ #</summary>
656
+ #<param name="firstInputFile"></param>
657
+ #<param name="secInputFile"></param>
658
+ #<returns>A new PDF document containing all merged documents.</returns>
659
+ # """
660
+
661
+ # GetDllLibPdf().PdfDocument_MergeFilesFS.argtypes=[ c_wchar_p,c_wchar_p]
662
+ # GetDllLibPdf().PdfDocument_MergeFilesFS.restype=c_void_p
663
+ # intPtr = CallCFunction(GetDllLibPdf().PdfDocument_MergeFilesFS, firstInputFile,secInputFile)
664
+ # ret = None if intPtr==None else PdfDocumentBase(intPtr)
665
+ # return ret
666
+
667
+
668
+ @staticmethod
669
+ @dispatch
670
+
671
+ def MergeFiles(inputFiles:List[str],outputFile:str):
672
+ """
673
+ Merge the PDF documents.
674
+
675
+ Args:
676
+ inputFiles (List[str]): The input PDF documents.
677
+ outputFile (str): The output PDF documents.
678
+ """
679
+ #arrayinputFiles:ArrayTypeinputFiles = ""
680
+ countinputFiles = len(inputFiles)
681
+ ArrayTypeinputFiles = c_wchar_p * countinputFiles
682
+ arrayinputFiles = ArrayTypeinputFiles()
683
+ for i in range(0, countinputFiles):
684
+ arrayinputFiles[i] = inputFiles[i]
685
+
686
+
687
+ GetDllLibPdf().PdfDocument_MergeFilesIO.argtypes=[ ArrayTypeinputFiles,c_int,c_wchar_p]
688
+ CallCFunction(GetDllLibPdf().PdfDocument_MergeFilesIO, arrayinputFiles,countinputFiles,outputFile)
689
+
690
+ # @staticmethod
691
+ # @dispatch
692
+ #
693
+ # def MergeFiles(inputFiles:'Stream[]',outputFile:Stream):
694
+ # """
695
+ # <summary>
696
+ # Merge the PDF documents.
697
+ # </summary>
698
+ # <param name="inputFiles">The input PDF documents.</param>
699
+ # <param name="outputFile">The output PDF document.</param>
700
+ # """
701
+ # #arrayinputFiles:ArrayTypeinputFiles = ""
702
+ # countinputFiles = len(inputFiles)
703
+ # ArrayTypeinputFiles = c_void_p * countinputFiles
704
+ # arrayinputFiles = ArrayTypeinputFiles()
705
+ # for i in range(0, countinputFiles):
706
+ # arrayinputFiles[i] = inputFiles[i].Ptr
707
+ #
708
+ # intPtroutputFile:c_void_p = outputFile.Ptr
709
+ #
710
+ # GetDllLibPdf().PdfDocument_MergeFilesIO1.argtypes=[ ArrayTypeinputFiles,c_void_p]
711
+ # CallCFunction(GetDllLibPdf().PdfDocument_MergeFilesIO1, arrayinputFiles,intPtroutputFile)
712
+
713
+
714
+ @dispatch
715
+
716
+ def Split(self ,destFilePattern:str):
717
+ """
718
+ Splits a PDF file to many PDF files, each of them consists of one page from the source file.
719
+ Each destination file will have 'destFileName{0***}' name,
720
+ where *** is an optional format string for the number of the
721
+ page inside of the source document.
722
+
723
+ Args:
724
+ destFilePattern (str): Template for destination file names.
725
+ """
726
+
727
+ GetDllLibPdf().PdfDocument_Split.argtypes=[c_void_p ,c_wchar_p]
728
+ CallCFunction(GetDllLibPdf().PdfDocument_Split,self.Ptr, destFilePattern)
729
+
730
+ @dispatch
731
+
732
+ def Split(self ,destFilePattern:str,startNumber:int):
733
+ """
734
+ Splits a PDF file to many PDF files, each of them consists of
735
+ one page from the source file.
736
+
737
+ Args:
738
+ destFilePattern (str): Template for destination file names.
739
+ startNumber (int): The number that is use as a start point for the page numbering.
740
+ """
741
+ GetDllLibPdf().PdfDocument_SplitDS.argtypes=[c_void_p ,c_wchar_p,c_int]
742
+ CallCFunction(GetDllLibPdf().PdfDocument_SplitDS,self.Ptr, destFilePattern,startNumber)
743
+
744
+ def RemoveDocumentJavaScript(self)->bool:
745
+ """
746
+ remove document's javaScript
747
+
748
+ Returns:
749
+ bool: if True remove succesfully,else remove the failure or document doesn't have JavaScript
750
+ """
751
+ GetDllLibPdf().PdfDocument_RemoveDocumentJavaScript.argtypes=[c_void_p]
752
+ GetDllLibPdf().PdfDocument_RemoveDocumentJavaScript.restype=c_bool
753
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_RemoveDocumentJavaScript,self.Ptr)
754
+ return ret
755
+
756
+ #
757
+ # def Preview(self ,printPreviewControl:'PrintPreviewControl'):
758
+ # """
759
+ # <summary>
760
+ # Print preview.
761
+ # </summary>
762
+ # <param name="printPreviewControl">Print preview control</param>
763
+ # """
764
+ # intPtrprintPreviewControl:c_void_p = printPreviewControl.Ptr
765
+ #
766
+ # GetDllLibPdf().PdfDocument_Preview.argtypes=[c_void_p ,c_void_p]
767
+ # CallCFunction(GetDllLibPdf().PdfDocument_Preview,self.Ptr, intPtrprintPreviewControl)
768
+
769
+
770
+ #@dispatch
771
+
772
+ #def Print(self ,printSettings:'PdfPrintSettings'):
773
+ # """
774
+ #<summary>
775
+ # Print document.
776
+ #</summary>
777
+ #<param name="printSettings">The print settings.</param>
778
+ # """
779
+ # intPtrprintSettings:c_void_p = printSettings.Ptr
780
+
781
+ # GetDllLibPdf().PdfDocument_Print.argtypes=[c_void_p ,c_void_p]
782
+ # CallCFunction(GetDllLibPdf().PdfDocument_Print,self.Ptr, intPtrprintSettings)
783
+
784
+ #@property
785
+
786
+ #def PrintSettings(self)->'PdfPrintSettings':
787
+ # """
788
+ #<summary>
789
+ # Get the print settings.
790
+ #</summary>
791
+ # """
792
+ # GetDllLibPdf().PdfDocument_get_PrintSettings.argtypes=[c_void_p]
793
+ # GetDllLibPdf().PdfDocument_get_PrintSettings.restype=c_void_p
794
+ # intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_PrintSettings,self.Ptr)
795
+ # ret = None if intPtr==None else PdfPrintSettings(intPtr)
796
+ # return ret
797
+
798
+
799
+ #@dispatch
800
+ #def Print(self):
801
+ # """
802
+ #<summary>
803
+ # Print document.
804
+ #</summary>
805
+ # """
806
+ # GetDllLibPdf().PdfDocument_Print1.argtypes=[c_void_p]
807
+ # CallCFunction(GetDllLibPdf().PdfDocument_Print1,self.Ptr)
808
+
809
+ def Close(self):
810
+ """
811
+ Closes the document.
812
+ The document is disposed after calling the Close method. So, the document can not be saved if Close method was invoked.
813
+ """
814
+ GetDllLibPdf().PdfDocument_Close.argtypes=[c_void_p]
815
+ CallCFunction(GetDllLibPdf().PdfDocument_Close,self.Ptr)
816
+
817
+ def Dispose(self):
818
+ """
819
+ Releases unmanaged resources and performs other cleanup operations before the
820
+ is reclaimed by garbage collection.
821
+ """
822
+ GetDllLibPdf().PdfDocument_Dispose.argtypes=[c_void_p]
823
+ CallCFunction(GetDllLibPdf().PdfDocument_Dispose,self.Ptr)
824
+
825
+ @staticmethod
826
+
827
+ def SetCustomFontsFolders(fontPath:str):
828
+ """
829
+ Set the path to the folder where the custom font is located.
830
+
831
+ Args:
832
+ fontPath (str): the folder path.
833
+ """
834
+ GetDllLibPdf().PdfDocument_SetCustomFontsFolders.argtypes=[ c_wchar_p]
835
+ CallCFunction(GetDllLibPdf().PdfDocument_SetCustomFontsFolders, fontPath)
836
+
837
+ @staticmethod
838
+ def ClearCustomFontsFolders():
839
+ """
840
+ Clear the path of the folder where the custom font is located.
841
+ """
842
+ #GetDllLibPdf().PdfDocument_ClearCustomFontsFolders.argtypes=[]
843
+ CallCFunction(GetDllLibPdf().PdfDocument_ClearCustomFontsFolders)
844
+
845
+ @property
846
+ def UseHighQualityImage(self)->bool:
847
+ """
848
+ Indicates whether to use the high qulity image when convert document
849
+ """
850
+ GetDllLibPdf().PdfDocument_get_UseHighQualityImage.argtypes=[c_void_p]
851
+ GetDllLibPdf().PdfDocument_get_UseHighQualityImage.restype=c_bool
852
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_UseHighQualityImage,self.Ptr)
853
+ return ret
854
+
855
+ @UseHighQualityImage.setter
856
+ def UseHighQualityImage(self, value:bool):
857
+ GetDllLibPdf().PdfDocument_set_UseHighQualityImage.argtypes=[c_void_p, c_bool]
858
+ CallCFunction(GetDllLibPdf().PdfDocument_set_UseHighQualityImage,self.Ptr, value)
859
+
860
+ @property
861
+
862
+ def SetPdfToHtmlParameter(self)->'PdfToHtmlParameter':
863
+ """
864
+
865
+ """
866
+ GetDllLibPdf().PdfDocument_get_SetPdfToHtmlParameter.argtypes=[c_void_p]
867
+ GetDllLibPdf().PdfDocument_get_SetPdfToHtmlParameter.restype=c_void_p
868
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_SetPdfToHtmlParameter,self.Ptr)
869
+ ret = None if intPtr==None else PdfToHtmlParameter(intPtr)
870
+ return ret
871
+
872
+
873
+ @SetPdfToHtmlParameter.setter
874
+ def SetPdfToHtmlParameter(self, value:'PdfToHtmlParameter'):
875
+ GetDllLibPdf().PdfDocument_set_SetPdfToHtmlParameter.argtypes=[c_void_p, c_void_p]
876
+ CallCFunction(GetDllLibPdf().PdfDocument_set_SetPdfToHtmlParameter,self.Ptr, value.Ptr)
877
+
878
+ @property
879
+ def AllowCreateForm(self)->bool:
880
+ """
881
+ Get or Set Allow Create Form.
882
+ """
883
+ GetDllLibPdf().PdfDocument_get_AllowCreateForm.argtypes=[c_void_p]
884
+ GetDllLibPdf().PdfDocument_get_AllowCreateForm.restype=c_bool
885
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_AllowCreateForm,self.Ptr)
886
+ return ret
887
+
888
+ @AllowCreateForm.setter
889
+ def AllowCreateForm(self, value:bool):
890
+ GetDllLibPdf().PdfDocument_set_AllowCreateForm.argtypes=[c_void_p, c_bool]
891
+ CallCFunction(GetDllLibPdf().PdfDocument_set_AllowCreateForm,self.Ptr, value)
892
+
893
+ @property
894
+ def UsePsDirectlyForConvert(self)->bool:
895
+ """
896
+
897
+ """
898
+ GetDllLibPdf().PdfDocument_get_UsePsDirectlyForConvert.argtypes=[c_void_p]
899
+ GetDllLibPdf().PdfDocument_get_UsePsDirectlyForConvert.restype=c_bool
900
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_UsePsDirectlyForConvert,self.Ptr)
901
+ return ret
902
+
903
+ @UsePsDirectlyForConvert.setter
904
+ def UsePsDirectlyForConvert(self, value:bool):
905
+ GetDllLibPdf().PdfDocument_set_UsePsDirectlyForConvert.argtypes=[c_void_p, c_bool]
906
+ CallCFunction(GetDllLibPdf().PdfDocument_set_UsePsDirectlyForConvert,self.Ptr, value)
907
+
908
+ @property
909
+ def UseInvariantCulture(self)->bool:
910
+ """
911
+ Indicates whether use invariant culture mode to convert pdf document.
912
+ """
913
+ GetDllLibPdf().PdfDocument_get_UseInvariantCulture.argtypes=[c_void_p]
914
+ GetDllLibPdf().PdfDocument_get_UseInvariantCulture.restype=c_bool
915
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_UseInvariantCulture,self.Ptr)
916
+ return ret
917
+
918
+ @UseInvariantCulture.setter
919
+ def UseInvariantCulture(self, value:bool):
920
+ GetDllLibPdf().PdfDocument_set_UseInvariantCulture.argtypes=[c_void_p, c_bool]
921
+ CallCFunction(GetDllLibPdf().PdfDocument_set_UseInvariantCulture,self.Ptr, value)
922
+
923
+ @property
924
+
925
+ def ConvertOptions(self)->'PdfConvertOptions':
926
+ """
927
+ Set some options when do convert operation.
928
+ """
929
+ GetDllLibPdf().PdfDocument_get_ConvertOptions.argtypes=[c_void_p]
930
+ GetDllLibPdf().PdfDocument_get_ConvertOptions.restype=c_void_p
931
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_ConvertOptions,self.Ptr)
932
+ ret = None if intPtr==None else PdfConvertOptions(intPtr)
933
+ return ret
934
+
935
+
936
+ @property
937
+
938
+ def PDFStandard(self)->'PdfDocumentBase':
939
+ """
940
+ Set,Get Current active pdf object
941
+ """
942
+ GetDllLibPdf().PdfDocument_get_PDFStandard.argtypes=[c_void_p]
943
+ GetDllLibPdf().PdfDocument_get_PDFStandard.restype=c_void_p
944
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_PDFStandard,self.Ptr)
945
+ ret = None if intPtr==None else PdfDocumentBase(intPtr)
946
+ return ret
947
+
948
+
949
+ @PDFStandard.setter
950
+ def PDFStandard(self, value:'PdfDocumentBase'):
951
+ GetDllLibPdf().PdfDocument_set_PDFStandard.argtypes=[c_void_p, c_void_p]
952
+ CallCFunction(GetDllLibPdf().PdfDocument_set_PDFStandard,self.Ptr, value.Ptr)
953
+
954
+ @property
955
+
956
+ def Conformance(self)->'PdfConformanceLevel':
957
+ """
958
+ Get document PdfConformanceLevel
959
+ """
960
+ GetDllLibPdf().PdfDocument_get_Conformance.argtypes=[c_void_p]
961
+ GetDllLibPdf().PdfDocument_get_Conformance.restype=c_int
962
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_Conformance,self.Ptr)
963
+ objwraped = PdfConformanceLevel(ret)
964
+ return objwraped
965
+
966
+ @property
967
+
968
+ def Attachments(self)->PdfAttachmentCollection:
969
+ """
970
+ Gets the collection of document attachments displayed on a PDF page.
971
+ """
972
+ GetDllLibPdf().PdfDocument_get_Attachments.argtypes=[c_void_p]
973
+ GetDllLibPdf().PdfDocument_get_Attachments.restype=c_void_p
974
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Attachments,self.Ptr)
975
+ ret = None if intPtr==None else PdfAttachmentCollection(intPtr)
976
+ return ret
977
+
978
+
979
+
980
+
981
+
982
+ @property
983
+
984
+ def ColorSpace(self)->'PdfColorSpace':
985
+ """
986
+ Gets or sets the color space for page that will be created.
987
+ """
988
+ GetDllLibPdf().PdfDocument_get_ColorSpace.argtypes=[c_void_p]
989
+ GetDllLibPdf().PdfDocument_get_ColorSpace.restype=c_int
990
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_ColorSpace,self.Ptr)
991
+ objwraped = PdfColorSpace(ret)
992
+ return objwraped
993
+
994
+ @ColorSpace.setter
995
+ def ColorSpace(self, value:'PdfColorSpace'):
996
+ GetDllLibPdf().PdfDocument_set_ColorSpace.argtypes=[c_void_p, c_int]
997
+ CallCFunction(GetDllLibPdf().PdfDocument_set_ColorSpace,self.Ptr, value.value)
998
+
999
+ @property
1000
+
1001
+ def DocumentInformation(self)->'PdfDocumentInformation':
1002
+ """
1003
+ Gets or sets document's information and properties.
1004
+ """
1005
+ GetDllLibPdf().PdfDocument_get_DocumentInformation.argtypes=[c_void_p]
1006
+ GetDllLibPdf().PdfDocument_get_DocumentInformation.restype=c_void_p
1007
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_DocumentInformation,self.Ptr)
1008
+ ret = None if intPtr==None else PdfDocumentInformation(intPtr)
1009
+ return ret
1010
+
1011
+
1012
+ @property
1013
+
1014
+ def JavaScripts(self)->'PdfDocumentActions':
1015
+ """
1016
+ Gets the additional document's actions.
1017
+ """
1018
+ GetDllLibPdf().PdfDocument_get_JavaScripts.argtypes=[c_void_p]
1019
+ GetDllLibPdf().PdfDocument_get_JavaScripts.restype=c_void_p
1020
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_JavaScripts,self.Ptr)
1021
+ ret = None if intPtr==None else PdfDocumentActions(intPtr)
1022
+ return ret
1023
+
1024
+
1025
+ @property
1026
+
1027
+ def Form(self)->'PdfForm':
1028
+ """
1029
+ Gets the loaded form.
1030
+ """
1031
+ GetDllLibPdf().PdfDocument_get_Form.argtypes=[c_void_p]
1032
+ GetDllLibPdf().PdfDocument_get_Form.restype=c_void_p
1033
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Form,self.Ptr)
1034
+ ret = None if intPtr==None else PdfForm(intPtr)
1035
+ return ret
1036
+
1037
+
1038
+ @property
1039
+
1040
+ def PageLabels(self)->'PdfPageLabels':
1041
+ """
1042
+ Page labels.
1043
+ """
1044
+ GetDllLibPdf().PdfDocument_get_PageLabels.argtypes=[c_void_p]
1045
+ GetDllLibPdf().PdfDocument_get_PageLabels.restype=c_void_p
1046
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_PageLabels,self.Ptr)
1047
+ ret = None if intPtr==None else PdfPageLabels(intPtr)
1048
+ return ret
1049
+
1050
+
1051
+ @PageLabels.setter
1052
+ def PageLabels(self, value:'PdfPageLabels'):
1053
+ GetDllLibPdf().PdfDocument_set_PageLabels.argtypes=[c_void_p, c_void_p]
1054
+ CallCFunction(GetDllLibPdf().PdfDocument_set_PageLabels,self.Ptr, value.Ptr)
1055
+
1056
+ @property
1057
+
1058
+ def DocumentPieceInfo(self)->'PdfPieceInfo':
1059
+ """
1060
+ Gets or set the document piece info.
1061
+ """
1062
+ GetDllLibPdf().PdfDocument_get_DocumentPieceInfo.argtypes=[c_void_p]
1063
+ GetDllLibPdf().PdfDocument_get_DocumentPieceInfo.restype=c_void_p
1064
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_DocumentPieceInfo,self.Ptr)
1065
+ ret = None if intPtr==None else PdfPieceInfo(intPtr)
1066
+ return ret
1067
+
1068
+
1069
+ @DocumentPieceInfo.setter
1070
+ def DocumentPieceInfo(self, value:'PdfPieceInfo'):
1071
+ GetDllLibPdf().PdfDocument_set_DocumentPieceInfo.argtypes=[c_void_p, c_void_p]
1072
+ CallCFunction(GetDllLibPdf().PdfDocument_set_DocumentPieceInfo,self.Ptr, value.Ptr)
1073
+
1074
+ @property
1075
+
1076
+ def Pages(self)->PdfPageCollection:
1077
+ """
1078
+ Gets the pages.
1079
+ """
1080
+ GetDllLibPdf().PdfDocument_get_Pages.argtypes=[c_void_p]
1081
+ GetDllLibPdf().PdfDocument_get_Pages.restype=c_void_p
1082
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Pages,self.Ptr)
1083
+ ret = None if intPtr==None else PdfPageCollection(intPtr)
1084
+ return ret
1085
+
1086
+
1087
+ @property
1088
+
1089
+ def UsedFonts(self)->List['PdfUsedFont']:
1090
+ """
1091
+ Gets the fonts which are available in the PDF document.
1092
+
1093
+ Returns:
1094
+ List[PdfUsedFont]: Retruns the fonts which are used in the PDF document.
1095
+ """
1096
+ GetDllLibPdf().PdfDocument_get_UsedFonts.argtypes=[c_void_p]
1097
+ GetDllLibPdf().PdfDocument_get_UsedFonts.restype=IntPtrArray
1098
+ intPtrArray = CallCFunction(GetDllLibPdf().PdfDocument_get_UsedFonts,self.Ptr)
1099
+ ret = GetObjVectorFromArray(intPtrArray, PdfUsedFont)
1100
+ return ret
1101
+
1102
+
1103
+ @property
1104
+
1105
+ def CompressionLevel(self)->'PdfCompressionLevel':
1106
+ """
1107
+ Gets or sets the desired level of stream compression.
1108
+ All new objects should be compressed with this level of the compression.
1109
+ """
1110
+ GetDllLibPdf().PdfDocument_get_CompressionLevel.argtypes=[c_void_p]
1111
+ GetDllLibPdf().PdfDocument_get_CompressionLevel.restype=c_int
1112
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_CompressionLevel,self.Ptr)
1113
+ objwraped = PdfCompressionLevel(ret)
1114
+ return objwraped
1115
+
1116
+ @CompressionLevel.setter
1117
+ def CompressionLevel(self, value:'PdfCompressionLevel'):
1118
+ GetDllLibPdf().PdfDocument_set_CompressionLevel.argtypes=[c_void_p, c_int]
1119
+ CallCFunction(GetDllLibPdf().PdfDocument_set_CompressionLevel,self.Ptr, value.value)
1120
+
1121
+ @property
1122
+
1123
+ def PageSettings(self)->'PdfPageSettings':
1124
+ """
1125
+
1126
+ """
1127
+ GetDllLibPdf().PdfDocument_get_PageSettings.argtypes=[c_void_p]
1128
+ GetDllLibPdf().PdfDocument_get_PageSettings.restype=c_void_p
1129
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_PageSettings,self.Ptr)
1130
+ ret = None if intPtr==None else PdfPageSettings(intPtr)
1131
+ return ret
1132
+
1133
+
1134
+ @PageSettings.setter
1135
+ def PageSettings(self, value:'PdfPageSettings'):
1136
+ GetDllLibPdf().PdfDocument_set_PageSettings.argtypes=[c_void_p, c_void_p]
1137
+ CallCFunction(GetDllLibPdf().PdfDocument_set_PageSettings,self.Ptr, value.Ptr)
1138
+
1139
+ @property
1140
+
1141
+ def Sections(self)->'PdfSectionCollection':
1142
+ """
1143
+
1144
+ """
1145
+ GetDllLibPdf().PdfDocument_get_Sections.argtypes=[c_void_p]
1146
+ GetDllLibPdf().PdfDocument_get_Sections.restype=c_void_p
1147
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Sections,self.Ptr)
1148
+ ret = None if intPtr==None else PdfSectionCollection(intPtr)
1149
+ return ret
1150
+
1151
+
1152
+ @property
1153
+
1154
+ def FileInfo(self)->'PdfFileInfo':
1155
+ """
1156
+
1157
+ """
1158
+ GetDllLibPdf().PdfDocument_get_FileInfo.argtypes=[c_void_p]
1159
+ GetDllLibPdf().PdfDocument_get_FileInfo.restype=c_void_p
1160
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_FileInfo,self.Ptr)
1161
+ ret = None if intPtr==None else PdfFileInfo(intPtr)
1162
+ return ret
1163
+
1164
+
1165
+ @FileInfo.setter
1166
+ def FileInfo(self, value:'PdfFileInfo'):
1167
+ GetDllLibPdf().PdfDocument_set_FileInfo.argtypes=[c_void_p, c_void_p]
1168
+ CallCFunction(GetDllLibPdf().PdfDocument_set_FileInfo,self.Ptr, value.Ptr)
1169
+
1170
+ @property
1171
+
1172
+ def Security(self)->'PdfSecurity':
1173
+ """
1174
+ Gets the security parameters of the document.
1175
+ """
1176
+ GetDllLibPdf().PdfDocument_get_Security.argtypes=[c_void_p]
1177
+ GetDllLibPdf().PdfDocument_get_Security.restype=c_void_p
1178
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Security,self.Ptr)
1179
+ ret = None if intPtr==None else PdfSecurity(intPtr)
1180
+ return ret
1181
+
1182
+
1183
+ @property
1184
+
1185
+ def ViewerPreferences(self)->'PdfViewerPreferences':
1186
+ """
1187
+ Gets or sets a viewer preferences object controlling the way the document is to be
1188
+ presented on the screen or in print.
1189
+ """
1190
+ GetDllLibPdf().PdfDocument_get_ViewerPreferences.argtypes=[c_void_p]
1191
+ GetDllLibPdf().PdfDocument_get_ViewerPreferences.restype=c_void_p
1192
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_ViewerPreferences,self.Ptr)
1193
+ ret = None if intPtr==None else PdfViewerPreferences(intPtr)
1194
+ return ret
1195
+
1196
+
1197
+ @ViewerPreferences.setter
1198
+ def ViewerPreferences(self, value:'PdfViewerPreferences'):
1199
+ GetDllLibPdf().PdfDocument_set_ViewerPreferences.argtypes=[c_void_p, c_void_p]
1200
+ CallCFunction(GetDllLibPdf().PdfDocument_set_ViewerPreferences,self.Ptr, value.Ptr)
1201
+
1202
+ @property
1203
+
1204
+ def AfterOpenAction(self)->'PdfGoToAction':
1205
+ """
1206
+ Gets or sets the action to execute when the document is opened.
1207
+ """
1208
+ GetDllLibPdf().PdfDocument_get_AfterOpenAction.argtypes=[c_void_p]
1209
+ GetDllLibPdf().PdfDocument_get_AfterOpenAction.restype=c_void_p
1210
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_AfterOpenAction,self.Ptr)
1211
+ ret = None if intPtr==None else PdfGoToAction(PdfDestination(intPtr))
1212
+ return ret
1213
+
1214
+
1215
+ @AfterOpenAction.setter
1216
+ def AfterOpenAction(self, value:PdfAction):
1217
+ if value is None :
1218
+ GetDllLibPdf().PdfDocument_set_AfterOpenActionN.argtypes=[c_void_p]
1219
+ CallCFunction(GetDllLibPdf().PdfDocument_set_AfterOpenActionN,self.Ptr)
1220
+ else :
1221
+ GetDllLibPdf().PdfDocument_set_AfterOpenAction.argtypes=[c_void_p, c_void_p]
1222
+ CallCFunction(GetDllLibPdf().PdfDocument_set_AfterOpenAction,self.Ptr, value.Ptr)
1223
+
1224
+ @property
1225
+
1226
+ def AfterPrintAction(self)->'PdfJavaScriptAction':
1227
+ """
1228
+ Gets or sets the action to be performed after the document is printed.
1229
+ A object specifying the action to be executed after the document is printed.
1230
+ """
1231
+ GetDllLibPdf().PdfDocument_get_AfterPrintAction.argtypes=[c_void_p]
1232
+ GetDllLibPdf().PdfDocument_get_AfterPrintAction.restype=c_void_p
1233
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_AfterPrintAction,self.Ptr)
1234
+ ret = None if intPtr==None else PdfJavaScriptAction(intPtr)
1235
+ return ret
1236
+
1237
+
1238
+ @AfterPrintAction.setter
1239
+ def AfterPrintAction(self, value:'PdfJavaScriptAction'):
1240
+ GetDllLibPdf().PdfDocument_set_AfterPrintAction.argtypes=[c_void_p, c_void_p]
1241
+ CallCFunction(GetDllLibPdf().PdfDocument_set_AfterPrintAction,self.Ptr, value.Ptr)
1242
+
1243
+ @property
1244
+
1245
+ def AfterSaveAction(self)->'PdfJavaScriptAction':
1246
+ """
1247
+ Gets or sets the jave script action to be performed after the document is saved.
1248
+ A object specifying the action to be executed after the document is saved.
1249
+ """
1250
+ GetDllLibPdf().PdfDocument_get_AfterSaveAction.argtypes=[c_void_p]
1251
+ GetDllLibPdf().PdfDocument_get_AfterSaveAction.restype=c_void_p
1252
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_AfterSaveAction,self.Ptr)
1253
+ ret = None if intPtr==None else PdfJavaScriptAction(intPtr)
1254
+ return ret
1255
+
1256
+
1257
+ @AfterSaveAction.setter
1258
+ def AfterSaveAction(self, value:'PdfJavaScriptAction'):
1259
+ GetDllLibPdf().PdfDocument_set_AfterSaveAction.argtypes=[c_void_p, c_void_p]
1260
+ CallCFunction(GetDllLibPdf().PdfDocument_set_AfterSaveAction,self.Ptr, value.Ptr)
1261
+
1262
+ @property
1263
+
1264
+ def BeforeCloseAction(self)->'PdfJavaScriptAction':
1265
+ """
1266
+ Gets or sets the action to be performed before the document is closed.
1267
+ A object specifying the action to be executed before the document is closed.
1268
+ """
1269
+ GetDllLibPdf().PdfDocument_get_BeforeCloseAction.argtypes=[c_void_p]
1270
+ GetDllLibPdf().PdfDocument_get_BeforeCloseAction.restype=c_void_p
1271
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_BeforeCloseAction,self.Ptr)
1272
+ ret = None if intPtr==None else PdfJavaScriptAction(intPtr)
1273
+ return ret
1274
+
1275
+
1276
+ @BeforeCloseAction.setter
1277
+ def BeforeCloseAction(self, value:'PdfJavaScriptAction'):
1278
+ GetDllLibPdf().PdfDocument_set_BeforeCloseAction.argtypes=[c_void_p, c_void_p]
1279
+ CallCFunction(GetDllLibPdf().PdfDocument_set_BeforeCloseAction,self.Ptr, value.Ptr)
1280
+
1281
+ @property
1282
+
1283
+ def BeforePrintAction(self)->'PdfJavaScriptAction':
1284
+ """
1285
+ Gets or sets the action to be performed before the document is printed.
1286
+ A object specifying the action to be executed before the document is printed.
1287
+ """
1288
+ GetDllLibPdf().PdfDocument_get_BeforePrintAction.argtypes=[c_void_p]
1289
+ GetDllLibPdf().PdfDocument_get_BeforePrintAction.restype=c_void_p
1290
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_BeforePrintAction,self.Ptr)
1291
+ ret = None if intPtr==None else PdfJavaScriptAction(intPtr)
1292
+ return ret
1293
+
1294
+
1295
+ @BeforePrintAction.setter
1296
+ def BeforePrintAction(self, value:'PdfJavaScriptAction'):
1297
+ GetDllLibPdf().PdfDocument_set_BeforePrintAction.argtypes=[c_void_p, c_void_p]
1298
+ CallCFunction(GetDllLibPdf().PdfDocument_set_BeforePrintAction,self.Ptr, value.Ptr)
1299
+
1300
+ @property
1301
+
1302
+ def BeforeSaveAction(self)->'PdfJavaScriptAction':
1303
+ """
1304
+ Gets or sets the java script action to be performed before the document is saved.
1305
+ A object specifying the action to be executed before the document is saved.
1306
+ """
1307
+ GetDllLibPdf().PdfDocument_get_BeforeSaveAction.argtypes=[c_void_p]
1308
+ GetDllLibPdf().PdfDocument_get_BeforeSaveAction.restype=c_void_p
1309
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_BeforeSaveAction,self.Ptr)
1310
+ ret = None if intPtr==None else PdfJavaScriptAction(intPtr)
1311
+ return ret
1312
+
1313
+
1314
+ @BeforeSaveAction.setter
1315
+ def BeforeSaveAction(self, value:'PdfJavaScriptAction'):
1316
+ GetDllLibPdf().PdfDocument_set_BeforeSaveAction.argtypes=[c_void_p, c_void_p]
1317
+ CallCFunction(GetDllLibPdf().PdfDocument_set_BeforeSaveAction,self.Ptr, value.Ptr)
1318
+
1319
+ @property
1320
+
1321
+ def XmpMetaData(self)->'XmpMetadata':
1322
+ """
1323
+
1324
+ """
1325
+ GetDllLibPdf().PdfDocument_get_XmpMetaData.argtypes=[c_void_p]
1326
+ GetDllLibPdf().PdfDocument_get_XmpMetaData.restype=c_void_p
1327
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_XmpMetaData,self.Ptr)
1328
+ ret = None if intPtr==None else XmpMetadata(intPtr)
1329
+ return ret
1330
+
1331
+
1332
+ @property
1333
+
1334
+ def Template(self)->'PdfDocumentTemplate':
1335
+ """
1336
+ Gets the template of pdf document
1337
+ """
1338
+ GetDllLibPdf().PdfDocument_get_Template.argtypes=[c_void_p]
1339
+ GetDllLibPdf().PdfDocument_get_Template.restype=c_void_p
1340
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Template,self.Ptr)
1341
+ ret = None if intPtr==None else PdfDocumentTemplate(intPtr)
1342
+ return ret
1343
+
1344
+
1345
+ @staticmethod
1346
+ def get_EnableFontCache()->bool:
1347
+ """
1348
+ Indicates whether enable font cache.
1349
+ """
1350
+ #GetDllLibPdf().PdfDocument_get_EnableFontCache.argtypes=[]
1351
+ GetDllLibPdf().PdfDocument_get_EnableFontCache.restype=c_bool
1352
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_EnableFontCache)
1353
+ return ret
1354
+
1355
+ @staticmethod
1356
+ def set_EnableFontCache( value:bool):
1357
+ GetDllLibPdf().PdfDocument_set_EnableFontCache.argtypes=[ c_bool]
1358
+ CallCFunction(GetDllLibPdf().PdfDocument_set_EnableFontCache, value)
1359
+
1360
+ @property
1361
+
1362
+ def Tag(self)->'SpireObject':
1363
+ """
1364
+
1365
+ """
1366
+ GetDllLibPdf().PdfDocument_get_Tag.argtypes=[c_void_p]
1367
+ GetDllLibPdf().PdfDocument_get_Tag.restype=c_void_p
1368
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Tag,self.Ptr)
1369
+ ret = None if intPtr==None else SpireObject(intPtr)
1370
+ return ret
1371
+
1372
+
1373
+ @Tag.setter
1374
+ def Tag(self, value:'SpireObject'):
1375
+ GetDllLibPdf().PdfDocument_set_Tag.argtypes=[c_void_p, c_void_p]
1376
+ CallCFunction(GetDllLibPdf().PdfDocument_set_Tag,self.Ptr, value.Ptr)
1377
+
1378
+ @property
1379
+ def IsEncrypted(self)->bool:
1380
+ """
1381
+ Indicates the document is encrypted or not.
1382
+ """
1383
+ GetDllLibPdf().PdfDocument_get_IsEncrypted.argtypes=[c_void_p]
1384
+ GetDllLibPdf().PdfDocument_get_IsEncrypted.restype=c_bool
1385
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_IsEncrypted,self.Ptr)
1386
+ return ret
1387
+
1388
+ @property
1389
+ def IsPortfolio(self)->bool:
1390
+ """
1391
+ Indicates the document is a PDF Portfolio or not.
1392
+ """
1393
+ GetDllLibPdf().PdfDocument_get_IsPortfolio.argtypes=[c_void_p]
1394
+ GetDllLibPdf().PdfDocument_get_IsPortfolio.restype=c_bool
1395
+ ret = CallCFunction(GetDllLibPdf().PdfDocument_get_IsPortfolio,self.Ptr)
1396
+ return ret
1397
+
1398
+ @property
1399
+
1400
+ def Layers(self)->'PdfLayerCollection':
1401
+ """
1402
+ Optional content properties
1403
+ """
1404
+ GetDllLibPdf().PdfDocument_get_Layers.argtypes=[c_void_p]
1405
+ GetDllLibPdf().PdfDocument_get_Layers.restype=c_void_p
1406
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Layers,self.Ptr)
1407
+ ret = None if intPtr==None else PdfLayerCollection(intPtr)
1408
+ return ret
1409
+
1410
+
1411
+ @property
1412
+
1413
+ def Collection(self)->'Collections_PdfCollection':
1414
+ """
1415
+ The pdf collections.
1416
+ """
1417
+ GetDllLibPdf().PdfDocument_get_Collection.argtypes=[c_void_p]
1418
+ GetDllLibPdf().PdfDocument_get_Collection.restype=c_void_p
1419
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Collection,self.Ptr)
1420
+ ret = None if intPtr==None else Collections_PdfCollection(intPtr)
1421
+ return ret
1422
+
1423
+
1424
+ #@dispatch
1425
+ #def LoadFromFile(self ,filename:str):
1426
+ # """
1427
+ #Initializes a new instance of the class.
1428
+ #Args:
1429
+ # arg:The path to source pdf file.
1430
+ # """
1431
+ # GetDllLibPdf().PdfDocument_LoadFromFile.argtypes=[c_void_p ,c_wchar_p]
1432
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFile,self.Ptr, filename)
1433
+
1434
+ #@dispatch
1435
+ #def LoadFromFile(self ,filename:str,password:str):
1436
+ # """
1437
+ #<summary>
1438
+ # Initializes a new instance of the class.
1439
+ #</summary>
1440
+ #<param name="filename">The path to source PDF document.</param>
1441
+ #<param name="password">The password (user or owner) of the encrypted document.</param>
1442
+ # """
1443
+
1444
+ # GetDllLibPdf().PdfDocument_LoadFromFileFP.argtypes=[c_void_p ,c_wchar_p,c_wchar_p]
1445
+ # GetDllLibPdf().PdfDocument_LoadFromFileFP.restype=IntPtrWithTypeName
1446
+ # intPtr = CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFileFP,self.Ptr, filename,password)
1447
+ # emessage = PtrToStr(intPtr.typeName)
1448
+ # if emessage != None :
1449
+ # print(emessage)
1450
+
1451
+ #@dispatch
1452
+ #def LoadFromFile(self ,fileName:str,fileFormat:FileFormat):
1453
+ # """
1454
+
1455
+ # """
1456
+ # enumfileFormat:c_int = fileFormat.value
1457
+
1458
+ # GetDllLibPdf().PdfDocument_LoadFromFileFF.argtypes=[c_void_p ,c_wchar_p,c_int]
1459
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFileFF,self.Ptr, fileName,enumfileFormat)
1460
+ @overload
1461
+ def LoadFromFile(self, filename: str):
1462
+ """
1463
+ Initializes a new instance of the class.
1464
+
1465
+ Args:
1466
+ filename: The to source pdf file.
1467
+
1468
+ Remarks:
1469
+ This constructor imports an existing pdf file into the document object. It automatically populates
1470
+ the Pages collection with the pages of the given document.
1471
+ """
1472
+ pass
1473
+
1474
+ @overload
1475
+ def LoadFromFile(self, filename: str, password: str):
1476
+ """
1477
+ Initializes a new instance of the class.
1478
+
1479
+ Args:
1480
+ filename: The to source PDF document.
1481
+ password: The password (user or owner) of the encrypted document.
1482
+ """
1483
+ pass
1484
+
1485
+ @overload
1486
+ def LoadFromFile(self, filename: str, fileFormat: FileFormat):
1487
+ """
1488
+ Initializes a new instance of the class.
1489
+
1490
+ Args:
1491
+ filename: The path to source PDF document.
1492
+ fileFormat: The file format to be loaded.
1493
+ """
1494
+ pass
1495
+
1496
+ def LoadFromFile(self, *args, **kwargs):
1497
+ if len(args) == 2 and isinstance(args[1], str):
1498
+ filename, password = args
1499
+
1500
+ # Original logic for LoadFromFile(filename, password)
1501
+ GetDllLibPdf().PdfDocument_LoadFromFileFP.argtypes = [c_void_p, c_wchar_p, c_wchar_p]
1502
+ GetDllLibPdf().PdfDocument_LoadFromFileFP.restype = IntPtrWithTypeName
1503
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFileFP,self.Ptr, filename, password)
1504
+ emessage = PtrToStr(intPtr.typeName)
1505
+ if emessage is not None:
1506
+ print(emessage)
1507
+
1508
+ elif len(args) == 2 and isinstance(args[1], FileFormat):
1509
+ filename, fileFormat = args
1510
+
1511
+ # Original logic for LoadFromFile(filename, fileFormat)
1512
+ enumfileFormat = fileFormat.value
1513
+ GetDllLibPdf().PdfDocument_LoadFromFileFF.argtypes = [c_void_p, c_wchar_p, c_int]
1514
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFileFF,self.Ptr, filename, enumfileFormat)
1515
+
1516
+ elif len(args) == 1:
1517
+ filename = args[0]
1518
+
1519
+ # Original logic for LoadFromFile(filename)
1520
+ GetDllLibPdf().PdfDocument_LoadFromFile.argtypes = [c_void_p, c_wchar_p]
1521
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromFile,self.Ptr, filename)
1522
+ # @dispatch
1523
+ #
1524
+ # def LoadFromXPS(self ,xpsBytes:'Byte[]'):
1525
+ # """
1526
+ # <summary>
1527
+ # Load a xps bytes array.
1528
+ # </summary>
1529
+ # <param name="xpsBytes">the xps byte array</param>
1530
+ # """
1531
+ # #arrayxpsBytes:ArrayTypexpsBytes = ""
1532
+ # countxpsBytes = len(xpsBytes)
1533
+ # ArrayTypexpsBytes = c_void_p * countxpsBytes
1534
+ # arrayxpsBytes = ArrayTypexpsBytes()
1535
+ # for i in range(0, countxpsBytes):
1536
+ # arrayxpsBytes[i] = xpsBytes[i].Ptr
1537
+ #
1538
+ #
1539
+ # GetDllLibPdf().PdfDocument_LoadFromXPS.argtypes=[c_void_p ,ArrayTypexpsBytes]
1540
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromXPS,self.Ptr, arrayxpsBytes)
1541
+
1542
+
1543
+ #@dispatch
1544
+
1545
+ #def LoadFromXPS(self ,fileName:str):
1546
+ # """
1547
+ #<summary>
1548
+ # Load a xps file.
1549
+ #</summary>
1550
+ #<param name="fileName"></param>
1551
+ # """
1552
+
1553
+ # GetDllLibPdf().PdfDocument_LoadFromXPSF.argtypes=[c_void_p ,c_wchar_p]
1554
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromXPSF,self.Ptr, fileName)
1555
+
1556
+ #@dispatch
1557
+
1558
+ #def LoadFromXPS(self ,xpsStream:Stream):
1559
+ # """
1560
+ #<summary>
1561
+ # Load a xps stream.
1562
+ #</summary>
1563
+ #<param name="xpsStream"></param>
1564
+ # """
1565
+ # intPtrxpsStream:c_void_p = xpsStream.Ptr
1566
+
1567
+ # GetDllLibPdf().PdfDocument_LoadFromXPSX.argtypes=[c_void_p ,c_void_p]
1568
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromXPSX,self.Ptr, intPtrxpsStream)
1569
+
1570
+ @dispatch
1571
+
1572
+ def LoadFromSvg(self ,fileName:str):
1573
+ """
1574
+ Load a svg file.
1575
+
1576
+ Args:
1577
+ fileName (str): A relative or absolute path for the svg file.
1578
+ """
1579
+ GetDllLibPdf().PdfDocument_LoadFromSvg.argtypes=[c_void_p ,c_wchar_p]
1580
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromSvg,self.Ptr, fileName)
1581
+
1582
+ @dispatch
1583
+
1584
+ def LoadFromSvg(self ,stream:Stream):
1585
+ """
1586
+ Load a svg stream.
1587
+
1588
+ Args:
1589
+ stream (Stream): A Svg file stream.
1590
+ """
1591
+ intPtrstream:c_void_p = stream.Ptr
1592
+
1593
+ GetDllLibPdf().PdfDocument_LoadFromSvgS.argtypes=[c_void_p ,c_void_p]
1594
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromSvgS,self.Ptr, intPtrstream)
1595
+
1596
+ #@dispatch
1597
+
1598
+ #def LoadFromHTML(self ,url:str,enableJavaScript:bool,enableHyperlinks:bool,autoDetectPageBreak:bool):
1599
+ # """
1600
+ #<summary>
1601
+ # Load file from disk file.
1602
+ #</summary>
1603
+ #<param name="url">url address</param>
1604
+ #<param name="enableJavaScript">Enable javascrpit</param>
1605
+ #<param name="enableHyperlinks">Enable hyperlink</param>
1606
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1607
+ # """
1608
+
1609
+ # GetDllLibPdf().PdfDocument_LoadFromHTML.argtypes=[c_void_p ,c_wchar_p,c_bool,c_bool,c_bool]
1610
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTML,self.Ptr, url,enableJavaScript,enableHyperlinks,autoDetectPageBreak)
1611
+
1612
+ #@dispatch
1613
+
1614
+ #def LoadFromHTML(self ,Url:str,enableJavaScript:bool,enableHyperlinks:bool,autoDetectPageBreak:bool,setting:PdfPageSettings):
1615
+ # """
1616
+ #<summary>
1617
+ # Load file from disk file.
1618
+ #</summary>
1619
+ #<param name="url">url address</param>
1620
+ #<param name="enableJavaScript">Enable javascrpit</param>
1621
+ #<param name="enableHyperlinks">Enable hyperlink</param>
1622
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1623
+ #<param name="Size">paper size</param>
1624
+ #<param name="layoutFormat">PdfHtmlLayoutFormat layoutFormat</param>
1625
+ # """
1626
+ # intPtrsetting:c_void_p = setting.Ptr
1627
+
1628
+ # GetDllLibPdf().PdfDocument_LoadFromHTMLUEEAS.argtypes=[c_void_p ,c_wchar_p,c_bool,c_bool,c_bool,c_void_p]
1629
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTMLUEEAS,self.Ptr, Url,enableJavaScript,enableHyperlinks,autoDetectPageBreak,intPtrsetting)
1630
+
1631
+ #@dispatch
1632
+
1633
+ #def LoadFromHTML(self ,Url:str,enableJavaScript:bool,enableHyperlinks:bool,autoDetectPageBreak:bool,setting:PdfPageSettings,layoutFormat:PdfHtmlLayoutFormat):
1634
+ # """
1635
+ #<summary>
1636
+ # Load file from disk file.
1637
+ #</summary>
1638
+ #<param name="url">url address</param>
1639
+ #<param name="enableJavaScript">Enable javascrpit</param>
1640
+ #<param name="enableHyperlinks">Enable hyperlink</param>
1641
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1642
+ #<param name="Size">paper size</param>
1643
+ #<param name="layoutFormat">PdfHtmlLayoutFormat layoutFormat</param>
1644
+ # """
1645
+ # intPtrsetting:c_void_p = setting.Ptr
1646
+ # intPtrlayoutFormat:c_void_p = layoutFormat.Ptr
1647
+
1648
+ # GetDllLibPdf().PdfDocument_LoadFromHTMLUEEASL.argtypes=[c_void_p ,c_wchar_p,c_bool,c_bool,c_bool,c_void_p,c_void_p]
1649
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTMLUEEASL,self.Ptr, Url,enableJavaScript,enableHyperlinks,autoDetectPageBreak,intPtrsetting,intPtrlayoutFormat)
1650
+
1651
+ #@dispatch
1652
+
1653
+ #def LoadFromHTML(self ,url:str,enableJavaScript:bool,enableHyperlinks:bool,autoDetectPageBreak:bool,setting:PdfPageSettings,layoutFormat:PdfHtmlLayoutFormat,isLoadComplete:bool):
1654
+ # """
1655
+ #<summary>
1656
+ # Load file from disk file.
1657
+ #</summary>
1658
+ #<param name="url">url address</param>
1659
+ #<param name="enableJavaScript">Enable javascrpit</param>
1660
+ #<param name="enableHyperlinks">Enable hyperlink</param>
1661
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1662
+ #<param name="setting">Page setting</param>
1663
+ #<param name="layoutFormat">PdfHtmlLayoutFormat layoutFormat</param>
1664
+ #<param name="isLoadComplete">
1665
+ # by default false, when load Html DOM timeout(PdfHtmlLayoutFormat.LoadHtmlTimeout),convert uncompleted Html DOM to pdf.
1666
+ # if true,until Html DOM load completed,then convert to pdf.
1667
+ #</param>
1668
+ # """
1669
+ # intPtrsetting:c_void_p = setting.Ptr
1670
+ # intPtrlayoutFormat:c_void_p = layoutFormat.Ptr
1671
+
1672
+ # GetDllLibPdf().PdfDocument_LoadFromHTMLUEEASLI.argtypes=[c_void_p ,c_wchar_p,c_bool,c_bool,c_bool,c_void_p,c_void_p,c_bool]
1673
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTMLUEEASLI,self.Ptr, url,enableJavaScript,enableHyperlinks,autoDetectPageBreak,intPtrsetting,intPtrlayoutFormat,isLoadComplete)
1674
+
1675
+ #@dispatch
1676
+
1677
+ #def LoadFromHTML(self ,htmlSourceCode:str,autoDetectPageBreak:bool,setting:PdfPageSettings,layoutFormat:PdfHtmlLayoutFormat):
1678
+ # """
1679
+ #<summary>
1680
+ # Load htmlSourceCode to Pdf
1681
+ #</summary>
1682
+ #<param name="htmlSourceCode">htmlSourceCode</param>
1683
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1684
+ #<param name="setting">PdfPageSettings setting</param>
1685
+ #<param name="layoutFormat">PdfHtmlLayoutFormat layoutFormat</param>
1686
+ # """
1687
+ # intPtrsetting:c_void_p = setting.Ptr
1688
+ # intPtrlayoutFormat:c_void_p = layoutFormat.Ptr
1689
+
1690
+ # GetDllLibPdf().PdfDocument_LoadFromHTMLHASL.argtypes=[c_void_p ,c_wchar_p,c_bool,c_void_p,c_void_p]
1691
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTMLHASL,self.Ptr, htmlSourceCode,autoDetectPageBreak,intPtrsetting,intPtrlayoutFormat)
1692
+
1693
+ #@dispatch
1694
+
1695
+ #def LoadFromHTML(self ,htmlSourceCode:str,autoDetectPageBreak:bool,setting:PdfPageSettings,layoutFormat:PdfHtmlLayoutFormat,isLoadComplete:bool):
1696
+ # """
1697
+ #<summary>
1698
+ # Load htmlSourceCode to Pdf
1699
+ #</summary>
1700
+ #<param name="htmlSourceCode">htmlSourceCode</param>
1701
+ #<param name="autoDetectPageBreak">Auto detect page break</param>
1702
+ #<param name="setting">PdfPageSettings setting</param>
1703
+ #<param name="layoutFormat">PdfHtmlLayoutFormat layoutFormat</param>
1704
+ #<param name="isLoadComplete">
1705
+ # by default false, when load Html DOM timeout(PdfHtmlLayoutFormat.LoadHtmlTimeout),convert uncompleted Html DOM to pdf.
1706
+ # if true,until Html DOM load completed,then convert to pdf.
1707
+ #</param>
1708
+ # """
1709
+ # intPtrsetting:c_void_p = setting.Ptr
1710
+ # intPtrlayoutFormat:c_void_p = layoutFormat.Ptr
1711
+
1712
+ # GetDllLibPdf().PdfDocument_LoadFromHTMLHASLI.argtypes=[c_void_p ,c_wchar_p,c_bool,c_void_p,c_void_p,c_bool]
1713
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromHTMLHASLI,self.Ptr, htmlSourceCode,autoDetectPageBreak,intPtrsetting,intPtrlayoutFormat,isLoadComplete)
1714
+
1715
+ # @dispatch
1716
+ #
1717
+ # def LoadFromBytes(self ,bytes:'Byte[]'):
1718
+ # """
1719
+ # <summary>
1720
+ # Initializes a new instance of the class.
1721
+ # </summary>
1722
+ # <param name="bytes">The byte array with the file content.</param>
1723
+ # """
1724
+ # #arraybytes:ArrayTypebytes = ""
1725
+ # countbytes = len(bytes)
1726
+ # ArrayTypebytes = c_void_p * countbytes
1727
+ # arraybytes = ArrayTypebytes()
1728
+ # for i in range(0, countbytes):
1729
+ # arraybytes[i] = bytes[i].Ptr
1730
+ #
1731
+ #
1732
+ # GetDllLibPdf().PdfDocument_LoadFromBytesB.argtypes=[c_void_p ,ArrayTypebytes]
1733
+ # CallCFunction(GetDllLibPdf().PdfDocument_LoadFromBytesB,self.Ptr, arraybytes)
1734
+
1735
+
1736
+ @dispatch
1737
+
1738
+ def LoadFromStream(self ,stream:Stream):
1739
+ """
1740
+ Initializes a new instance of the class.
1741
+
1742
+ Args:
1743
+ stream (Stream): The stream with the file.
1744
+ """
1745
+ intPtrstream:c_void_p = stream.Ptr
1746
+
1747
+ GetDllLibPdf().PdfDocument_LoadFromStreamS.argtypes=[c_void_p ,c_void_p]
1748
+ CallCFunction(GetDllLibPdf().PdfDocument_LoadFromStreamS,self.Ptr, intPtrstream)
1749
+
1750
+ @property
1751
+ def Bookmarks(self)->PdfBookmarkCollection:
1752
+ """
1753
+ Gets the bookmarks.
1754
+ """
1755
+ GetDllLibPdf().PdfDocument_get_Bookmarks.argtypes=[c_void_p]
1756
+ GetDllLibPdf().PdfDocument_get_Bookmarks.restype=c_void_p
1757
+ intPtr = CallCFunction(GetDllLibPdf().PdfDocument_get_Bookmarks,self.Ptr)
1758
+ ret = None if intPtr==None else PdfBookmarkCollection(intPtr)
1759
+ return ret