I have a set of JPEG's on my server all the same size. Can I convert this into a PDF file server side?
Simply visit the Acrobat Online website and upload the files you want to merge. Reorder the files however you like and then click Merge files. After that, just download the merged PDF. This will combine all the JPGs-turned-PDFs into a single PDF you can easily share or view.
Go to the file that your JPG pictures are located at, choose those you want to convert. Right-click to open a menu, now choose "Print". A new window will pop up for print settings. On the "Printer" column, choose "Microsoft Print to PDF" on the drop-down menu.
Method 2: How to Create PDF from a Single Image Here's what you need to do: Go to the Explorer location where your image is stored and right-click it. Choose the “Create to PDF” option to convert to PDF and the file will be open in PDFelement automatically. Press “Ctrl + S” to save the PDF file.
I'd try using http://www.pdfsharp.net/
Something along the lines of
PdfPage page = outputDocument.AddPage();
page.Size = PdfSharp.PageSize.A4;
XGraphics gfx = XGraphics.FromPdfPage(page);
XImage image = XImage.FromFile("MyJPGFileXXX.jpg");
gfx.DrawImage(image, 0, 0);
I am using iText for this requirement
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream(yourOutFile));
document.open();
for(int i=0;i<numberOfImages;i++){
Image image1 = Image.getInstance("myImage"+i+".jpg");
image1.scalePercent(23f);
document.newPage();
document.add(image1);
}
document.close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With