Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Planned SDK features
  • Page:
  • 1

TOPIC:

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14661

  • apait
  • apait's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 50
  • Thank you received: 0
Hi,
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.

Is there any other way I could go?

Thanks,
Lukas

Please Log in or Create an account to join the conversation.

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14662

  • apait
  • apait's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 50
  • Thank you received: 0
Sorry, this should be moved to Android Development.

Please Log in or Create an account to join the conversation.

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14663

  • apait
  • apait's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 50
  • Thank you received: 0
Or is it possible, to cut a pdf in half and save two pages from it?

Please Log in or Create an account to join the conversation.

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14664

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
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.

Please Log in or Create an account to join the conversation.

Last edit: by radaee.

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14665

  • apait
  • apait's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 50
  • Thank you received: 0


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.
Attachments:

Please Log in or Create an account to join the conversation.

Change visible Part of PDF with ChangePageRect 4 years 5 months ago #14666

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You can achieve that by changing the MediaBox advanced property. please check Change page size using Advanced properties for an example

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum