I have a two page pdf and I want to show only one side (page) of it inside a Document, and I want to do this on initialization.
With doc.ChangePageRect I could change the PageRect, but only for the first page, as rendering will start always from left, no matter how I shift:
These two are the same:
di.doc.ChangePageRect(0, 0, 0, -halfPageSize, 0);
di.doc.ChangePageRect(0, halfPageSize, 0, 0, 0);
So I dont know how i can show only the right side inside a doc.
sorry, can't get your mean.
do you want to cut 1 page to 2 page?
this may make PDF fat.
you can copy that PDF file as 2 PDF files.
then using importPage 1 page from cloned PDF file.
then change page size to these 2 pages.
if the PDF file is too large, then you can create 2 Document objects from one same file.
the first one is editable, and the second is readonly.
you can import page from second Document object.
here you can see what I mean. I got one doublesized pdf-page and I want to cut it, so it has the same size like all the other pages in my document.
I don't care about size (yet).
To your suggestions:
As this is one Document, with one page, I can not importPage 1. There is only 1 pagecount.
Thats why I tried with ChangePageRect, but this only shows the left part of Document1, no matter if I crop from left or right.