how to convert jpg to pdf in Android java -


i want convert several .jpg files (taken using device camera) 1 .pdf file. saw lot of tools itext, mupdf, pdfjet, pdjbox.

is there more simple? (like api ready android?)

thanks.

using itext library convert text pdf. use convert image pdf.

import java.io.*; import com.lowagie.text.*; import com.lowagie.text.pdf.*; public class imagespdf {          public static void main(string arg[])throws exception     {                           document document=new document();         pdfwriter.getinstance(document,new fileoutputstream("yourpdfhere.pdf"));         document.open();         image image = image.getinstance ("yourimagehere.jpg");         document.add(new paragraph("your heading image goes here"));         document.add(image);                        document.close();    } } 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -