I have a pdf doc which has 2 pages per page I want to split the page vertically and display the page in order (eg 100 page pfd doc will get converted to 200 pages doc)
I want to code it in may be php/javascript (is it possible). I want to upload any pdf doc to my website and then split it vertically then display the pages in order
Please let me how how to do this, I have tried to google but I could not find a solution
thanks
Edit:
I am trying to use clipRectangel() method:
<?php
require_once 'Zend/Pdf.php';
$pdf = Zend_Pdf::load('pages.pdf');
$page = $pdf->pages[0];
$page->clipRectangle(10, 10, 30, 30);
$pdf->save('new.pdf');
?>
I am trying to use clipRectangle to split vertically but I am not getting any modified pdf in ‘new.pdf’ I also want to order the pages,please suggest any better way to use zend. It would be helpful if you can give me few lines of code.
This is a pretty tall order.
Your best bet is to use Zend_Pdf which allows loading and altering of (unprotected) PDF files in php. Javascript cannot do this.
This is of course not something that will work with just any PDF in any circumstance. You can get cut off text (half on one page, half on the other) as the entire process is not like HTML text.
Converting a PDF to HTML is a whole other thing.
Update: I’ve taken your code simply for illustration. Haven’t tested this, but if you get errors, you should be able to find the solution rather quickly.