It's worse than I thought.
I don't know what language your code sample is in, but as far as I
understand it, you're creating a separate file for each image!
What do you expect from us? You say you have no Java skills? Does that
mean you want us to write your code in your place? For free? Seriously?
Op 25/09/2012 17:36, georgetv schreef:
> Op 25/09/2012 16:31, georgetv schreef:
>> Can I organize based on the size of the image, if there is space for more
>> than one add more if not use the next next page ?
> ->You say you don't know how to put multiple JPGs on a single PDF.
> ->How come? What have you tried? What went wrong?
>
> This is what I have and like I said, I don't know enough to loop thru the
> JPG to get all the images and collate them. I have no Java skills.
>
> Function ConvertJPGToPDF(&jpgFileName As string) Returns string
> Local string &pdfFileName;
>
> &pdfFileName = Substring(&jpgFileName, 1, Len(&jpgFileName) - 3) | %Time
> | ".PDF";
> Local JavaObject &Obj_InsertImagePDF_l =
> CreateJavaObject("com.itextpdf.text.Document");
> Local JavaObject &obj_writePDFoutput_l =
> GetJavaClass("com.itextpdf.text.pdf.PdfWriter").getInstance(&Obj_InsertImagePDF_l,
> CreateJavaObject("java.io.FileOutputStream", &pdfFileName, True));
> &Obj_InsertImagePDF_l.open();
>
>
> Local JavaObject &Obj_imageobject_l =
> GetJavaClass("com.itextpdf.text.Image").getInstance(&jpgFileName);
> &Obj_imageobject_l.setAlignment(24);
> &Obj_InsertImagePDF_l.add(&Obj_imageobject_l);
> &Obj_InsertImagePDF_l.close();
>
> Return &pdfFileName;
> End-Function;
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php