Note that there are some explanatory texts on larger screens.

plurals
  1. POViewing pdf document in portrait/landscape in page curl with zoom in/zoom out xcode?
    primarykey
    data
    text
    <p>In my application project for page curl effect,</p> <p>I'm using this github project <a href="https://github.com/sdesimone/UIPageViewController-PDF" rel="nofollow noreferrer">UIPageViewController-PDF</a> and I have two types of pdf documents, one document is in portrait view(vertical document) and another document is in landscape view(horizontal document) its getting so many issues while handling this portrait/landscape orientation. If I have a portrait type document and I open it in portrait mode so its view is good but when I rotate my iPad in landscape mode so it doesn't fit in landscape mode. It must be fit to size I guess but the corners of the document is cutting not showing the full view like in portrait. Its a portrait document so viewing in portrait mode is fine but as I rotate my device so it out of the size and go outside the screen so it cuts the document. And same is with landscape document, my landscape document is viewing in landscape mode is perfect but when I rotate it in portrait mode so my landscape document again cut from the corners and full image is not showing. I want to handle it like the UIWebView handled the orientation nicely , it manages both landscape or portrait document in portrait/landscape mode perfectly I hope you guys understand my question.</p> <p>I'm attaching also the screenshots and a bit of code too.</p> <p>in ContentViewController in <code>viewDidLoad</code></p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { NSLog(@"Portrait"); CGPDFPageRef PDFPage = CGPDFDocumentGetPage(thePDF, [_page intValue]); pdfScrollView = [[PDFScrollView alloc] initWithFrame:self.view.frame]; pdfScrollView = [[PDFScrollView alloc] initWithFrame:CGRectMake(-34.0, -80.0, 770.0, 1085.0)]; [pdfScrollView setPDFPage:PDFPage]; [self.view addSubview:pdfScrollView]; self.view.backgroundColor = [UIColor blackColor]; self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; pdfScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; pdfScrollView.delegate = pdfScrollView; } else { NSLog(@"Landscape"); CGPDFPageRef PDFPage = CGPDFDocumentGetPage(thePDF, [_page intValue]); pdfScrollView = [[PDFScrollView alloc] initWithFrame:self.view.frame]; //-280, -80, 1063, 1180 pdfScrollView = [[PDFScrollView alloc] initWithFrame:CGRectMake(-280.0, -40.0, 1024.0, 1024.0)]; [pdfScrollView setPDFPage:PDFPage]; [self.view addSubview:pdfScrollView]; self.view.backgroundColor = [UIColor blackColor]; self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; pdfScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; pdfScrollView.delegate = pdfScrollView; } } </code></pre> <p><img src="https://i.stack.imgur.com/UaN8H.jpg" alt="enter image description here"></p> <p>Thanks.</p> <p>Zeeshan Shaikh</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload