spire-pdf 11.6.1__py3-none-macosx_10_7_universal.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.
- spire/__init__.py +0 -0
- spire/pdf/ArtifactPropertyList.py +13 -0
- spire/pdf/AspectRatio.py +16 -0
- spire/pdf/BookletOptions.py +40 -0
- spire/pdf/Clip.py +16 -0
- spire/pdf/Collections_PdfCollection.py +121 -0
- spire/pdf/CompressionLevel.py +26 -0
- spire/pdf/ConfiguerGraphicType.py +18 -0
- spire/pdf/CustomFieldType.py +20 -0
- spire/pdf/DataFormat.py +16 -0
- spire/pdf/DocxOptions.py +228 -0
- spire/pdf/FileFormat.py +26 -0
- spire/pdf/FileRelatedFieldType.py +24 -0
- spire/pdf/Find_TextFindParameter.py +17 -0
- spire/pdf/GraphicMode.py +17 -0
- spire/pdf/HtmlConverter.py +564 -0
- spire/pdf/HtmlToPdfLayoutParams.py +93 -0
- spire/pdf/HtmlToPdfResult.py +36 -0
- spire/pdf/HttpMethod.py +14 -0
- spire/pdf/HttpReadType.py +15 -0
- spire/pdf/IOCSPService.py +27 -0
- spire/pdf/IPdfComboBoxField.py +388 -0
- spire/pdf/IPdfSignatureAppearance.py +20 -0
- spire/pdf/IPdfSignatureFormatter.py +31 -0
- spire/pdf/IPdfTextBoxField.py +305 -0
- spire/pdf/IStructureNode.py +12 -0
- spire/pdf/ITSAService.py +27 -0
- spire/pdf/ImageFormatType.py +16 -0
- spire/pdf/ImageQuality.py +15 -0
- spire/pdf/ImageType.py +14 -0
- spire/pdf/ImgData.py +208 -0
- spire/pdf/LayerExportState.py +15 -0
- spire/pdf/LayerPrintState.py +20 -0
- spire/pdf/LayerViewState.py +20 -0
- spire/pdf/LineBorder.py +73 -0
- spire/pdf/LineInfo.py +53 -0
- spire/pdf/LineType.py +17 -0
- spire/pdf/LoadHtmlType.py +18 -0
- spire/pdf/MergerOptions.py +39 -0
- spire/pdf/OCSPHttpService.py +32 -0
- spire/pdf/OfdConverter.py +89 -0
- spire/pdf/OptimizationOptions.py +85 -0
- spire/pdf/PDF3DAnimationType.py +15 -0
- spire/pdf/Pdf3DActivation.py +113 -0
- spire/pdf/Pdf3DActivationMode.py +20 -0
- spire/pdf/Pdf3DActivationState.py +14 -0
- spire/pdf/Pdf3DAnimation.py +69 -0
- spire/pdf/Pdf3DAnnotation.py +167 -0
- spire/pdf/Pdf3DBackground.py +84 -0
- spire/pdf/Pdf3DCrossSection.py +144 -0
- spire/pdf/Pdf3DCrossSectionCollection.py +117 -0
- spire/pdf/Pdf3DDeactivationMode.py +15 -0
- spire/pdf/Pdf3DDeactivationState.py +15 -0
- spire/pdf/Pdf3DLighting.py +42 -0
- spire/pdf/Pdf3DLightingStyle.py +24 -0
- spire/pdf/Pdf3DNode.py +98 -0
- spire/pdf/Pdf3DNodeCollection.py +123 -0
- spire/pdf/Pdf3DProjection.py +120 -0
- spire/pdf/Pdf3DProjectionClipStyle.py +15 -0
- spire/pdf/Pdf3DProjectionOrthoScaleMode.py +18 -0
- spire/pdf/Pdf3DProjectionType.py +15 -0
- spire/pdf/Pdf3DRenderStyle.py +44 -0
- spire/pdf/Pdf3DRendermode.py +158 -0
- spire/pdf/Pdf3DView.py +213 -0
- spire/pdf/Pdf3DViewCollection.py +124 -0
- spire/pdf/PdfAction.py +31 -0
- spire/pdf/PdfActionAnnotation.py +28 -0
- spire/pdf/PdfActionCollection.py +110 -0
- spire/pdf/PdfActionDestination.py +22 -0
- spire/pdf/PdfActionLinkAnnotation.py +37 -0
- spire/pdf/PdfAlignmentStyle.py +22 -0
- spire/pdf/PdfAnnotation.py +161 -0
- spire/pdf/PdfAnnotationActions.py +202 -0
- spire/pdf/PdfAnnotationBorder.py +86 -0
- spire/pdf/PdfAnnotationCollection.py +164 -0
- spire/pdf/PdfAnnotationException.py +13 -0
- spire/pdf/PdfAnnotationFlags.py +22 -0
- spire/pdf/PdfAnnotationIntent.py +14 -0
- spire/pdf/PdfAnnotationWidget.py +47 -0
- spire/pdf/PdfAnnotationWidgetCollection.py +68 -0
- spire/pdf/PdfAnnotationWidgetTypes.py +46 -0
- spire/pdf/PdfAppearance.py +113 -0
- spire/pdf/PdfAppearanceField.py +26 -0
- spire/pdf/PdfAppearanceState.py +94 -0
- spire/pdf/PdfApplicationData.py +24 -0
- spire/pdf/PdfAttachment.py +39 -0
- spire/pdf/PdfAttachmentAnnotation.py +93 -0
- spire/pdf/PdfAttachmentAnnotationWidget.py +61 -0
- spire/pdf/PdfAttachmentCollection.py +112 -0
- spire/pdf/PdfAttachmentIcon.py +17 -0
- spire/pdf/PdfAttachmentRelationship.py +24 -0
- spire/pdf/PdfAttributeOwner.py +132 -0
- spire/pdf/PdfAutomaticField.py +154 -0
- spire/pdf/PdfBarcode.py +180 -0
- spire/pdf/PdfBarcodeException.py +13 -0
- spire/pdf/PdfBarcodeQuietZones.py +112 -0
- spire/pdf/PdfBarcodeTextAlignment.py +15 -0
- spire/pdf/PdfBitmap.py +112 -0
- spire/pdf/PdfBlend.py +36 -0
- spire/pdf/PdfBlendBase.py +37 -0
- spire/pdf/PdfBlendMode.py +29 -0
- spire/pdf/PdfBookletBindingMode.py +18 -0
- spire/pdf/PdfBookletCreator.py +67 -0
- spire/pdf/PdfBookmark.py +135 -0
- spire/pdf/PdfBookmarkCollection.py +95 -0
- spire/pdf/PdfBookmarkWidget.py +87 -0
- spire/pdf/PdfBorderEffect.py +15 -0
- spire/pdf/PdfBorderOverlapStyle.py +14 -0
- spire/pdf/PdfBorderStyle.py +17 -0
- spire/pdf/PdfBorders.py +113 -0
- spire/pdf/PdfBrush.py +25 -0
- spire/pdf/PdfBrushes.py +1846 -0
- spire/pdf/PdfButtonField.py +221 -0
- spire/pdf/PdfButtonIconLayout.py +92 -0
- spire/pdf/PdfButtonIconScaleMode.py +14 -0
- spire/pdf/PdfButtonIconScaleReason.py +16 -0
- spire/pdf/PdfButtonLayoutMode.py +28 -0
- spire/pdf/PdfButtonWidgetFieldWidget.py +92 -0
- spire/pdf/PdfButtonWidgetItemCollection.py +23 -0
- spire/pdf/PdfButtonWidgetWidgetItem.py +63 -0
- spire/pdf/PdfCalGrayColor.py +44 -0
- spire/pdf/PdfCalGrayColorSpace.py +96 -0
- spire/pdf/PdfCalRGBColor.py +102 -0
- spire/pdf/PdfCalRGBColorSpace.py +132 -0
- spire/pdf/PdfCanvas.py +1714 -0
- spire/pdf/PdfCaretAnnotationWidget.py +21 -0
- spire/pdf/PdfCellStyle.py +126 -0
- spire/pdf/PdfCertificate.py +19 -0
- spire/pdf/PdfCertificationFlags.py +15 -0
- spire/pdf/PdfCheckBoxField.py +47 -0
- spire/pdf/PdfCheckBoxStyle.py +20 -0
- spire/pdf/PdfCheckBoxWidgetFieldWidget.py +61 -0
- spire/pdf/PdfCheckBoxWidgetWidgetItem.py +16 -0
- spire/pdf/PdfCheckBoxWidgetWidgetItemCollection.py +23 -0
- spire/pdf/PdfCheckFieldBase.py +37 -0
- spire/pdf/PdfChoiceWidgetFieldWidget.py +114 -0
- spire/pdf/PdfCjkFontFamily.py +19 -0
- spire/pdf/PdfCjkStandardFont.py +70 -0
- spire/pdf/PdfCodabarBarcode.py +38 -0
- spire/pdf/PdfCode11Barcode.py +36 -0
- spire/pdf/PdfCode128ABarcode.py +36 -0
- spire/pdf/PdfCode128BBarcode.py +28 -0
- spire/pdf/PdfCode128CBarcode.py +14 -0
- spire/pdf/PdfCode32Barcode.py +37 -0
- spire/pdf/PdfCode39Barcode.py +37 -0
- spire/pdf/PdfCode39ExtendedBarcode.py +25 -0
- spire/pdf/PdfCode93Barcode.py +37 -0
- spire/pdf/PdfCode93ExtendedBarcode.py +36 -0
- spire/pdf/PdfCollection.py +46 -0
- spire/pdf/PdfColorBlend.py +37 -0
- spire/pdf/PdfColorMask.py +50 -0
- spire/pdf/PdfColorSpace.py +17 -0
- spire/pdf/PdfColorSpaces.py +12 -0
- spire/pdf/PdfColumn.py +67 -0
- spire/pdf/PdfColumnCollection.py +34 -0
- spire/pdf/PdfComboBoxField.py +47 -0
- spire/pdf/PdfComboBoxWidgetFieldWidget.py +74 -0
- spire/pdf/PdfComboBoxWidgetItemCollection.py +29 -0
- spire/pdf/PdfComboBoxWidgetWidgetItem.py +16 -0
- spire/pdf/PdfCompareOptions.py +82 -0
- spire/pdf/PdfComparer.py +63 -0
- spire/pdf/PdfComplexColor.py +23 -0
- spire/pdf/PdfCompositeField.py +205 -0
- spire/pdf/PdfCompressionLevel.py +42 -0
- spire/pdf/PdfCompressor.py +79 -0
- spire/pdf/PdfConformanceException.py +13 -0
- spire/pdf/PdfConformanceLevel.py +20 -0
- spire/pdf/PdfConvertOptions.py +222 -0
- spire/pdf/PdfCreationDateField.py +81 -0
- spire/pdf/PdfCrossReferenceType.py +16 -0
- spire/pdf/PdfCustomAppearance.py +28 -0
- spire/pdf/PdfDashStyle.py +19 -0
- spire/pdf/PdfDateTimeField.py +91 -0
- spire/pdf/PdfDestination.py +225 -0
- spire/pdf/PdfDestinationMode.py +17 -0
- spire/pdf/PdfDestinationPageNumberField.py +111 -0
- spire/pdf/PdfDeviceColorSpace.py +31 -0
- spire/pdf/PdfDockStyle.py +18 -0
- spire/pdf/PdfDocument.py +1759 -0
- spire/pdf/PdfDocumentActions.py +162 -0
- spire/pdf/PdfDocumentAuthorField.py +67 -0
- spire/pdf/PdfDocumentBase.py +744 -0
- spire/pdf/PdfDocumentException.py +13 -0
- spire/pdf/PdfDocumentInformation.py +207 -0
- spire/pdf/PdfDocumentLinkAnnotation.py +54 -0
- spire/pdf/PdfDocumentLinkAnnotationWidget.py +40 -0
- spire/pdf/PdfDocumentPageCollection.py +79 -0
- spire/pdf/PdfDocumentPrivilege.py +163 -0
- spire/pdf/PdfDocumentTemplate.py +241 -0
- spire/pdf/PdfDrawWidget.py +28 -0
- spire/pdf/PdfDynamicField.py +13 -0
- spire/pdf/PdfEdges.py +99 -0
- spire/pdf/PdfEmbeddedFileSpecification.py +135 -0
- spire/pdf/PdfEmbeddedGoToAction.py +91 -0
- spire/pdf/PdfEncryptionAlgorithm.py +16 -0
- spire/pdf/PdfEncryptionKeySize.py +20 -0
- spire/pdf/PdfException.py +21 -0
- spire/pdf/PdfExtend.py +17 -0
- spire/pdf/PdfExtendedAppearance.py +48 -0
- spire/pdf/PdfField.py +144 -0
- spire/pdf/PdfFieldActions.py +201 -0
- spire/pdf/PdfFieldCollection.py +111 -0
- spire/pdf/PdfFieldWidget.py +154 -0
- spire/pdf/PdfFieldWidgetImportError.py +23 -0
- spire/pdf/PdfFieldWidgetItem.py +80 -0
- spire/pdf/PdfFileAnnotation.py +49 -0
- spire/pdf/PdfFileInfo.py +85 -0
- spire/pdf/PdfFileLinkAnnotation.py +76 -0
- spire/pdf/PdfFileLinkAnnotationWidget.py +39 -0
- spire/pdf/PdfFilePathType.py +14 -0
- spire/pdf/PdfFileSpecificationBase.py +36 -0
- spire/pdf/PdfFillElement.py +31 -0
- spire/pdf/PdfFillMode.py +18 -0
- spire/pdf/PdfFolder.py +100 -0
- spire/pdf/PdfFont.py +61 -0
- spire/pdf/PdfFontBase.py +298 -0
- spire/pdf/PdfFontFamily.py +24 -0
- spire/pdf/PdfFontStyle.py +17 -0
- spire/pdf/PdfFontType.py +20 -0
- spire/pdf/PdfForm.py +123 -0
- spire/pdf/PdfFormAction.py +54 -0
- spire/pdf/PdfFormFieldCollection.py +12 -0
- spire/pdf/PdfFormFieldWidgetCollection.py +84 -0
- spire/pdf/PdfFormWidget.py +148 -0
- spire/pdf/PdfFreeTextAnnotation.py +291 -0
- spire/pdf/PdfFreeTextAnnotationWidget.py +129 -0
- spire/pdf/PdfGoToAction.py +64 -0
- spire/pdf/PdfGotoNameAction.py +32 -0
- spire/pdf/PdfGradientBrush.py +65 -0
- spire/pdf/PdfGraphicsState.py +12 -0
- spire/pdf/PdfGraphicsUnit.py +19 -0
- spire/pdf/PdfGraphicsWidget.py +55 -0
- spire/pdf/PdfGrayConverter.py +60 -0
- spire/pdf/PdfGrid.py +91 -0
- spire/pdf/PdfGridCell.py +110 -0
- spire/pdf/PdfGridCellCollection.py +71 -0
- spire/pdf/PdfGridCellContent.py +158 -0
- spire/pdf/PdfGridCellContentList.py +23 -0
- spire/pdf/PdfGridCellStyle.py +84 -0
- spire/pdf/PdfGridColumn.py +65 -0
- spire/pdf/PdfGridColumnCollection.py +119 -0
- spire/pdf/PdfGridHeaderCollection.py +73 -0
- spire/pdf/PdfGridLayoutFormat.py +12 -0
- spire/pdf/PdfGridLayoutResult.py +12 -0
- spire/pdf/PdfGridRow.py +89 -0
- spire/pdf/PdfGridRowCollection.py +50 -0
- spire/pdf/PdfGridRowStyle.py +35 -0
- spire/pdf/PdfGridStyle.py +105 -0
- spire/pdf/PdfGridStyleBase.py +125 -0
- spire/pdf/PdfHTMLTextElement.py +142 -0
- spire/pdf/PdfHeaderSource.py +14 -0
- spire/pdf/PdfHighlightMode.py +18 -0
- spire/pdf/PdfHorizontalAlignment.py +16 -0
- spire/pdf/PdfHorizontalOverflowType.py +18 -0
- spire/pdf/PdfHtmlLayoutFormat.py +148 -0
- spire/pdf/PdfICCColor.py +48 -0
- spire/pdf/PdfICCColorSpace.py +80 -0
- spire/pdf/PdfImage.py +170 -0
- spire/pdf/PdfImageHelper.py +81 -0
- spire/pdf/PdfImageMask.py +34 -0
- spire/pdf/PdfImageType.py +14 -0
- spire/pdf/PdfInkAnnotation.py +28 -0
- spire/pdf/PdfInkAnnotationWidget.py +21 -0
- spire/pdf/PdfJavaScript.py +214 -0
- spire/pdf/PdfJavaScriptAction.py +48 -0
- spire/pdf/PdfKnownColor.py +39 -0
- spire/pdf/PdfKnownColorSpace.py +61 -0
- spire/pdf/PdfLabColor.py +102 -0
- spire/pdf/PdfLabColorSpace.py +102 -0
- spire/pdf/PdfLaunchAction.py +69 -0
- spire/pdf/PdfLayer.py +128 -0
- spire/pdf/PdfLayerCollection.py +172 -0
- spire/pdf/PdfLayerOutline.py +62 -0
- spire/pdf/PdfLayoutBreakType.py +14 -0
- spire/pdf/PdfLayoutHTMLResult.py +23 -0
- spire/pdf/PdfLayoutParams.py +60 -0
- spire/pdf/PdfLayoutResult.py +41 -0
- spire/pdf/PdfLayoutType.py +15 -0
- spire/pdf/PdfLayoutWidget.py +165 -0
- spire/pdf/PdfLineAnnotation.py +310 -0
- spire/pdf/PdfLineAnnotationWidget.py +241 -0
- spire/pdf/PdfLineBorderStyle.py +17 -0
- spire/pdf/PdfLineCap.py +15 -0
- spire/pdf/PdfLineCaptionType.py +18 -0
- spire/pdf/PdfLineEndingStyle.py +22 -0
- spire/pdf/PdfLineIntent.py +14 -0
- spire/pdf/PdfLineJoin.py +16 -0
- spire/pdf/PdfLinearGradientBrush.py +146 -0
- spire/pdf/PdfLinearGradientMode.py +16 -0
- spire/pdf/PdfLinkAnnotation.py +31 -0
- spire/pdf/PdfList.py +122 -0
- spire/pdf/PdfListBase.py +143 -0
- spire/pdf/PdfListBoxField.py +50 -0
- spire/pdf/PdfListBoxWidgetFieldWidget.py +52 -0
- spire/pdf/PdfListField.py +79 -0
- spire/pdf/PdfListFieldItem.py +83 -0
- spire/pdf/PdfListFieldItemCollection.py +121 -0
- spire/pdf/PdfListFieldWidgetItem.py +16 -0
- spire/pdf/PdfListItem.py +122 -0
- spire/pdf/PdfListItemCollection.py +166 -0
- spire/pdf/PdfListMarkerAlignment.py +14 -0
- spire/pdf/PdfListWidgetFieldItemCollection.py +23 -0
- spire/pdf/PdfListWidgetItem.py +74 -0
- spire/pdf/PdfListWidgetItemCollection.py +64 -0
- spire/pdf/PdfMDPSignatureMaker.py +54 -0
- spire/pdf/PdfMargins.py +170 -0
- spire/pdf/PdfMarkUpAnnotationWidget.py +111 -0
- spire/pdf/PdfMarker.py +100 -0
- spire/pdf/PdfMarkerBase.py +107 -0
- spire/pdf/PdfMask.py +13 -0
- spire/pdf/PdfMatrix.py +269 -0
- spire/pdf/PdfMatrixOrder.py +18 -0
- spire/pdf/PdfMerger.py +57 -0
- spire/pdf/PdfMetafile.py +83 -0
- spire/pdf/PdfMetafileLayoutFormat.py +48 -0
- spire/pdf/PdfMultipleNumberValueField.py +37 -0
- spire/pdf/PdfMultipleValueField.py +12 -0
- spire/pdf/PdfNamedAction.py +37 -0
- spire/pdf/PdfNewDocument.py +117 -0
- spire/pdf/PdfNewPage.py +34 -0
- spire/pdf/PdfNumberStyle.py +18 -0
- spire/pdf/PdfOrderedMarker.py +112 -0
- spire/pdf/PdfOrdinarySignatureMaker.py +32 -0
- spire/pdf/PdfPKCS1Formatter.py +59 -0
- spire/pdf/PdfPKCS7Formatter.py +55 -0
- spire/pdf/PdfPaddings.py +99 -0
- spire/pdf/PdfPageBase.py +665 -0
- spire/pdf/PdfPageCollection.py +384 -0
- spire/pdf/PdfPageCountField.py +92 -0
- spire/pdf/PdfPageLabels.py +124 -0
- spire/pdf/PdfPageLayout.py +26 -0
- spire/pdf/PdfPageMode.py +18 -0
- spire/pdf/PdfPageNumberField.py +67 -0
- spire/pdf/PdfPageOrientation.py +15 -0
- spire/pdf/PdfPageRotateAngle.py +16 -0
- spire/pdf/PdfPageSettings.py +275 -0
- spire/pdf/PdfPageSize.py +389 -0
- spire/pdf/PdfPageTemplateElement.py +271 -0
- spire/pdf/PdfPageTransition.py +172 -0
- spire/pdf/PdfPageWidget.py +45 -0
- spire/pdf/PdfPageWidgetEnumerator.py +54 -0
- spire/pdf/PdfPasswordSecurityPolicy.py +22 -0
- spire/pdf/PdfPath.py +420 -0
- spire/pdf/PdfPen.py +236 -0
- spire/pdf/PdfPens.py +1845 -0
- spire/pdf/PdfPermissionsFlags.py +23 -0
- spire/pdf/PdfPieceInfo.py +42 -0
- spire/pdf/PdfPolyLineAnnotation.py +76 -0
- spire/pdf/PdfPolyLineAnnotationWidget.py +21 -0
- spire/pdf/PdfPolygonAndPolyLineAnnotationWidget.py +21 -0
- spire/pdf/PdfPolygonAnnotation.py +129 -0
- spire/pdf/PdfPolygonAnnotationWidget.py +21 -0
- spire/pdf/PdfPopupAnnotation.py +118 -0
- spire/pdf/PdfPopupAnnotationWidget.py +58 -0
- spire/pdf/PdfPopupIcon.py +19 -0
- spire/pdf/PdfRGBColor.py +351 -0
- spire/pdf/PdfRadialGradientBrush.py +136 -0
- spire/pdf/PdfRadioButtonItemCollection.py +124 -0
- spire/pdf/PdfRadioButtonListField.py +102 -0
- spire/pdf/PdfRadioButtonListFieldWidget.py +114 -0
- spire/pdf/PdfRadioButtonListItem.py +91 -0
- spire/pdf/PdfRadioButtonWidgetItem.py +60 -0
- spire/pdf/PdfRadioButtonWidgetWidgetItemCollection.py +29 -0
- spire/pdf/PdfResetAction.py +40 -0
- spire/pdf/PdfRow.py +36 -0
- spire/pdf/PdfRowCollection.py +50 -0
- spire/pdf/PdfRubberStampAnnotation.py +163 -0
- spire/pdf/PdfRubberStampAnnotationIcon.py +27 -0
- spire/pdf/PdfRubberStampAnnotationWidget.py +40 -0
- spire/pdf/PdfSection.py +91 -0
- spire/pdf/PdfSectionCollection.py +96 -0
- spire/pdf/PdfSectionNumberField.py +67 -0
- spire/pdf/PdfSectionPageCollection.py +112 -0
- spire/pdf/PdfSectionPageCountField.py +64 -0
- spire/pdf/PdfSectionPageNumberField.py +64 -0
- spire/pdf/PdfSectionTemplate.py +102 -0
- spire/pdf/PdfSecurity.py +158 -0
- spire/pdf/PdfSecurityPolicy.py +59 -0
- spire/pdf/PdfSeparationColor.py +36 -0
- spire/pdf/PdfSeparationColorSpace.py +69 -0
- spire/pdf/PdfShapeWidget.py +25 -0
- spire/pdf/PdfSignature.py +97 -0
- spire/pdf/PdfSignatureAppearance.py +153 -0
- spire/pdf/PdfSignatureAppearanceField.py +26 -0
- spire/pdf/PdfSignatureField.py +79 -0
- spire/pdf/PdfSignatureFieldWidget.py +41 -0
- spire/pdf/PdfSignatureMaker.py +165 -0
- spire/pdf/PdfSignatureProperties.py +61 -0
- spire/pdf/PdfSignatureStyledField.py +192 -0
- spire/pdf/PdfSinglePageScalingMode.py +22 -0
- spire/pdf/PdfSingleValueField.py +13 -0
- spire/pdf/PdfSolidBrush.py +78 -0
- spire/pdf/PdfSortedList.py +146 -0
- spire/pdf/PdfSound.py +104 -0
- spire/pdf/PdfSoundAction.py +176 -0
- spire/pdf/PdfSoundAnnotation.py +86 -0
- spire/pdf/PdfSoundAnnotationWidget.py +69 -0
- spire/pdf/PdfSoundChannels.py +18 -0
- spire/pdf/PdfSoundEncoding.py +22 -0
- spire/pdf/PdfSoundIcon.py +15 -0
- spire/pdf/PdfSquareAnnotationWidget.py +45 -0
- spire/pdf/PdfStampCollection.py +115 -0
- spire/pdf/PdfStandardStructTypes.py +630 -0
- spire/pdf/PdfStandardsConverter.py +217 -0
- spire/pdf/PdfStateFieldWidget.py +32 -0
- spire/pdf/PdfStateItemCollection.py +29 -0
- spire/pdf/PdfStateWidgetItem.py +30 -0
- spire/pdf/PdfStateWidgetItemCollection.py +23 -0
- spire/pdf/PdfStaticField.py +13 -0
- spire/pdf/PdfStringFormat.py +284 -0
- spire/pdf/PdfStringLayoutResult.py +54 -0
- spire/pdf/PdfStringLayouter.py +44 -0
- spire/pdf/PdfStructContentItem.py +13 -0
- spire/pdf/PdfStructureAttributes.py +83 -0
- spire/pdf/PdfStructureElement.py +135 -0
- spire/pdf/PdfStructureTreeRoot.py +51 -0
- spire/pdf/PdfStyledAnnotationWidget.py +153 -0
- spire/pdf/PdfStyledField.py +233 -0
- spire/pdf/PdfStyledFieldWidget.py +329 -0
- spire/pdf/PdfSubSuperScript.py +15 -0
- spire/pdf/PdfSubmitAction.py +212 -0
- spire/pdf/PdfSubmitFormFlags.py +25 -0
- spire/pdf/PdfTable.py +421 -0
- spire/pdf/PdfTableDataSourceType.py +15 -0
- spire/pdf/PdfTableException.py +13 -0
- spire/pdf/PdfTableExtractor.py +42 -0
- spire/pdf/PdfTableLayoutFormat.py +42 -0
- spire/pdf/PdfTableLayoutResult.py +22 -0
- spire/pdf/PdfTableStyle.py +199 -0
- spire/pdf/PdfTaggedContent.py +45 -0
- spire/pdf/PdfTemplate.py +124 -0
- spire/pdf/PdfTexBoxWidgetItem.py +12 -0
- spire/pdf/PdfTextAlignment.py +16 -0
- spire/pdf/PdfTextAnnotationIcon.py +19 -0
- spire/pdf/PdfTextAnnotationWidget.py +21 -0
- spire/pdf/PdfTextBoxField.py +220 -0
- spire/pdf/PdfTextBoxFieldWidget.py +212 -0
- spire/pdf/PdfTextBoxWidgetItemCollection.py +29 -0
- spire/pdf/PdfTextExtractOptions.py +75 -0
- spire/pdf/PdfTextExtractor.py +35 -0
- spire/pdf/PdfTextFind.py +308 -0
- spire/pdf/PdfTextFindCollection.py +23 -0
- spire/pdf/PdfTextFindOptions.py +71 -0
- spire/pdf/PdfTextFinder.py +81 -0
- spire/pdf/PdfTextFragment.py +105 -0
- spire/pdf/PdfTextLayout.py +101 -0
- spire/pdf/PdfTextLayoutResult.py +33 -0
- spire/pdf/PdfTextMarkupAnnotation.py +126 -0
- spire/pdf/PdfTextMarkupAnnotationType.py +22 -0
- spire/pdf/PdfTextMarkupAnnotationWidget.py +53 -0
- spire/pdf/PdfTextReplaceOptions.py +37 -0
- spire/pdf/PdfTextReplacer.py +89 -0
- spire/pdf/PdfTextState.py +83 -0
- spire/pdf/PdfTextStyle.py +15 -0
- spire/pdf/PdfTextWebLink.py +63 -0
- spire/pdf/PdfTextWebLinkAnnotationWidget.py +39 -0
- spire/pdf/PdfTextWidget.py +227 -0
- spire/pdf/PdfTilingBrush.py +103 -0
- spire/pdf/PdfToDocConverter.py +123 -0
- spire/pdf/PdfToHtmlParameter.py +48 -0
- spire/pdf/PdfToLinearizedPdfConverter.py +65 -0
- spire/pdf/PdfToWordConverter.py +90 -0
- spire/pdf/PdfTransitionDimension.py +18 -0
- spire/pdf/PdfTransitionDirection.py +17 -0
- spire/pdf/PdfTransitionMotion.py +15 -0
- spire/pdf/PdfTransitionStyle.py +38 -0
- spire/pdf/PdfTrueTypeFont.py +58 -0
- spire/pdf/PdfUnidimensionalBarcode.py +173 -0
- spire/pdf/PdfUnitConvertor.py +151 -0
- spire/pdf/PdfUnorderedMarkerStyle.py +21 -0
- spire/pdf/PdfUriAction.py +30 -0
- spire/pdf/PdfUriAnnotation.py +72 -0
- spire/pdf/PdfUriAnnotationWidget.py +39 -0
- spire/pdf/PdfUsedFont.py +83 -0
- spire/pdf/PdfVersion.py +20 -0
- spire/pdf/PdfVerticalAlignment.py +16 -0
- spire/pdf/PdfViewerPreferences.py +162 -0
- spire/pdf/PdfVisibility.py +15 -0
- spire/pdf/PdfWatermarkAnnotation.py +86 -0
- spire/pdf/PdfWatermarkAnnotationWidget.py +19 -0
- spire/pdf/PdfWebLinkAnnotationWidget.py +21 -0
- spire/pdf/PdfWordWrapType.py +16 -0
- spire/pdf/PrintScalingMode.py +16 -0
- spire/pdf/ReplaceActionType.py +24 -0
- spire/pdf/Security_GraphicMode.py +17 -0
- spire/pdf/Security_IPdfSignatureFormatter.py +27 -0
- spire/pdf/Security_PdfSignature.py +703 -0
- spire/pdf/Security_SignImageLayout.py +18 -0
- spire/pdf/SignImageLayout.py +15 -0
- spire/pdf/SignInfoType.py +22 -0
- spire/pdf/SignTextAlignment.py +15 -0
- spire/pdf/SignatureConfiguerText.py +30 -0
- spire/pdf/SimpleTextExtractionStrategy.py +17 -0
- spire/pdf/StoreType.py +17 -0
- spire/pdf/SubmitDataFormat.py +16 -0
- spire/pdf/TSAHttpService.py +36 -0
- spire/pdf/TabOrder.py +22 -0
- spire/pdf/TableWidthType.py +14 -0
- spire/pdf/TextAlign.py +22 -0
- spire/pdf/TextFindParameter.py +22 -0
- spire/pdf/TextLocation.py +15 -0
- spire/pdf/Utilities_PdfImageInfo.py +68 -0
- spire/pdf/Utilities_PdfTable.py +48 -0
- spire/pdf/XFAForm.py +68 -0
- spire/pdf/XfaBarcodeField.py +84 -0
- spire/pdf/XfaButtonField.py +12 -0
- spire/pdf/XfaCheckButtonField.py +30 -0
- spire/pdf/XfaChoiceListField.py +53 -0
- spire/pdf/XfaDateTimeField.py +43 -0
- spire/pdf/XfaDoubleField.py +30 -0
- spire/pdf/XfaField.py +43 -0
- spire/pdf/XfaFloatField.py +30 -0
- spire/pdf/XfaImageField.py +49 -0
- spire/pdf/XfaIntField.py +30 -0
- spire/pdf/XfaSignatureField.py +12 -0
- spire/pdf/XfaTextField.py +30 -0
- spire/pdf/XlsxLineLayoutOptions.py +69 -0
- spire/pdf/XlsxOptions.py +12 -0
- spire/pdf/XlsxTextLayoutOptions.py +18 -0
- spire/pdf/__init__.py +699 -0
- spire/pdf/common/Boolean.py +194 -0
- spire/pdf/common/Byte.py +258 -0
- spire/pdf/common/Char.py +742 -0
- spire/pdf/common/Color.py +2189 -0
- spire/pdf/common/Common.py +152 -0
- spire/pdf/common/CultureInfo.py +567 -0
- spire/pdf/common/DateTime.py +1149 -0
- spire/pdf/common/Double.py +440 -0
- spire/pdf/common/EmfType.py +25 -0
- spire/pdf/common/Encoding.py +930 -0
- spire/pdf/common/FontStyle.py +27 -0
- spire/pdf/common/GraphicsUnit.py +29 -0
- spire/pdf/common/ICollection.py +73 -0
- spire/pdf/common/IDictionary.py +124 -0
- spire/pdf/common/IEnumerable.py +44 -0
- spire/pdf/common/IEnumerator.py +62 -0
- spire/pdf/common/IList.py +148 -0
- spire/pdf/common/Int16.py +274 -0
- spire/pdf/common/Int32.py +282 -0
- spire/pdf/common/Int64.py +258 -0
- spire/pdf/common/License.py +177 -0
- spire/pdf/common/PixelFormat.py +45 -0
- spire/pdf/common/Point.py +300 -0
- spire/pdf/common/PointF.py +276 -0
- spire/pdf/common/Rectangle.py +451 -0
- spire/pdf/common/RectangleF.py +438 -0
- spire/pdf/common/Regex.py +964 -0
- spire/pdf/common/RegexOptions.py +31 -0
- spire/pdf/common/Single.py +418 -0
- spire/pdf/common/Size.py +273 -0
- spire/pdf/common/SizeF.py +261 -0
- spire/pdf/common/SpireObject.py +81 -0
- spire/pdf/common/Stream.py +552 -0
- spire/pdf/common/String.py +1880 -0
- spire/pdf/common/TimeSpan.py +874 -0
- spire/pdf/common/UInt16.py +274 -0
- spire/pdf/common/UInt32.py +274 -0
- spire/pdf/common/UInt64.py +274 -0
- spire/pdf/common/__init__.py +383 -0
- spire/pdf/lib/Spire.Pdf.Base.dylib +0 -0
- spire/pdf/lib/__init__.py +0 -0
- spire/pdf/lib/libSkiaSharp.dylib +0 -0
- spire_pdf-11.6.1.dist-info/METADATA +149 -0
- spire_pdf-11.6.1.dist-info/RECORD +566 -0
- spire_pdf-11.6.1.dist-info/WHEEL +5 -0
- spire_pdf-11.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar,Union,Generic,List,Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfTextWidget ( PdfLayoutWidget) :
|
|
10
|
+
"""
|
|
11
|
+
Represents the text area with the ability to span several pages.
|
|
12
|
+
"""
|
|
13
|
+
@dispatch
|
|
14
|
+
def __init__(self):
|
|
15
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidget.restype = c_void_p
|
|
16
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidget)
|
|
17
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
18
|
+
|
|
19
|
+
@dispatch
|
|
20
|
+
def __init__(self, text:str):
|
|
21
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetT.argtypes=[c_wchar_p]
|
|
22
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetT.restype = c_void_p
|
|
23
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetT,text)
|
|
24
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
25
|
+
|
|
26
|
+
@dispatch
|
|
27
|
+
def __init__(self, text:str,font:PdfFontBase):
|
|
28
|
+
ptrfont:c_void_p = font.Ptr
|
|
29
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTF.argtypes=[c_wchar_p,c_void_p]
|
|
30
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTF.restype = c_void_p
|
|
31
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTF,text,ptrfont)
|
|
32
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
33
|
+
|
|
34
|
+
@dispatch
|
|
35
|
+
def __init__(self, text:str,font:PdfFontBase,pen:PdfPen):
|
|
36
|
+
ptrfont:c_void_p = font.Ptr
|
|
37
|
+
ptrpen:c_void_p = pen.Ptr
|
|
38
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFP.argtypes=[c_wchar_p,c_void_p,c_void_p]
|
|
39
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFP.restype = c_void_p
|
|
40
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFP,text,ptrfont,ptrpen)
|
|
41
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
42
|
+
|
|
43
|
+
@dispatch
|
|
44
|
+
def __init__(self, text:str,font:PdfFontBase,brush:PdfBrush):
|
|
45
|
+
ptrfont:c_void_p = font.Ptr
|
|
46
|
+
ptrbrush:c_void_p = brush.Ptr
|
|
47
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFB.argtypes=[c_wchar_p,c_void_p,c_void_p]
|
|
48
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFB.restype = c_void_p
|
|
49
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFB,text,ptrfont,ptrbrush)
|
|
50
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
51
|
+
|
|
52
|
+
@dispatch
|
|
53
|
+
def __init__(self, text:str,font:PdfFontBase,pen:PdfPen,brush:PdfBrush,format:PdfStringFormat):
|
|
54
|
+
ptrfont:c_void_p = font.Ptr
|
|
55
|
+
ptrpen:c_void_p = pen.Ptr
|
|
56
|
+
ptrbrush:c_void_p = brush.Ptr
|
|
57
|
+
ptrformat:c_void_p = format.Ptr
|
|
58
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFPBF.argtypes=[c_wchar_p,c_void_p,c_void_p]
|
|
59
|
+
GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFPBF.restype = c_void_p
|
|
60
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_CreatePdfTextWidgetTFPBF,text,ptrfont,ptrpen,ptrbrush,ptrformat)
|
|
61
|
+
super(PdfTextWidget, self).__init__(intPtr)
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
|
|
65
|
+
def Text(self)->str:
|
|
66
|
+
"""
|
|
67
|
+
Gets or sets a value indicating the text that should be printed.
|
|
68
|
+
"""
|
|
69
|
+
GetDllLibPdf().PdfTextWidget_get_Text.argtypes=[c_void_p]
|
|
70
|
+
GetDllLibPdf().PdfTextWidget_get_Text.restype=c_void_p
|
|
71
|
+
ret = PtrToStr(CallCFunction(GetDllLibPdf().PdfTextWidget_get_Text,self.Ptr))
|
|
72
|
+
return ret
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@Text.setter
|
|
76
|
+
def Text(self, value:str):
|
|
77
|
+
GetDllLibPdf().PdfTextWidget_set_Text.argtypes=[c_void_p, c_wchar_p]
|
|
78
|
+
CallCFunction(GetDllLibPdf().PdfTextWidget_set_Text,self.Ptr, value)
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
|
|
82
|
+
def Pen(self)->'PdfPen':
|
|
83
|
+
"""
|
|
84
|
+
Gets or sets a pen that will be used to draw the text.
|
|
85
|
+
"""
|
|
86
|
+
GetDllLibPdf().PdfTextWidget_get_Pen.argtypes=[c_void_p]
|
|
87
|
+
GetDllLibPdf().PdfTextWidget_get_Pen.restype=c_void_p
|
|
88
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_get_Pen,self.Ptr)
|
|
89
|
+
ret = None if intPtr==None else PdfPen(intPtr)
|
|
90
|
+
return ret
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@Pen.setter
|
|
94
|
+
def Pen(self, value:'PdfPen'):
|
|
95
|
+
GetDllLibPdf().PdfTextWidget_set_Pen.argtypes=[c_void_p, c_void_p]
|
|
96
|
+
CallCFunction(GetDllLibPdf().PdfTextWidget_set_Pen,self.Ptr, value.Ptr)
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
|
|
100
|
+
def Brush(self)->'PdfBrush':
|
|
101
|
+
"""
|
|
102
|
+
Gets or sets the brush that will be used to draw the text.
|
|
103
|
+
"""
|
|
104
|
+
GetDllLibPdf().PdfTextWidget_get_Brush.argtypes=[c_void_p]
|
|
105
|
+
GetDllLibPdf().PdfTextWidget_get_Brush.restype=c_void_p
|
|
106
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_get_Brush,self.Ptr)
|
|
107
|
+
ret = None if intPtr==None else PdfBrush(intPtr)
|
|
108
|
+
return ret
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@Brush.setter
|
|
112
|
+
def Brush(self, value:'PdfBrush'):
|
|
113
|
+
GetDllLibPdf().PdfTextWidget_set_Brush.argtypes=[c_void_p, c_void_p]
|
|
114
|
+
CallCFunction(GetDllLibPdf().PdfTextWidget_set_Brush,self.Ptr, value.Ptr)
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
|
|
118
|
+
def Font(self)->'PdfFontBase':
|
|
119
|
+
"""
|
|
120
|
+
Gets or sets a font that will be used to draw the text.
|
|
121
|
+
"""
|
|
122
|
+
GetDllLibPdf().PdfTextWidget_get_Font.argtypes=[c_void_p]
|
|
123
|
+
GetDllLibPdf().PdfTextWidget_get_Font.restype=c_void_p
|
|
124
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_get_Font,self.Ptr)
|
|
125
|
+
ret = None if intPtr==None else PdfFontBase(intPtr)
|
|
126
|
+
return ret
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@Font.setter
|
|
130
|
+
def Font(self, value:'PdfFontBase'):
|
|
131
|
+
GetDllLibPdf().PdfTextWidget_set_Font.argtypes=[c_void_p, c_void_p]
|
|
132
|
+
CallCFunction(GetDllLibPdf().PdfTextWidget_set_Font,self.Ptr, value.Ptr)
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
|
|
136
|
+
def StringFormat(self)->'PdfStringFormat':
|
|
137
|
+
"""
|
|
138
|
+
Gets or sets text settings that will be used to draw the text.
|
|
139
|
+
"""
|
|
140
|
+
GetDllLibPdf().PdfTextWidget_get_StringFormat.argtypes=[c_void_p]
|
|
141
|
+
GetDllLibPdf().PdfTextWidget_get_StringFormat.restype=c_void_p
|
|
142
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_get_StringFormat,self.Ptr)
|
|
143
|
+
ret = None if intPtr==None else PdfStringFormat(intPtr)
|
|
144
|
+
return ret
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@StringFormat.setter
|
|
148
|
+
def StringFormat(self, value:'PdfStringFormat'):
|
|
149
|
+
GetDllLibPdf().PdfTextWidget_set_StringFormat.argtypes=[c_void_p, c_void_p]
|
|
150
|
+
CallCFunction(GetDllLibPdf().PdfTextWidget_set_StringFormat,self.Ptr, value.Ptr)
|
|
151
|
+
|
|
152
|
+
@dispatch
|
|
153
|
+
|
|
154
|
+
def Draw(self ,page,location:PointF,format:PdfTextLayout)->PdfTextLayoutResult:
|
|
155
|
+
"""
|
|
156
|
+
Draws the text on the page.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
page (PdfPageBase): Current page where the text should be drawn.
|
|
160
|
+
location (PointF): Start location on the page.
|
|
161
|
+
format (PdfTextLayout): Lay outing format.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
PdfTextLayoutResult: Lay outing result.
|
|
165
|
+
"""
|
|
166
|
+
intPtrpage:c_void_p = page.Ptr
|
|
167
|
+
intPtrlocation:c_void_p = location.Ptr
|
|
168
|
+
intPtrformat:c_void_p = format.Ptr
|
|
169
|
+
|
|
170
|
+
GetDllLibPdf().PdfTextWidget_Draw.argtypes=[c_void_p ,c_void_p,c_void_p,c_void_p]
|
|
171
|
+
GetDllLibPdf().PdfTextWidget_Draw.restype=c_void_p
|
|
172
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_Draw,self.Ptr, intPtrpage,intPtrlocation,intPtrformat)
|
|
173
|
+
ret = None if intPtr==None else PdfTextLayoutResult(intPtr)
|
|
174
|
+
return ret
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@dispatch
|
|
178
|
+
|
|
179
|
+
def Draw(self ,page,location:PointF,width:float,format:PdfTextLayout)->PdfTextLayoutResult:
|
|
180
|
+
"""
|
|
181
|
+
Draws the text on the page.
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
page (PdfPageBase): Current page where the text should be drawn.
|
|
185
|
+
location (PointF): Start location on the page.
|
|
186
|
+
width (float): Width of the text bounds.
|
|
187
|
+
format (PdfTextLayout): Lay outing format.
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
PdfTextLayoutResult: Lay outing result.
|
|
191
|
+
"""
|
|
192
|
+
intPtrpage:c_void_p = page.Ptr
|
|
193
|
+
intPtrlocation:c_void_p = location.Ptr
|
|
194
|
+
intPtrformat:c_void_p = format.Ptr
|
|
195
|
+
|
|
196
|
+
GetDllLibPdf().PdfTextWidget_DrawPLWF.argtypes=[c_void_p ,c_void_p,c_void_p,c_float,c_void_p]
|
|
197
|
+
GetDllLibPdf().PdfTextWidget_DrawPLWF.restype=c_void_p
|
|
198
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_DrawPLWF,self.Ptr, intPtrpage,intPtrlocation,width,intPtrformat)
|
|
199
|
+
ret = None if intPtr==None else PdfTextLayoutResult(intPtr)
|
|
200
|
+
return ret
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
@dispatch
|
|
204
|
+
|
|
205
|
+
def Draw(self ,page,layoutRectangle:RectangleF,format:PdfTextLayout)->PdfTextLayoutResult:
|
|
206
|
+
"""
|
|
207
|
+
Draws the text on the page.
|
|
208
|
+
|
|
209
|
+
Args:
|
|
210
|
+
page (PdfPageBase): Current page where the text should be drawn.
|
|
211
|
+
layoutRectangle (RectangleF): RectangleF structure that specifies the bounds of the text.
|
|
212
|
+
format (PdfTextLayout): Lay outing format.
|
|
213
|
+
|
|
214
|
+
Returns:
|
|
215
|
+
PdfTextLayoutResult: Lay outing result.
|
|
216
|
+
"""
|
|
217
|
+
intPtrpage:c_void_p = page.Ptr
|
|
218
|
+
intPtrlayoutRectangle:c_void_p = layoutRectangle.Ptr
|
|
219
|
+
intPtrformat:c_void_p = format.Ptr
|
|
220
|
+
|
|
221
|
+
GetDllLibPdf().PdfTextWidget_DrawPLF.argtypes=[c_void_p ,c_void_p,c_void_p,c_void_p]
|
|
222
|
+
GetDllLibPdf().PdfTextWidget_DrawPLF.restype=c_void_p
|
|
223
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTextWidget_DrawPLF,self.Ptr, intPtrpage,intPtrlayoutRectangle,intPtrformat)
|
|
224
|
+
ret = None if intPtr==None else PdfTextLayoutResult(intPtr)
|
|
225
|
+
return ret
|
|
226
|
+
|
|
227
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfTilingBrush(PdfBrush):
|
|
10
|
+
"""
|
|
11
|
+
Implements a colored tiling brush.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@dispatch
|
|
15
|
+
def __init__(self, rectangle: RectangleF):
|
|
16
|
+
"""
|
|
17
|
+
Initializes a new instance of the PdfTilingBrush class with the specified rectangle.
|
|
18
|
+
"""
|
|
19
|
+
ptrRec: c_void_p = rectangle.Ptr
|
|
20
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushR.argtypes = [c_void_p]
|
|
21
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushR.restype = c_void_p
|
|
22
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushR,ptrRec)
|
|
23
|
+
super(PdfTilingBrush, self).__init__(intPtr)
|
|
24
|
+
|
|
25
|
+
@dispatch
|
|
26
|
+
def __init__(self, rectangle: RectangleF, page):
|
|
27
|
+
"""
|
|
28
|
+
Initializes a new instance of the PdfTilingBrush class with the specified rectangle and page.
|
|
29
|
+
"""
|
|
30
|
+
ptrRec: c_void_p = rectangle.Ptr
|
|
31
|
+
ptrPage: c_void_p = page.Ptr
|
|
32
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushRP.argtypes = [c_void_p, c_void_p]
|
|
33
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushRP.restype = c_void_p
|
|
34
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushRP,ptrRec, ptrPage)
|
|
35
|
+
super(PdfTilingBrush, self).__init__(intPtr)
|
|
36
|
+
|
|
37
|
+
@dispatch
|
|
38
|
+
def __init__(self, size: SizeF):
|
|
39
|
+
"""
|
|
40
|
+
Initializes a new instance of the PdfTilingBrush class with the specified size.
|
|
41
|
+
"""
|
|
42
|
+
ptrSize: c_void_p = size.Ptr
|
|
43
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushS.argtypes = [c_void_p]
|
|
44
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushS.restype = c_void_p
|
|
45
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushS,ptrSize)
|
|
46
|
+
super(PdfTilingBrush, self).__init__(intPtr)
|
|
47
|
+
|
|
48
|
+
@dispatch
|
|
49
|
+
def __init__(self, size: SizeF, page):
|
|
50
|
+
"""
|
|
51
|
+
Initializes a new instance of the PdfTilingBrush class with the specified size and page.
|
|
52
|
+
"""
|
|
53
|
+
ptrSize: c_void_p = size.Ptr
|
|
54
|
+
ptrPage: c_void_p = page.Ptr
|
|
55
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushSP.argtypes = [c_void_p]
|
|
56
|
+
GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushSP.restype = c_void_p
|
|
57
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_CreatePdfTilingBrushSP,ptrSize, ptrPage)
|
|
58
|
+
super(PdfTilingBrush, self).__init__(intPtr)
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def Rectangle(self) -> 'RectangleF':
|
|
62
|
+
"""
|
|
63
|
+
Gets the boundary box of the smallest brush cell.
|
|
64
|
+
"""
|
|
65
|
+
GetDllLibPdf().PdfTilingBrush_get_Rectangle.argtypes = [c_void_p]
|
|
66
|
+
GetDllLibPdf().PdfTilingBrush_get_Rectangle.restype = c_void_p
|
|
67
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_get_Rectangle,self.Ptr)
|
|
68
|
+
ret = None if intPtr == None else RectangleF(intPtr)
|
|
69
|
+
return ret
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def Size(self) -> 'SizeF':
|
|
73
|
+
"""
|
|
74
|
+
Gets the size of the smallest brush cell.
|
|
75
|
+
"""
|
|
76
|
+
GetDllLibPdf().PdfTilingBrush_get_Size.argtypes = [c_void_p]
|
|
77
|
+
GetDllLibPdf().PdfTilingBrush_get_Size.restype = c_void_p
|
|
78
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_get_Size,self.Ptr)
|
|
79
|
+
ret = None if intPtr == None else SizeF(intPtr)
|
|
80
|
+
return ret
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def Graphics(self) -> 'PdfCanvas':
|
|
84
|
+
"""
|
|
85
|
+
Gets the Graphics context of the brush.
|
|
86
|
+
"""
|
|
87
|
+
GetDllLibPdf().PdfTilingBrush_get_Graphics.argtypes = [c_void_p]
|
|
88
|
+
GetDllLibPdf().PdfTilingBrush_get_Graphics.restype = c_void_p
|
|
89
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_get_Graphics,self.Ptr)
|
|
90
|
+
ret = None if intPtr == None else PdfCanvas(intPtr)
|
|
91
|
+
return ret
|
|
92
|
+
|
|
93
|
+
def Clone(self) -> 'PdfBrush':
|
|
94
|
+
"""
|
|
95
|
+
Creates a new copy of the brush.
|
|
96
|
+
Returns:
|
|
97
|
+
A new instance of the Brush class.
|
|
98
|
+
"""
|
|
99
|
+
GetDllLibPdf().PdfTilingBrush_Clone.argtypes = [c_void_p]
|
|
100
|
+
GetDllLibPdf().PdfTilingBrush_Clone.restype = c_void_p
|
|
101
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfTilingBrush_Clone,self.Ptr)
|
|
102
|
+
ret = None if intPtr == None else PdfBrush(intPtr)
|
|
103
|
+
return ret
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfToDocConverter(SpireObject):
|
|
10
|
+
"""
|
|
11
|
+
This class provides support for converting PDF into an XPS Document.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@dispatch
|
|
15
|
+
def __init__(self):
|
|
16
|
+
"""
|
|
17
|
+
Initializes a new instance of the PdfToDocConverter class.
|
|
18
|
+
"""
|
|
19
|
+
GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverter.restype = c_void_p
|
|
20
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverter)
|
|
21
|
+
super(PdfToDocConverter, self).__init__(intPtr)
|
|
22
|
+
|
|
23
|
+
@dispatch
|
|
24
|
+
def __init__(self, filePath: str):
|
|
25
|
+
"""
|
|
26
|
+
Initializes a new instance of the PdfToDocConverter class with the specified file path.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
filePath (str): The path of the PDF file.
|
|
30
|
+
"""
|
|
31
|
+
GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterF.argtypes = [c_wchar_p]
|
|
32
|
+
GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterF.restype = c_void_p
|
|
33
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterF,filePath)
|
|
34
|
+
super(PdfToDocConverter, self).__init__(intPtr)
|
|
35
|
+
|
|
36
|
+
@dispatch
|
|
37
|
+
def __init__(self, stream: Stream):
|
|
38
|
+
"""
|
|
39
|
+
Initializes a new instance of the PdfToDocConverter class with the specified stream.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
stream (Stream): The stream containing the PDF data.
|
|
43
|
+
"""
|
|
44
|
+
ptrStream: c_void_p = stream.Ptr
|
|
45
|
+
GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterS.argtypes = [c_void_p]
|
|
46
|
+
GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterS.restype = c_void_p
|
|
47
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToDocConverter_CreatePdfToDocConverterS,ptrStream)
|
|
48
|
+
super(PdfToDocConverter, self).__init__(intPtr)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def DocxOptions(self) -> 'DocxOptions':
|
|
52
|
+
"""
|
|
53
|
+
Gets or sets the options for converting to DOCX format.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
DocxOptions: The options for converting to DOCX format.
|
|
57
|
+
"""
|
|
58
|
+
GetDllLibPdf().PdfToDocConverter_get_DocxOptions.argtypes = [c_void_p]
|
|
59
|
+
GetDllLibPdf().PdfToDocConverter_get_DocxOptions.restype = c_void_p
|
|
60
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToDocConverter_get_DocxOptions,self.Ptr)
|
|
61
|
+
ret = None if intPtr == None else DocxOptions(intPtr)
|
|
62
|
+
return ret
|
|
63
|
+
|
|
64
|
+
@DocxOptions.setter
|
|
65
|
+
def DocxOptions(self, value: 'DocxOptions'):
|
|
66
|
+
"""
|
|
67
|
+
Sets the options for converting to DOCX format.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
value (DocxOptions): The options for converting to DOCX format.
|
|
71
|
+
"""
|
|
72
|
+
GetDllLibPdf().PdfToDocConverter_set_DocxOptions.argtypes = [c_void_p, c_void_p]
|
|
73
|
+
CallCFunction(GetDllLibPdf().PdfToDocConverter_set_DocxOptions,self.Ptr, value.Ptr)
|
|
74
|
+
|
|
75
|
+
@dispatch
|
|
76
|
+
def SaveToDocx(self, fileStream: Stream):
|
|
77
|
+
"""
|
|
78
|
+
Converts the PDF to a DOCX document and saves it to the specified file stream.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
fileStream (Stream): The output file stream.
|
|
82
|
+
"""
|
|
83
|
+
intPtrfileStream: c_void_p = fileStream.Ptr
|
|
84
|
+
|
|
85
|
+
GetDllLibPdf().PdfToDocConverter_SaveToDocx.argtypes = [c_void_p, c_void_p]
|
|
86
|
+
CallCFunction(GetDllLibPdf().PdfToDocConverter_SaveToDocx,self.Ptr, intPtrfileStream)
|
|
87
|
+
|
|
88
|
+
@dispatch
|
|
89
|
+
def SaveToDocx(self, fileStream: Stream, isDocx: bool):
|
|
90
|
+
"""
|
|
91
|
+
Converts the PDF to a DOCX document and saves it to the specified file stream.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
fileStream (Stream): The output file stream.
|
|
95
|
+
isDocx (bool): Indicates whether the output format is DOCX or DOC.
|
|
96
|
+
"""
|
|
97
|
+
intPtrfileStream: c_void_p = fileStream.Ptr
|
|
98
|
+
|
|
99
|
+
GetDllLibPdf().PdfToDocConverter_SaveToDocxFI.argtypes = [c_void_p, c_void_p, c_bool]
|
|
100
|
+
CallCFunction(GetDllLibPdf().PdfToDocConverter_SaveToDocxFI,self.Ptr, intPtrfileStream, isDocx)
|
|
101
|
+
|
|
102
|
+
@dispatch
|
|
103
|
+
def SaveToDocx(self, filename: str):
|
|
104
|
+
"""
|
|
105
|
+
Converts the PDF to a DOCX document and saves it to the specified file name.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
filename (str): The output file name.
|
|
109
|
+
"""
|
|
110
|
+
GetDllLibPdf().PdfToDocConverter_SaveToDocxF.argtypes = [c_void_p, c_wchar_p]
|
|
111
|
+
CallCFunction(GetDllLibPdf().PdfToDocConverter_SaveToDocxF,self.Ptr, filename)
|
|
112
|
+
|
|
113
|
+
@dispatch
|
|
114
|
+
def SaveToDocx(self, filename: str, isDocx: bool):
|
|
115
|
+
"""
|
|
116
|
+
Converts the PDF to a DOCX document and saves it to the specified file name.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
filename (str): The output file name.
|
|
120
|
+
isDocx (bool): Indicates whether the output format is DOCX or DOC.
|
|
121
|
+
"""
|
|
122
|
+
GetDllLibPdf().PdfToDocConverter_SaveToDocxFI1.argtypes = [c_void_p, c_wchar_p, c_bool]
|
|
123
|
+
CallCFunction(GetDllLibPdf().PdfToDocConverter_SaveToDocxFI1,self.Ptr, filename, isDocx)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfToHtmlParameter(SpireObject):
|
|
10
|
+
"""
|
|
11
|
+
Pdf to html Set Parameter
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def SplitHtmlNumber(self) -> int:
|
|
16
|
+
"""
|
|
17
|
+
In 1000 The Split Page, default 1000
|
|
18
|
+
"""
|
|
19
|
+
GetDllLibPdf().PdfToHtmlParameter_get_SplitHtmlNumber.argtypes = [c_void_p]
|
|
20
|
+
GetDllLibPdf().PdfToHtmlParameter_get_SplitHtmlNumber.restype = c_int
|
|
21
|
+
ret = CallCFunction(GetDllLibPdf().PdfToHtmlParameter_get_SplitHtmlNumber,self.Ptr)
|
|
22
|
+
return ret
|
|
23
|
+
|
|
24
|
+
@SplitHtmlNumber.setter
|
|
25
|
+
def SplitHtmlNumber(self, value: int):
|
|
26
|
+
"""
|
|
27
|
+
Set the Split Page number
|
|
28
|
+
"""
|
|
29
|
+
GetDllLibPdf().PdfToHtmlParameter_set_SplitHtmlNumber.argtypes = [c_void_p, c_int]
|
|
30
|
+
CallCFunction(GetDllLibPdf().PdfToHtmlParameter_set_SplitHtmlNumber,self.Ptr, value)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def IsEmbedImage(self) -> bool:
|
|
34
|
+
"""
|
|
35
|
+
Whether to embed image
|
|
36
|
+
"""
|
|
37
|
+
GetDllLibPdf().PdfToHtmlParameter_get_IsEmbedImage.argtypes = [c_void_p]
|
|
38
|
+
GetDllLibPdf().PdfToHtmlParameter_get_IsEmbedImage.restype = c_bool
|
|
39
|
+
ret = CallCFunction(GetDllLibPdf().PdfToHtmlParameter_get_IsEmbedImage,self.Ptr)
|
|
40
|
+
return ret
|
|
41
|
+
|
|
42
|
+
@IsEmbedImage.setter
|
|
43
|
+
def IsEmbedImage(self, value: bool):
|
|
44
|
+
"""
|
|
45
|
+
Set whether to embed image
|
|
46
|
+
"""
|
|
47
|
+
GetDllLibPdf().PdfToHtmlParameter_set_IsEmbedImage.argtypes = [c_void_p, c_bool]
|
|
48
|
+
CallCFunction(GetDllLibPdf().PdfToHtmlParameter_set_IsEmbedImage,self.Ptr, value)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfToLinearizedPdfConverter(SpireObject):
|
|
10
|
+
@dispatch
|
|
11
|
+
def __init__(self, filePath: str):
|
|
12
|
+
"""
|
|
13
|
+
Initializes a new instance of the PdfToLinearizedPdfConverter class with the specified file path.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
filePath: The file path of the PDF document.
|
|
17
|
+
"""
|
|
18
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterF.argtypes = [c_wchar_p]
|
|
19
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterF.restype = c_void_p
|
|
20
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterF,filePath)
|
|
21
|
+
super(PdfToLinearizedPdfConverter, self).__init__(intPtr)
|
|
22
|
+
|
|
23
|
+
@dispatch
|
|
24
|
+
def __init__(self, stream: Stream):
|
|
25
|
+
"""
|
|
26
|
+
Initializes a new instance of the PdfToLinearizedPdfConverter class with the specified stream.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
stream: The stream of the PDF document.
|
|
30
|
+
"""
|
|
31
|
+
ptrStream: c_void_p = stream.Ptr
|
|
32
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterS.argtypes = [c_void_p]
|
|
33
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterS.restype = c_void_p
|
|
34
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToLinearizedPdfConverter_CreatePdfToLinearizedPdfConverterS,ptrStream)
|
|
35
|
+
super(PdfToLinearizedPdfConverter, self).__init__(intPtr)
|
|
36
|
+
|
|
37
|
+
@dispatch
|
|
38
|
+
def ToLinearizedPdf(self, filePath: str):
|
|
39
|
+
"""
|
|
40
|
+
Convert the PDF document to a linearized PDF document and save it to the specified file path.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
filePath: The output file path.
|
|
44
|
+
"""
|
|
45
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_ToLinearizedPdf.argtypes = [c_void_p, c_wchar_p]
|
|
46
|
+
CallCFunction(GetDllLibPdf().PdfToLinearizedPdfConverter_ToLinearizedPdf,self.Ptr, filePath)
|
|
47
|
+
@dispatch
|
|
48
|
+
def ToLinearizedPdf(self, stream: Stream):
|
|
49
|
+
"""
|
|
50
|
+
Convert the PDF document to a linearized PDF document and save it to the specified stream.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
stream: The output stream.
|
|
54
|
+
"""
|
|
55
|
+
intPtrstream: c_void_p = stream.Ptr
|
|
56
|
+
|
|
57
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_ToLinearizedPdfS.argtypes = [c_void_p, c_void_p]
|
|
58
|
+
CallCFunction(GetDllLibPdf().PdfToLinearizedPdfConverter_ToLinearizedPdfS,self.Ptr, intPtrstream)
|
|
59
|
+
|
|
60
|
+
def Dispose(self):
|
|
61
|
+
"""
|
|
62
|
+
Dispose the PdfToLinearizedPdfConverter object.
|
|
63
|
+
"""
|
|
64
|
+
GetDllLibPdf().PdfToLinearizedPdfConverter_Dispose.argtypes = [c_void_p]
|
|
65
|
+
CallCFunction(GetDllLibPdf().PdfToLinearizedPdfConverter_Dispose,self.Ptr)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfToWordConverter(SpireObject):
|
|
10
|
+
"""
|
|
11
|
+
This class provides support for converting a pdf document to a word document.
|
|
12
|
+
"""
|
|
13
|
+
@dispatch
|
|
14
|
+
def __init__(self, filePath: str):
|
|
15
|
+
"""
|
|
16
|
+
Initializes a new instance of the PdfToWordConverter class with the specified file path.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
filePath (str): The path of the PDF file.
|
|
20
|
+
"""
|
|
21
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterF.argtypes = [c_wchar_p]
|
|
22
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterF.restype = c_void_p
|
|
23
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterF,filePath)
|
|
24
|
+
super(PdfToWordConverter, self).__init__(intPtr)
|
|
25
|
+
|
|
26
|
+
@dispatch
|
|
27
|
+
def __init__(self, filePath: str, password:str):
|
|
28
|
+
"""
|
|
29
|
+
Initializes a new instance of the PdfToWordConverter class with the specified file path and file password.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
filePath (str): The path of the PDF file.
|
|
33
|
+
password (str): The pdf document password.
|
|
34
|
+
"""
|
|
35
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterFP.argtypes = [c_wchar_p,c_wchar_p]
|
|
36
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterFP.restype = c_void_p
|
|
37
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterFP,filePath,password)
|
|
38
|
+
super(PdfToWordConverter, self).__init__(intPtr)
|
|
39
|
+
|
|
40
|
+
@dispatch
|
|
41
|
+
def __init__(self, stream: Stream):
|
|
42
|
+
"""
|
|
43
|
+
Initializes a new instance of the PdfToWordConverter class with the specified stream.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
stream (Stream): The stream containing the PDF data.
|
|
47
|
+
"""
|
|
48
|
+
ptrStream: c_void_p = stream.Ptr
|
|
49
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterS.argtypes = [c_void_p]
|
|
50
|
+
GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterS.restype = c_void_p
|
|
51
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToWordConverter_CreatePdfToWordConverterS,ptrStream)
|
|
52
|
+
super(PdfToWordConverter, self).__init__(intPtr)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def ConvertOptions(self) -> 'PdfConvertOptions':
|
|
56
|
+
"""
|
|
57
|
+
Gets Parameters for the converter.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
ConvertOptions: Parameters for the converter.
|
|
61
|
+
"""
|
|
62
|
+
GetDllLibPdf().PdfToWordConverter_get_ConvertOptions.argtypes = [c_void_p]
|
|
63
|
+
GetDllLibPdf().PdfToWordConverter_get_ConvertOptions.restype = c_void_p
|
|
64
|
+
intPtr = CallCFunction(GetDllLibPdf().PdfToWordConverter_get_ConvertOptions,self.Ptr)
|
|
65
|
+
ret = None if intPtr == None else PdfConvertOptions(intPtr)
|
|
66
|
+
return ret
|
|
67
|
+
|
|
68
|
+
@dispatch
|
|
69
|
+
def SaveToDocx(self, fileStream: Stream):
|
|
70
|
+
"""
|
|
71
|
+
Convert to word document,the extension is docx
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
fileStream (Stream): The output file stream.
|
|
75
|
+
"""
|
|
76
|
+
intPtrfileStream: c_void_p = fileStream.Ptr
|
|
77
|
+
|
|
78
|
+
GetDllLibPdf().PdfToWordConverter_SaveToDocx.argtypes = [c_void_p, c_void_p]
|
|
79
|
+
CallCFunction(GetDllLibPdf().PdfToWordConverter_SaveToDocx,self.Ptr, intPtrfileStream)
|
|
80
|
+
|
|
81
|
+
@dispatch
|
|
82
|
+
def SaveToDocx(self, filename: str):
|
|
83
|
+
"""
|
|
84
|
+
Convert to word document,the extension is docx
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
filename (str): The output file name.
|
|
88
|
+
"""
|
|
89
|
+
GetDllLibPdf().PdfToWordConverter_SaveToDocxF.argtypes = [c_void_p, c_wchar_p]
|
|
90
|
+
CallCFunction(GetDllLibPdf().PdfToWordConverter_SaveToDocxF,self.Ptr, filename)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar, Union, Generic, List, Tuple
|
|
4
|
+
from spire.pdf.common import *
|
|
5
|
+
from spire.pdf import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
class PdfTransitionDimension(Enum):
|
|
10
|
+
"""
|
|
11
|
+
Enumeration of transition dimensions.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
Horizontal: Represents the horizontal dimension.
|
|
15
|
+
Vertical: Represents the vertical dimension.
|
|
16
|
+
"""
|
|
17
|
+
Horizontal = 0
|
|
18
|
+
Vertical = 1
|