File tree Expand file tree Collapse file tree
Examples/src/main/java/com/groupdocs/merger/examples
basic_usage/multiple_document_operations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ public static void main(String[] args) throws Throwable
136136 //CrossJoinMultipleDocuments.run();
137137 //CrossJoinMultipleImages.run();
138138 //CrossJoinPagesFromVariousDocuments.run();
139+ //CrossJoinImagesToPdf.run();
139140 }
140141 //endregion
141142
Original file line number Diff line number Diff line change 1+ package com .groupdocs .merger .examples .basic_usage .multiple_document_operations ;
2+
3+ import com .groupdocs .merger .Merger ;
4+ import com .groupdocs .merger .examples .Constants ;
5+
6+ import java .io .File ;
7+ import java .nio .file .Paths ;
8+
9+ /**
10+ * This example demonstrates how to join images with different file types to PDF.
11+ */
12+ public class CrossJoinImagesToPdf {
13+ public static void run () throws Exception
14+ {
15+ String filePath = Constants .SAMPLE_PDF ;
16+ String filePathOut = new File (Constants .OutputPath , Constants .SAMPLE_NAME + Paths .get (filePath ).getFileName ().toString ()).getPath ();
17+
18+ Merger merger = new Merger (filePath );
19+ {
20+ merger .join (Constants .SAMPLE_JPG );
21+ merger .join (Constants .SAMPLE_SVG );
22+ merger .save (filePathOut );
23+ }
24+
25+ System .out .print ("Source documents was merged successfully." );
26+ System .out .print ("Check output " +filePathOut );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments