1,105,197 Community Members

Split a pdf using php code

Member Avatar
sushu1209
Newbie Poster
2 posts since Jan 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,

I need to split the pdf document into two parts,like i have a pdf which consists 100 pages,i need to split the pdf into two parts where first part consits 10 pages and second part consists 1 to 100 pages?how to do that using php?

Member Avatar
BenWard
Newbie Poster
15 posts since Jan 2011
Reputation Points: 8 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

Funny enough I'm doing a very similar thing right now. I couldn't find a solution native to the language I originally used (VBScript) by googling so what I did was create a custom ghostscript script PDF2PDF and call it from the OS shell. I'm now porting the program to PHP and was going to just use the same solution - I'd be interested to see if the geniuses here have a native PHP solution! My docs start off as BZ2 postscript, so I shell out to decompress, shell out to convert to PDF then shell out again to extract the desired pages from the PDF. ouch...

Member Avatar
sushu1209
Newbie Poster
2 posts since Jan 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi ....any solution how to split pdf using php code??..any one from php in daniweb?

Member Avatar
pritaeas
mod_pritaeas
11,301 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,833 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
1
 

You'll need a tool probably. I haven't seen this done in PHP yet.

Perhaps PDFLib is an option.

You
Post:
Start New Discussion
Tags Related to this Article