0

Problem: Given a pdf, you need to cut after the number and paste it into a new pdf page.


input.pdf ---> input file contains 1 page.    
hi
john
123
how
are you 
456

output.pdf ---> output file contains 2 pages.       
page1 hi john 123 page2 how are you 456

Is it possible to split based on line number using PyPDF2 or copy the line and merge it? I tried using reportlab but is there any alternative and easy way to perform this? Any package is available please do provide. It would be really helpful for me and thanks for your input.

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
  • Have you tried [this](https://stackoverflow.com/a/39868722/8353711)? – shaik moeed Mar 04 '20 at 05:08
  • Hi, Shaik yes I tried but what I did was I manually converted the pdf to a txt file and was able to perform the operation much easier and again I converted the txt files to pdf. I feel it's not the right way so only I have this doubt .. is there any alternative way to do so ? – Preethi mukund kumaresh Mar 04 '20 at 17:45

0 Answers0