0

itext(itextg-5.5.1.jar)変換に Android ライブラリを使用image into PDFしました。この目的のために、以下のコード スニペットを使用して画像を PDF に変換しました。PDFを取得できますが、私が直面している問題は、実際には画像全体を変換するのではなく、画像の一部(ズームイン)をPDFに変換するだけです.どうすれば問題を解決できますか?達成するためのより良い解決策を提供してくださいこのテクニック。

試したコード

Document document=new Document();
                String pdfPath = Environment.getExternalStorageDirectory()+"/Download"+"/exampleoutput.pdf";
                PdfWriter.getInstance(document,new FileOutputStream(pdfPath));
                document.open();
                String imagePath = Environment.getExternalStorageDirectory()+"/Download"+"/example.jpg";
                Image image = Image.getInstance (imagePath);
                document.add(image);               
                document.close();
4

0 に答える 0