I want to merge multiple pdf files into one. But I can not see any packages in react-native to meet this purpose. However, I have got a package named "pdf-merger-js," though this is for reactjs. What should I do to merge multiple pdf files in react native?
Asked
Active
Viewed 990 times
1 Answers
0
There are multiple packages out there which can help you to achieve what you are looking for. so as a recap you need to read the pdf file(s) and then mix them together or also add a new one which is written by yourself. the following package helped me at the time to achieve what i wanted.

Amir Doreh
- 1,369
- 1
- 13
- 25
-
Well, I have read the existing pdf file, but can't merge another pdf file with the existing one, as I can't see any appropriate methods to add PDFs. Means there are addPages for adding pages and drawImage for drawing images. Likewise, is there any method for adding pdf in that library (react-native-pdf-lib)? – naimur978 Jan 03 '22 at 08:57
-
you can read two files, by add page , add the pages of to-be-merged pdf to another one . AddPage will do the job for you, you only need to read pdf files, and add the pages to each other @naimur978 – Amir Doreh Jan 03 '22 at 09:35
-
It would be really helpful if you could also describe how you read pdf files from the path. Did you use "PDFPage.create(PATH)" for that? – naimur978 Jan 03 '22 at 18:50