ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to merge multiple jpg pictures to generate a pdf file without visual control

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Flashcqxg Posted - Sep 16 2021 : 21:20:59
I have multiple single picture files in jpg format, and I want to merge these pictures into one pdf file. Moreover, it is required that the first page of the pdf file is a newly added picture with the text ‘Hello word!’ written on the picture. How can I do it? thanks.
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 03 2024 : 23:25:27
Hi

Please see the demo:

\Demos\InputOutput\PDFBuilder2\PdfBuilder2.dpr
https://www.imageen.com/files/demos/run/InputOutput/PDFBuilder2/PdfBuilder2.exe



Nigel
Xequte Software
www.imageen.com
srtt Posted - Jun 03 2024 : 15:16:27
There are 2 pictures and 2 pages here.
How can I add 2 images in the same position on one page?
Flashcqxg Posted - Sep 23 2021 : 03:14:32
Thanks.
xequte Posted - Sep 21 2021 : 00:40:39
Hi

The TextOut method is adding an alpha channel to the image, which needs to be saved to the PDF. Because you don't use the alpha channel you should call:

IO.IEBitmap.RemoveAlphaChannel();

After TextOut. We'll handle this automatically for the next update.

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Sep 17 2021 : 04:03:43
Hi
I tested it with the following code and found that the generated pdf document is relatively large, about 8M, but the total of 1.jpeg and 2.jpeg is only about 200kb.

var
  IO: TImageEnIO;
  Proce: TImageEnProc;
begin
  IO := TImageEnIO.Create(NIL);
  Proce := TImageEnProc.CreateFromBitmap(IO.IEBitmap);
  IO.CreatePDFFile('test.pdf');
  try

    IO.LoadFromFile('1.jpeg');
    Proce.TextOut(100, 100, 'adsfasdfasdfa');
    IO.Params.PDF_PaperSize := iepA3;
    IO.Params.PDF_Compression := ioPDF_JPEG;
    IO.SaveToPDF;

    IO.LoadFromFile('2.jpeg');
    IO.Params.PDF_PaperSize := iepA3;
    IO.Params.PDF_Compression := ioPDF_JPEG;
    Proce.TextOut(100, 100, 'adsfasdfasdfa');
    IO.SaveToPDF;
  finally
    IO.ClosePDFFile;
    IO.Free;
    Proce.Free;
  end;
end;
xequte Posted - Sep 17 2021 : 02:15:34
Hi

Please try the demo:

\demos\InputOutput\PDFBuilder\PdfBuilder.dpr

Or compiled at:

https://www.imageen.com/files/demos/run/InputOutput/PDFBuilder/PdfBuilder.exe

It shows how to create a PDF from multiple images.

To create the image with text use:

https://www.imageen.com/help/TImageEnProc.TextOut.html

Nigel
Xequte Software
www.imageen.com