Split Pdf File based on size [Resolved]

Posted by Vikram.Mashetty under C# on 1/30/2015 | Points: 10 | Views : 622 | Status : [Member] | Replies : 5
HI Freinds ,


I want to split Pdf file based on size ie.., if its is more than 8Mb. I need to divide it (Ex: 22.2 MB = 8Mb+8Mb+6.20Mb).I could able to split it but the problem is I could not able to open split pdf files.I Request you to please help me to solve this issue.We should use iTextSharp but i have no idea how to use it.




Responses

Posted by: Florian on: 2/11/2015 [Member] Starter | Points: 50

Up
0
Down

Resolved
When you are splitting the PDF you should consider that each split file has the header and the resources.
If you are using a PDF library to do that, you can achieve this by getting the total size of the original PDF and then divide it on the PDF total pages. This way you can control how much pages will be in each PDF split so that each split file shouldn't exceeds 8mb .
My own application does something similar using LeadTools.

Vikram.Mashetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 1/31/2015 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,

Just you have to add the iTextSharp dll in your visual studio and use the classes like pdfreader, pdfcopy etc and split your large size pdf into multiple pdf. Please refer below link for more details.
http://www.worldbestlearningcenter.com/index_files/csharp-split-pdf-file.htm

Jitendra Kumar
If my post helps you, plz mark as an answer.

Vikram.Mashetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vikram.Mashetty on: 2/2/2015 [Member] Starter | Points: 25

Up
0
Down
HI Jitendra Kumar,


Thanks For Reply to my post.My requirement I want to split Pdf file based on size ie.., if its is more than 8Mb. I need to divide it (Ex: 22.2 MB = 8Mb+8Mb+6.20Mb).I could able to split it but the problem is I could not able to open split files.I Request you to please help me to solve this issue.I could be very thankful if u help me in solving above requirement.



Thanks & Regards

M.vikram Prasad




Vikram.Mashetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankurshukla on: 12/17/2015 [Member] Starter | Points: 25

Up
0
Down
I don’t have much skill in development languages still I can suggest an online PDF splitter which can be used to split a large PDF file into multiple documents. Get more details: http://onlinefreeware.net/pdf/split.aspx

Vikram.Mashetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oliver32 on: 12/18/2015 [Member] Starter | Points: 25

Up
0
Down
Hi there

It's hard to split PDF document by size because it is hard to detect which part is 8BM, which is 6 MB. I suggest that you split PDF document by pages. Check following tutorials if you need:

http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Document-Operation/Split-PDF-into-Multiple-PDFs-using-a-Range-of-Pages-in-C-VB.NET.html

Vikram.Mashetty, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response