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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Create single pdf of multiple images with no margin padding.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Aamir

India
20 Posts

Posted - May 06 2025 :  22:31:05  Show Profile  Reply
Hi i am using imageEn13.1.0(Single user license) as of now. I want to create a single pdf of multiple images. with no margin, padding, white space etc. PDF image quality can be customized. can you please help me out in this? thank!

IDE version: Delphi XE3


Sample pdf created by using Photoshop: attach/Aamir/20255622322_PDF sample.zip
1354.31 KB


Images attachments: attach/Aamir/20255622285_images.zip
9976.32 KB



Aamir

xequte

38978 Posts

Posted - May 07 2025 :  02:34:22  Show Profile  Reply
Hi Aamir

This worked for me:
(Ensure you add iexHelperFunctions to your uses clause)

const
  PDF_Folder = 'D:\Album_Images';
  Fail_On_Unsupported_Image = True;
var
  ssImages: TStringList;
begin
  // Create PDF from all images in D:\Album_Images
  ssImages := TStringList.Create();
  GetAllFiles( PDF_Folder, ssImages );
  if IECreatePDFFromFileList( 'D:\MyNewPDF.pdf',
                              ssImages,
                              iepAuto, // Page matches size of the image
                              ioPDF_JPEG,
                              'My Cool PDF',
                              'Mr Developer',
                              0, // no margins
                              True, Fail_On_Unsupported_Image ) = False then
      raise Exception.create( 'Cannot create PDF' );
  ssImages.Free();
end;


Created File: attach/xequte/2025572329_MyNewPDF.zip
4970.6 KB

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Aamir

India
20 Posts

Posted - May 07 2025 :  10:57:49  Show Profile  Reply

Hey thanks for fast reply :). There is not option to reduce or increase the quality of PDF file. i need that option.

and one more thing is this function only accepts these parameters.


Check version of iexHelperFunction.pas




your snippet code is not working i have adjusted that.
if IECreatePDFFromFileList( 'D:\MyNewPDF.pdf',
ssImages,
iepAuto, // Page matches size of the image
ioPDF_JPEG,
'Title',
'Author',
Fail_On_Unsupported_Image ) = False then
raise Exception.create( 'Cannot create PDF' );
ssImages.Free();









Aamir
Go to Top of Page

xequte

38978 Posts

Posted - May 07 2025 :  23:09:08  Show Profile  Reply
Hi Aamir

Email us to see if you are entitled to the latest version.

JPEG compression will use the default quality:

https://www.imageen.com/help/TIEGlobalSettings.IOParamDefaults.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: