Merge image in Python

High-speed and cross-platform Python library for merging HTML to image using Python code

Aspose.Slides를 사용하여 HTML을 이미지에 병합

Aspose.Slides for Python via .NET is a powerful Python library used to merge and manipulate presentations, HTML docs, and other files. When you merge HTML to image, you are effectively combining the contents in HTML documents to obtain a single image.

Merge HTML to image in Python

Using Aspose.Slides for Python via .NET , you can merge image files quickly with just a few lines of code

Python code for merging HTML to image


import aspose.slides as slides
import aspose.pydrawing as drawing

with slides.Presentation() as pres:
    pres.slides.remove_at(0)
    pres.slides.add_from_html(htmlText1)
    pres.slides.add_from_html(htmlText2)

    for sld in pres.slides:
        bmp = sld.get_thumbnail(1, 1)
        bmp.save("Slide_{num}.png".format(num=str(sld.slide_number)), drawing.imaging.ImageFormat.png)

How to merge HTML to image in Python

  1. Install Aspose.Slides for Python via .NET. See Installation .

  2. 프로젝트에서 라이브러리를 참조로 추가하십시오.

  3. Presentation 클래스의 인스턴스를 만듭니다.

  4. 함께 병합하려는 HTML 문서를 로드합니다.

  5. 결과 이미지를 저장합니다.

온라인으로 PDF 파일 병합

Python에서 PDF를 병합하는 방법

다른 파일 병합

다른 형식의 파일을 결합하여 단일 파일을 얻을 수도 있습니다.