Mergs PDF files and remove white space in pages using Aspose.PDF for .NET

Hi, I want to concatenate the two pdf file. but if the space is left in the first page so it start merging it from there instead from next page.

for example Merge two PDF pages into new one without blank spaces between text content - Stack Overflow

@gurpreet.singh,
You can concatenate PDF documents by passing the pages of one PDF document to the target PDF document. Please refer to this help topic: Concatenate PDF Files.

Best Regards,
Imran Rafique

Hi i have tried that but it concatenate in next page. please follow the link problem is defined in this link. Merge two PDF pages into new one without blank spaces between text content - Stack Overflow

@gurpreet.singh,
Unfortunately, there is no direct way to merge two PDF pages into one page. As a workaround, you can convert certain page region from two PDF files to image format by cropping space around PDF contents and then place both images in a single PDF file (new PDF containing the contents of both files). Please visit to these help topics:

  1. Trim White-space Around a Page
  2. Convert PDF Pages to JPEG Images
  3. Convert an Image to PDF

We have already logged a feature request to merge the contents of two pages into one page under the ticket PDFNET-36455. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.