Merge image in Java
High-speed and cross-platform Java library for merging HTML to image using Java code
Merge HTML to image in Java
Using Aspose.Slides for Java , you can merge image files quickly with just a few lines of code
Java code for merging HTML to image
Presentation pres = new Presentation();
try {
pres.getSlides().removeAt(0);
pres.getSlides().addFromHtml(new FileInputStream("file1.html"));
pres.getSlides().addFromHtml(new FileInputStream("file2.html"));
for (int index = 0; index < pres.getSlides().size(); index++)
{
ISlide slide = pres.getSlides().get_Item(index);
IImage image = slide.getImage();
image.save("image_java_" + index + ".png", ImageFormat.Png);
}
} finally {
if (pres != null) pres.dispose();
}Aspose.Slides를 사용하여 HTML을 이미지에 병합
Aspose.Slides for Java is a powerful Java 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.
How to merge HTML to image in Java
- Aspose.Slides for Java를 설치합니다. 설치를 참조하세요.
- 프로젝트에서 라이브러리를 참조로 추가하십시오.
- Presentation 클래스의 인스턴스를 만듭니다.
- 함께 병합하려는 HTML 문서를 로드합니다.
- 결과 이미지를 저장합니다.
Aspose.Slides로 구축
HTML에서 이미지로 온라인 병합
무료 Aspose.Slides Merger 앱은 위 코드와 동일한 API인 Aspose.Slides for Java로 구축되었습니다. 앱을 열고 내 HTML 파일로 API가 무엇을 할 수 있는지 확인해 보세요.
- 브라우저에서 실행되며 설치가 필요 없습니다.
- 코드를 작성하기 전에 Aspose.Slides가 파일을 어떻게 병합하는지 확인해 보세요.
- 여러 HTML 파일을 업로드하고 하나의 이미지 파일로 합치세요.
- 병합된 결과를 하나의 파일로 다운로드하세요.
다른 파일 병합
다른 형식의 파일을 결합하여 단일 파일을 얻을 수도 있습니다.