aspose-html-net 25.6.0__py3-none-win_amd64.whl → 25.8.0__py3-none-win_amd64.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.
Files changed (31) hide show
  1. aspose/assemblies/html/Aspose.HTML.dll +0 -0
  2. aspose/assemblies/html/WrpInterop.Aspose.Html.dll +0 -0
  3. aspose/html/__init__.pyi +3367 -2025
  4. aspose/html/collections/__init__.pyi +4 -4
  5. aspose/html/dom/__init__.pyi +778 -404
  6. aspose/html/dom/canvas/__init__.pyi +2 -2
  7. aspose/html/dom/css/__init__.pyi +12 -11
  8. aspose/html/dom/events/__init__.pyi +20 -20
  9. aspose/html/dom/mutations/__init__.pyi +4 -4
  10. aspose/html/dom/svg/__init__.pyi +2769 -1635
  11. aspose/html/dom/svg/datatypes/__init__.pyi +52 -52
  12. aspose/html/dom/svg/events/__init__.pyi +4 -4
  13. aspose/html/dom/svg/filters/__init__.pyi +1375 -825
  14. aspose/html/dom/svg/paths/__init__.pyi +42 -42
  15. aspose/html/dom/svg/saving/__init__.pyi +23 -0
  16. aspose/html/rendering/__init__.pyi +8 -0
  17. aspose/html/window/__init__.pyi +18 -7
  18. aspose/html.cp310-win_amd64.pyd +0 -0
  19. aspose/html.cp311-win_amd64.pyd +0 -0
  20. aspose/html.cp313-win_amd64.pyd +0 -0
  21. aspose/html.cp35-win_amd64.pyd +0 -0
  22. aspose/html.cp36-win_amd64.pyd +0 -0
  23. aspose/html.cp37-win_amd64.pyd +0 -0
  24. aspose/html.cp38-win_amd64.pyd +0 -0
  25. aspose/html.cp39-win_amd64.pyd +0 -0
  26. aspose_html_net-25.8.0.dist-info/METADATA +224 -0
  27. {aspose_html_net-25.6.0.dist-info → aspose_html_net-25.8.0.dist-info}/RECORD +30 -30
  28. aspose_html_net-25.6.0.dist-info/METADATA +0 -114
  29. {aspose_html_net-25.6.0.dist-info → aspose_html_net-25.8.0.dist-info}/WHEEL +0 -0
  30. {aspose_html_net-25.6.0.dist-info → aspose_html_net-25.8.0.dist-info}/entry_points.txt +0 -0
  31. {aspose_html_net-25.6.0.dist-info → aspose_html_net-25.8.0.dist-info}/top_level.txt +0 -0
@@ -70,9 +70,9 @@ class SVGPathSeg(aspose.html.dom.svg.datatypes.SVGValueType):
70
70
  '''The SVGPathSeg interface is a base interface that corresponds to a single command within a path data specification.'''
71
71
 
72
72
  def get_platform_type(self) -> Type:
73
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
73
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
74
74
 
75
- :returns: The ECMAScript object :py:class:`System.Type`.'''
75
+ :returns: The ECMAScript object.'''
76
76
  ...
77
77
 
78
78
  @property
@@ -209,9 +209,9 @@ class SVGPathSegArcAbs(SVGPathSeg):
209
209
  '''The SVGPathSegArcAbs interface corresponds to an "absolute arcto" (A) path data command.'''
210
210
 
211
211
  def get_platform_type(self) -> Type:
212
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
212
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
213
213
 
214
- :returns: The ECMAScript object :py:class:`System.Type`.'''
214
+ :returns: The ECMAScript object.'''
215
215
  ...
216
216
 
217
217
  @property
@@ -414,9 +414,9 @@ class SVGPathSegArcRel(SVGPathSeg):
414
414
  '''The SVGPathSegArcRel interface corresponds to a "relative arcto" (a) path data command.'''
415
415
 
416
416
  def get_platform_type(self) -> Type:
417
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
417
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
418
418
 
419
- :returns: The ECMAScript object :py:class:`System.Type`.'''
419
+ :returns: The ECMAScript object.'''
420
420
  ...
421
421
 
422
422
  @property
@@ -619,9 +619,9 @@ class SVGPathSegClosePath(SVGPathSeg):
619
619
  '''he SVGPathSegClosePath interface corresponds to a "closepath" (z) path data command.'''
620
620
 
621
621
  def get_platform_type(self) -> Type:
622
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
622
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
623
623
 
624
- :returns: The ECMAScript object :py:class:`System.Type`.'''
624
+ :returns: The ECMAScript object.'''
625
625
  ...
626
626
 
627
627
  @property
@@ -758,9 +758,9 @@ class SVGPathSegCurvetoCubicAbs(SVGPathSeg):
758
758
  '''The SVGPathSegCurvetoCubicAbs interface corresponds to an "absolute cubic Bézier curveto" (C) path data command.'''
759
759
 
760
760
  def get_platform_type(self) -> Type:
761
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
761
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
762
762
 
763
- :returns: The ECMAScript object :py:class:`System.Type`.'''
763
+ :returns: The ECMAScript object.'''
764
764
  ...
765
765
 
766
766
  @property
@@ -957,9 +957,9 @@ class SVGPathSegCurvetoCubicRel(SVGPathSeg):
957
957
  '''The SVGPathSegCurvetoCubicRel interface corresponds to a "relative cubic Bézier curveto" (c) path data command.'''
958
958
 
959
959
  def get_platform_type(self) -> Type:
960
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
960
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
961
961
 
962
- :returns: The ECMAScript object :py:class:`System.Type`.'''
962
+ :returns: The ECMAScript object.'''
963
963
  ...
964
964
 
965
965
  @property
@@ -1156,9 +1156,9 @@ class SVGPathSegCurvetoCubicSmoothAbs(SVGPathSeg):
1156
1156
  '''The SVGPathSegCurvetoCubicSmoothAbs interface corresponds to an "absolute smooth cubic curveto" (S) path data command.'''
1157
1157
 
1158
1158
  def get_platform_type(self) -> Type:
1159
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
1159
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
1160
1160
 
1161
- :returns: The ECMAScript object :py:class:`System.Type`.'''
1161
+ :returns: The ECMAScript object.'''
1162
1162
  ...
1163
1163
 
1164
1164
  @property
@@ -1335,9 +1335,9 @@ class SVGPathSegCurvetoCubicSmoothRel(SVGPathSeg):
1335
1335
  '''The SVGPathSegCurvetoCubicSmoothRel interface corresponds to a "relative smooth cubic curveto" (s) path data command.'''
1336
1336
 
1337
1337
  def get_platform_type(self) -> Type:
1338
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
1338
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
1339
1339
 
1340
- :returns: The ECMAScript object :py:class:`System.Type`.'''
1340
+ :returns: The ECMAScript object.'''
1341
1341
  ...
1342
1342
 
1343
1343
  @property
@@ -1514,9 +1514,9 @@ class SVGPathSegCurvetoQuadraticAbs(SVGPathSeg):
1514
1514
  '''The SVGPathSegCurvetoQuadraticAbs interface corresponds to an "absolute quadratic Bézier curveto" (Q) path data command.'''
1515
1515
 
1516
1516
  def get_platform_type(self) -> Type:
1517
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
1517
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
1518
1518
 
1519
- :returns: The ECMAScript object :py:class:`System.Type`.'''
1519
+ :returns: The ECMAScript object.'''
1520
1520
  ...
1521
1521
 
1522
1522
  @property
@@ -1693,9 +1693,9 @@ class SVGPathSegCurvetoQuadraticRel(SVGPathSeg):
1693
1693
  '''The SVGPathSegCurvetoQuadraticRel interface corresponds to a "relative quadratic Bézier curveto" (q) path data command.'''
1694
1694
 
1695
1695
  def get_platform_type(self) -> Type:
1696
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
1696
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
1697
1697
 
1698
- :returns: The ECMAScript object :py:class:`System.Type`.'''
1698
+ :returns: The ECMAScript object.'''
1699
1699
  ...
1700
1700
 
1701
1701
  @property
@@ -1872,9 +1872,9 @@ class SVGPathSegCurvetoQuadraticSmoothAbs(SVGPathSeg):
1872
1872
  '''The SVGPathSegCurvetoQuadraticSmoothAbs interface corresponds to an "absolute smooth cubic curveto" (T) path data command.'''
1873
1873
 
1874
1874
  def get_platform_type(self) -> Type:
1875
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
1875
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
1876
1876
 
1877
- :returns: The ECMAScript object :py:class:`System.Type`.'''
1877
+ :returns: The ECMAScript object.'''
1878
1878
  ...
1879
1879
 
1880
1880
  @property
@@ -2031,9 +2031,9 @@ class SVGPathSegCurvetoQuadraticSmoothRel(SVGPathSeg):
2031
2031
  '''The SVGPathSegCurvetoQuadraticSmoothRel interface corresponds to a "relative smooth cubic curveto" (t) path data command.'''
2032
2032
 
2033
2033
  def get_platform_type(self) -> Type:
2034
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2034
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2035
2035
 
2036
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2036
+ :returns: The ECMAScript object.'''
2037
2037
  ...
2038
2038
 
2039
2039
  @property
@@ -2190,9 +2190,9 @@ class SVGPathSegLinetoAbs(SVGPathSeg):
2190
2190
  '''The SVGPathSegLinetoAbs interface corresponds to an "absolute lineto" (L) path data command.'''
2191
2191
 
2192
2192
  def get_platform_type(self) -> Type:
2193
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2193
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2194
2194
 
2195
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2195
+ :returns: The ECMAScript object.'''
2196
2196
  ...
2197
2197
 
2198
2198
  @property
@@ -2349,9 +2349,9 @@ class SVGPathSegLinetoHorizontalAbs(SVGPathSeg):
2349
2349
  '''The SVGPathSegLinetoHorizontalAbs interface corresponds to an "absolute horizontal lineto" (H) path data command.'''
2350
2350
 
2351
2351
  def get_platform_type(self) -> Type:
2352
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2352
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2353
2353
 
2354
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2354
+ :returns: The ECMAScript object.'''
2355
2355
  ...
2356
2356
 
2357
2357
  @property
@@ -2498,9 +2498,9 @@ class SVGPathSegLinetoHorizontalRel(SVGPathSeg):
2498
2498
  '''The SVGPathSegLinetoHorizontalRel interface corresponds to a "relative horizontal lineto" (h) path data command.'''
2499
2499
 
2500
2500
  def get_platform_type(self) -> Type:
2501
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2501
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2502
2502
 
2503
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2503
+ :returns: The ECMAScript object.'''
2504
2504
  ...
2505
2505
 
2506
2506
  @property
@@ -2647,9 +2647,9 @@ class SVGPathSegLinetoRel(SVGPathSeg):
2647
2647
  '''The SVGPathSegLinetoRel interface corresponds to a "relative lineto" (l) path data command.'''
2648
2648
 
2649
2649
  def get_platform_type(self) -> Type:
2650
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2650
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2651
2651
 
2652
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2652
+ :returns: The ECMAScript object.'''
2653
2653
  ...
2654
2654
 
2655
2655
  @property
@@ -2806,9 +2806,9 @@ class SVGPathSegLinetoVerticalAbs(SVGPathSeg):
2806
2806
  '''The SVGPathSegLinetoVerticalAbs interface corresponds to an "absolute vertical lineto" (V) path data command.'''
2807
2807
 
2808
2808
  def get_platform_type(self) -> Type:
2809
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2809
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2810
2810
 
2811
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2811
+ :returns: The ECMAScript object.'''
2812
2812
  ...
2813
2813
 
2814
2814
  @property
@@ -2955,9 +2955,9 @@ class SVGPathSegLinetoVerticalRel(SVGPathSeg):
2955
2955
  '''The SVGPathSegLinetoVerticalRel interface corresponds to a "relative vertical lineto" (v) path data command.'''
2956
2956
 
2957
2957
  def get_platform_type(self) -> Type:
2958
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
2958
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
2959
2959
 
2960
- :returns: The ECMAScript object :py:class:`System.Type`.'''
2960
+ :returns: The ECMAScript object.'''
2961
2961
  ...
2962
2962
 
2963
2963
  @property
@@ -3104,9 +3104,9 @@ class SVGPathSegList(aspose.html.dom.svg.datatypes.SVGValueType):
3104
3104
  '''This interface defines a list of SVGPathSeg objects.'''
3105
3105
 
3106
3106
  def get_platform_type(self) -> Type:
3107
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
3107
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
3108
3108
 
3109
- :returns: The ECMAScript object :py:class:`System.Type`.'''
3109
+ :returns: The ECMAScript object.'''
3110
3110
  ...
3111
3111
 
3112
3112
  def clear(self):
@@ -3150,9 +3150,9 @@ class SVGPathSegMovetoAbs(SVGPathSeg):
3150
3150
  '''The SVGPathSegMovetoAbs interface corresponds to an "absolute moveto" (M) path data command.'''
3151
3151
 
3152
3152
  def get_platform_type(self) -> Type:
3153
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
3153
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
3154
3154
 
3155
- :returns: The ECMAScript object :py:class:`System.Type`.'''
3155
+ :returns: The ECMAScript object.'''
3156
3156
  ...
3157
3157
 
3158
3158
  @property
@@ -3309,9 +3309,9 @@ class SVGPathSegMovetoRel(SVGPathSeg):
3309
3309
  '''The SVGPathSegMovetoRel interface corresponds to a "relative moveto" (m) path data command.'''
3310
3310
 
3311
3311
  def get_platform_type(self) -> Type:
3312
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
3312
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
3313
3313
 
3314
- :returns: The ECMAScript object :py:class:`System.Type`.'''
3314
+ :returns: The ECMAScript object.'''
3315
3315
  ...
3316
3316
 
3317
3317
  @property
@@ -70,6 +70,23 @@ class SVGSaveOptions(aspose.html.saving.SaveOptions):
70
70
 
71
71
  ...
72
72
 
73
+ class SVGZSaveOptions(aspose.html.saving.SaveOptions):
74
+ '''Represents SVGZ save options.'''
75
+
76
+ @property
77
+ def resource_handling_options(self) -> aspose.html.saving.ResourceHandlingOptions:
78
+ ...
79
+
80
+ @property
81
+ def vectorize_text(self) -> bool:
82
+ ...
83
+
84
+ @vectorize_text.setter
85
+ def vectorize_text(self, value : bool):
86
+ ...
87
+
88
+ ...
89
+
73
90
  class SVGSaveFormat:
74
91
  '''Specifies format in which document is saved.'''
75
92
 
@@ -79,5 +96,11 @@ class SVGSaveFormat:
79
96
  '''Document will be saved as SVG.'''
80
97
  ...
81
98
 
99
+ @classmethod
100
+ @property
101
+ def SVGZ(cls) -> SVGSaveFormat:
102
+ '''Document will be saved as SVGZ.'''
103
+ ...
104
+
82
105
  ...
83
106
 
@@ -533,6 +533,14 @@ class PageSetup:
533
533
  def adjust_to_widest_page(self, value : bool):
534
534
  ...
535
535
 
536
+ @property
537
+ def scale_limit(self) -> float:
538
+ ...
539
+
540
+ @scale_limit.setter
541
+ def scale_limit(self, value : float):
542
+ ...
543
+
536
544
  @property
537
545
  def left_page(self) -> aspose.html.drawing.Page:
538
546
  ...
@@ -271,9 +271,9 @@ class Location(aspose.html.dom.DOMObject):
271
271
  '''Location objects provide a representation of the address of the active document of their Document's browsing context, and allow the current entry of the browsing context's session history to be changed, by adding or replacing entries in the history object.'''
272
272
 
273
273
  def get_platform_type(self) -> Type:
274
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
274
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
275
275
 
276
- :returns: The ECMAScript object :py:class:`System.Type`.'''
276
+ :returns: The ECMAScript object.'''
277
277
  ...
278
278
 
279
279
  def assign(self, url : str):
@@ -402,7 +402,11 @@ class MediaQueryList(aspose.html.dom.EventTarget):
402
402
 
403
403
  @overload
404
404
  def add_event_listener(self, type : str, listener : aspose.html.dom.events.IEventListener):
405
- '''This method allows the registration of event listeners on the event target.
405
+ '''Sets up a function that will be called whenever the specified event is delivered to the target.
406
+
407
+ It works by adding a function, or an object that implements :py:class:`aspose.html.dom.events.IEventListener`,
408
+ to the list of event listeners for the specified event type on the :py:class:`aspose.html.dom.EventTarget` on which it's called.
409
+ If the function or object, is already in the list of event listeners for this target, they are not added a second time.
406
410
 
407
411
  :param type: The event type for which the user is registering
408
412
  :param listener: Takes an interface implemented by the user which contains the methods to be called when the event occurs.'''
@@ -410,7 +414,11 @@ class MediaQueryList(aspose.html.dom.EventTarget):
410
414
 
411
415
  @overload
412
416
  def add_event_listener(self, type : str, listener : aspose.html.dom.events.IEventListener, use_capture : bool):
413
- '''This method allows the registration of event listeners on the event target.
417
+ '''Sets up a function that will be called whenever the specified event is delivered to the target.
418
+
419
+ It works by adding a function, or an object that implements :py:class:`aspose.html.dom.events.IEventListener`,
420
+ to the list of event listeners for the specified event type on the :py:class:`aspose.html.dom.EventTarget` on which it's called.
421
+ If the function or object, is already in the list of event listeners for this target, they are not added a second time.
414
422
 
415
423
  :param type: The event type for which the user is registering
416
424
  :param listener: Takes an interface implemented by the user which contains the methods to be called when the event occurs.
@@ -445,13 +453,16 @@ class MediaQueryList(aspose.html.dom.EventTarget):
445
453
  ...
446
454
 
447
455
  def get_platform_type(self) -> Type:
448
- '''This method is used to retrieve ECMAScript object :py:class:`System.Type`.
456
+ '''This method is used to retrieve the ECMAScript object :py:class:`System.Type`.
449
457
 
450
- :returns: The ECMAScript object :py:class:`System.Type`.'''
458
+ :returns: The ECMAScript object.'''
451
459
  ...
452
460
 
453
461
  def dispatch_event(self, event : aspose.html.dom.events.Event) -> bool:
454
- '''This method allows the dispatch of events into the implementations event model.
462
+ '''Dispatches an Event at the specified :py:class:`aspose.html.dom.events.IEventTarget`, (synchronously) invoking
463
+ the affected EventListeners in the appropriate order.
464
+ The normal event processing rules (including the capturing and optional bubbling phase) also apply to events
465
+ dispatched manually with :py:func:`aspose.html.dom.events.IEventTarget.dispatch_event`.
455
466
 
456
467
  :param event: Specifies the event type, behavior, and contextual information to be used in processing the event.
457
468
  :returns: The return value of :py:func:`aspose.html.dom.EventTarget.dispatch_event` indicates whether any of the listeners which handled the event called :py:func:`aspose.html.dom.events.Event.prevent_default`.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.1
2
+ Name: aspose-html-net
3
+ Version: 25.8.0
4
+ Summary: Aspose.HTML for Python via .NET is a powerful API for Python that provides a headless browser functionality, allowing you to work with HTML documents in a variety of ways. With this API, you can easily create new HTML documents or open existing ones from different sources. Once you have the document, you can perform various manipulation operations, such as removing and replacing HTML nodes.
5
+ Home-page: https://products.aspose.com/html/python-net/
6
+ Author: Aspose
7
+ License: UNKNOWN
8
+ Project-URL: Docs, https://docs.aspose.com/html/python-net/
9
+ Project-URL: Release Notes, https://releases.aspose.com/html/python-net/release-notes/2025/aspose-html-for-python-via-dotnet-25-8-release-notes/
10
+ Project-URL: Demos, https://products.aspose.app/html/applications
11
+ Project-URL: API Reference, https://reference.aspose.com/html/python-net/
12
+ Project-URL: Examples, https://github.com/aspose-html/
13
+ Project-URL: Blog, https://blog.aspose.com/category/html/
14
+ Project-URL: Free Support, https://forum.aspose.com/c/html/29
15
+ Project-URL: Temporary License, https://purchase.aspose.com/temporary-license
16
+ Keywords: Aspose,Aspose.HTML,Aspose.Total,Python,Component,Conholdate,Conholdate.Total,convert,converter,vectorization,vectorizer,vectorize,encoding,base64,css,DOM,dom-manipulation,image,JPEG,Library,Microsoft,mvc,net-standard,netcore,netstandard,to PDF,PNG,rotate,security,Standard,XPath,XPS,SVG,Windows,Vector Graphics,line,Bezier Curves,Cubic,Glyphs,Paths,Text,Scaling,Rotation,Skewing,Fill,Dots,Bitmap,HTML,HTML-to-Image,HTML-to-PDF,HTML-to-XPS,HTML-to-DOCX,HTML-to-MHTML,HTML-to-Markdown,HTML-to-MD,EPUB-to-Image,EPUB-to-PDF,EPUB-to-XPS,Markdown-to-HTML,MD-to-HTML,HTML-Template,HTML-Converter,HTML-Renderer,SVG-Renderer,MHTML-Renderer,EPUB-Renderer,HTML5,HTML5-Canvas,HTML-DOM,HTML-Form-Editor,HTML,XHTML,MHTML,EPUB,SVG,MD,Markdown,DOCX,PDF,XPS,TIFF,JPEG,JPG,PNG,BMP,GIF,WEBP,eBook-API,Headless-Browser,Document-Manipulation,Web-Scraping,Conversion,Crawler,Hypertext,Markup,XPath,Spider,CSS,CSS3,Converter,DOM,Convert,Azure,parse,render,image,graphics,to HTML-code,XHTML-to-PDF,MHTML-to-PDF,HTML-to-GIF,MHTML-to-JPG
17
+ Platform: win_amd64
18
+ Classifier: Operating System :: Microsoft :: Windows
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: License :: Other/Proprietary License
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Topic :: Software Development :: Libraries
29
+ Classifier: Topic :: Office/Business
30
+ Classifier: Topic :: Office/Business :: Scheduling
31
+ Requires-Python: >=3.5,<3.14
32
+ Description-Content-Type: text/markdown
33
+
34
+ # Process & Manipulate HTML via Python API
35
+
36
+ <!--- banner links to [Temporary License](https://purchase.aspose.com/temporary-license) -->
37
+ [![banner](https://products.aspose.com/html/images/aspose_html-for-python-banner-TL.png)](https://purchase.aspose.com/temporary-license)
38
+
39
+ [Product Page](https://products.aspose.com/html/python-net/) | [Docs](https://docs.aspose.com/html/python-net/) | [Demos](https://products.aspose.app/html/applications) | [API Reference](https://reference.aspose.com/html/python-net/) | [Examples](https://github.com/aspose-html/) | [Blog](https://blog.aspose.com/categories/aspose.html-product-family/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/html/29)
40
+
41
+ [Aspose.HTML for Python via .NET](https://products.aspose.com/html/python-net/) is a powerful API for Python that provides headless browser functionality, allowing you to work with HTML documents. With this API, you can easily create new HTML documents or open existing ones from different sources. Once you have the document, you can perform various manipulation operations, such as removing and replacing HTML nodes, rendering, and converting HTML to other popular formats, etc.
42
+
43
+ ## HTML API Features
44
+
45
+ The following are some popular features of Aspose.HTML for Python via .NET:
46
+
47
+ ### General Features
48
+
49
+ - **Create, Load, and Read Documents.** Create, load, and modify HTML, XHTML, Markdown, or SVG documents with full control over elements, attributes, and structure using a powerful DOM-based API.
50
+ - **Load EPUB and MHTML file Formats.** Open, read, and convert EPUB and MHTML documents with full support for their internal structure and linked resources.
51
+ - **Edit Documents.** Insert, remove, clone, or replace HTML elements at any level of the DOM tree for granular control over content.
52
+ - **Save HTML Documents.** Save documents along with all linked resources like CSS, fonts, and images using customizable saving options.
53
+ - **Navigate HTML.** Navigate through documents using either NodeIterator or TreeWalker.
54
+ - **Sandboxing.** Configure a Sandbox environment that is independent of the execution machine, ensuring a secure and isolated environment for running and testing.
55
+
56
+ ### Data Extraction
57
+
58
+ - **DOM Traversal.** Navigate and manipulate the DOM tree using W3C-compliant traversal interfaces to inspect and retrieve content from HTML documents.
59
+ - **XPath Queries.** Perform high-performance XPath queries to find and extract target content from large HTML documents.
60
+ - **CSS Selector and JavaScript.** Use CSS selector queries and JavaScript execution to dynamically locate and extract specific elements.
61
+ - **Extract CSS Styling Information.** Retrieve and analyze inline styles, embedded `<style>` blocks, and external stylesheets within HTML documents.
62
+ - **Extract any Data from HTML Documents.** Text, attributes, form values, metadata, tables, links, or media elements: Aspose.HTML for Python via .NET enables the accurate and efficient extraction of any content for processing, analysis, or editing.
63
+
64
+ ### Conversion and Rendering
65
+
66
+ - **Convert Documents.** Convert HTML, XHTML, SVG, MHTML, MD, and EPUB files to a wide range of formats, including PDF, XPS, DOCX, and different image formats (PNG, JPEG, BMP, TIFF, and GIF).
67
+ - **Custom Conversion Settings.** Adjust page size, resolution, stylesheets, resource management, script execution, and other settings during conversion to fine-tune the output.
68
+ - **Markdown Support.** Convert HTML to Markdown or vice versa for content migration and Markdown-based workflows.
69
+ - **Timeout Control.** Set and control the timeout for the rendering process.
70
+
71
+ ### Advanced HTML Features
72
+
73
+ - **Monitor DOM Changes.** Use MutationObserver to monitor DOM modifications.
74
+ - **HTML Templates.** Populate HTML documents with external data sources such as XML and JSON.
75
+ - **Output Streams.** Support for both single (PDF, XPS) and multiple (image formats) output file streams.
76
+ - **Check Web Accessibility.** Check web documents against WCAG standards using built-in validators and accessibility rule sets.
77
+
78
+ ## Supported File Formats
79
+
80
+ |**Format**|**Description**|**Load**|**Save**|
81
+ | :- | :- | :- | :- |
82
+ |[HTML ](https://docs.fileformat.com/web/html/)|HyperText Markup Language format|✔️|✔️|
83
+ |[XHTML ](https://docs.fileformat.com/web/xhtml/)|eXtensible HyperText Markup Language format|✔️|✔️|
84
+ |[MHTML ](https://docs.fileformat.com/web/mhtml/)|MIME HTML format|✔️|✔️|
85
+ |[EPUB ](https://docs.fileformat.com/ebook/epub/)|E-book file format|✔️| |
86
+ |[SVG ](https://docs.fileformat.com/page-description-language/svg/)|Scalable Vector Graphics format|✔️|✔️|
87
+ |[MD ](https://docs.fileformat.com/word-processing/md/)|Markdown markup language format|✔️|✔️|
88
+ |[PDF ](https://docs.fileformat.com/pdf/)|Portable Document Format| |✔️|
89
+ |[XPS ](https://docs.fileformat.com/page-description-language/xps/)|XML Paper Specification format| |✔️|
90
+ |[DOCX](https://docs.fileformat.com/word-processing/docx/) |Microsoft Word Open XML document format| |✔️|
91
+ |[TIFF ](https://docs.fileformat.com/image/tiff/)|Tagged Image File Format| |✔️|
92
+ |[JPEG ](https://docs.fileformat.com/image/jpeg/)|Joint Photographic Experts Group format| |✔️|
93
+ |[PNG ](https://docs.fileformat.com/image/png/)|Portable Network Graphics format| |✔️|
94
+ |[BMP ](https://docs.fileformat.com/image/bmp/)|Bitmap Picture format| |✔️|
95
+ |[GIF ](https://docs.fileformat.com/image/gif/)|Graphics Interchange Format| |✔️|
96
+ |[WEBP ](https://docs.fileformat.com/image/webp/)|Modern image format providing both lossy and lossless compression| |✔️|
97
+
98
+ ## Platform Independence
99
+
100
+ Aspose.HTML for Python via .NET can be used to develop applications for a vast range of operating systems, such as Windows, where Python 3.5 or later is installed. You can build both 32-bit and 64-bit Python applications.
101
+
102
+ ## Get Started
103
+
104
+ Are you ready to give Aspose.HTML for Python via .NET a try?
105
+
106
+ Simply run ```pip install aspose-html-net``` from the Console to fetch the package.
107
+ If you already have Aspose.HTML for Python via .NET and want to upgrade the version, please run ```pip install --upgrade aspose-html-net``` to get the latest version.
108
+
109
+ You can run the following snippets in your environment to see how Aspose.HTML works, or check out the [GitHub Repository](https://github.com/aspose-html/) or [Aspose.HTML for Python via .NET Documentation](https://docs.aspose.com/html/python-net/) for other common use cases.
110
+
111
+ ## Create a New HTML Document
112
+
113
+ If you want to create an HTML document programmatically from scratch, use the parameterless constructor:
114
+
115
+ ```python
116
+ from aspose.html import *
117
+
118
+ # Initialize an empty HTML document
119
+ with HTMLDocument() as document:
120
+ # Create a text node and add it to the document
121
+ text = document.create_text_node("Hello, World!")
122
+ document.body.append_child(text)
123
+
124
+ # Save the document to a file
125
+ document.save("create-new-document.html")
126
+ ```
127
+ Source - [Create a Document in Python](https://docs.aspose.com/html/python-net/create-a-document/)
128
+
129
+ ## Extract Images from Website
130
+
131
+ Here is an example of how to use Aspose.HTML for Python via .NET to find images specified by the `<img>` element:
132
+
133
+ ```python
134
+ import os
135
+ from aspose.html import *
136
+ from aspose.html.net import *
137
+
138
+ # Open a document you want to extract images from
139
+ with HTMLDocument("https://docs.aspose.com/svg/net/drawing-basics/svg-shapes/") as document:
140
+
141
+ # Collect all <img> elements
142
+ images = document.get_elements_by_tag_name("img")
143
+
144
+ # Create a distinct collection of relative image URLs
145
+ urls = set(element.get_attribute("src") for element in images)
146
+
147
+ # Create absolute image URLs
148
+ abs_urls = [Url(url, document.base_uri) for url in urls]
149
+
150
+ for url in abs_urls:
151
+ # Create an image request message
152
+ request = RequestMessage(url)
153
+
154
+ # Extract image
155
+ response = document.context.network.send(request)
156
+
157
+ # Check whether a response is successful
158
+ if response.is_success:
159
+ # Parse the URL to get the file name
160
+ file_name = os.path.basename(url.pathname)
161
+
162
+ # Save image to the local file system
163
+ with open(os.path.join(file_name), 'wb') as file:
164
+ file.write(response.content.read_as_byte_array())
165
+ ```
166
+ Source - [Extract Images From Website in Python](https://docs.aspose.com/html/python-net/extract-images-from-website/)
167
+
168
+ ## HTML to PDF in one line of code
169
+
170
+ Aspose.HTML for Python via .NET allows you to convert HTML to PDF, XPS, Markdown, MHTML, PNG, JPEG, and other file formats. The following snippet demonstrates the conversion from HTML to PDF literally with a single line of code!
171
+
172
+ ```python
173
+ from aspose.html.converters import *
174
+ from aspose.html.saving import *
175
+
176
+ # Convert HTML to PDF
177
+ Converter.convert_html("document.html", PdfSaveOptions(), "document.pdf")
178
+ ```
179
+ Source - [Convert HTML to PDF in Python](https://docs.aspose.com/html/python-net/convert-html-to-pdf/)
180
+
181
+ ## Convert HTML to Markdown (MD)
182
+
183
+ The following snippet demonstrates the conversion from HTML to GIT-based Markdown (MD) Format:
184
+
185
+ ```python
186
+ from aspose.html.converters import *
187
+ from aspose.html.saving import *
188
+
189
+ # Prepare HTML code and save it to the file
190
+ code = "<h1>Header 1</h1>" \
191
+ "<h2>Header 2</h2>" \
192
+ "<p>Hello World!!</p>"
193
+ with open('document.html', 'w', encoding="utf-8") as f:
194
+ f.write(code)
195
+ f.close()
196
+ # Call convert_html method to convert HTML to Markdown.
197
+ Converter.convert_html('document.html', MarkdownSaveOptions.git, 'output.md')
198
+ ```
199
+ Source - [Creating an HTML Document](https://docs.aspose.com/html/net/creating-a-document/)
200
+
201
+ ## Convert EPUB to PDF using SaveOptions
202
+
203
+ The PdfSaveOptions class provides numerous properties that give you full control over a wide range of parameters and improve the process of converting EPUB to PDF format. In the example, we use the `page_setup`, `jpeg_quality`, and `css.media_type` properties:
204
+
205
+ ```python
206
+ from aspose.html.converters import *
207
+ from aspose.html.saving import *
208
+ from aspose.html.drawing import *
209
+
210
+ # Open an existing EPUB file for reading
211
+ with open("input.epub", 'rb') as stream:
212
+ # Create an instance of PdfSaveOptions
213
+ options = PdfSaveOptions()
214
+ options.page_setup.any_page = Page(Size(500, 500), Margin(20, 20, 10, 10))
215
+ options.css.media_type.PRINT
216
+ options.jpeg_quality = 10
217
+
218
+ # Convert EPUB to PDF
219
+ Converter.convert_epub(stream, options, "output.pdf")
220
+ ```
221
+ Source - [Convert EPUB to PDF in Python](https://docs.aspose.com/html/python-net/convert-epub-to-pdf/)
222
+
223
+ [Product Page](https://products.aspose.com/html/python-net/) | [Docs](https://docs.aspose.com/html/python-net/) | [Demos](https://products.aspose.app/html/applications) | [API Reference](https://reference.aspose.com/html/python-net/) | [Examples](https://github.com/aspose-html/) | [Blog](https://blog.aspose.com/categories/aspose.html-product-family/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/html/29) | [Temporary License](https://purchase.aspose.com/temporary-license)
224
+