Open PDF in single page mode - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Open PDF in single page mode

Open PDF in single page mode 5 years 1 month ago #4237

  • superpisu
  • superpisu's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
How open pdf in sigle page mode ?

in doc i found :

PDF_VIEW PDFV_open( int type, PDF_DOC doc, int page_gap )
Description:
create a Viewer object.
Pamaters:
type 0: vertival view
1: left to right view
2: right to left view
3: single left to right view
4: single right to left view
doc Document object returned from PDF_open().
page_gap gap between pages, in pixels.
Return:
Viewer object or NULL.

but if page_gap = 3 in landscape show 2 pages
i need page mode like android SingleEx is it possible?

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

Open PDF in single page mode 5 years 1 month ago #4238

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
this method is deleted.
plz see PDFView.m
-(void)vOpen:(PDF_DOC)doc :(id<PDFVDelegate>)delegate
{
    //GEAR
    [self vClose];
    //END
    m_doc = doc;
    //g_PDF_ViewMode =2;
    //defView =2;
    bool *verts = (bool *)calloc( sizeof(bool), Document_getPageCount(doc) );
    switch(defView)
    {
        case 1:
            m_view = [[PDFVHorz alloc] init:false];
            break;
        case 2:
            m_view = [[PDFVHorz alloc] init:true];
            break;
        case 3:
            //for dual view
            m_view = [[PDFVDual alloc] init:false :NULL :0 :NULL :0];
            //for single view
            //m_view = [[PDFVDual alloc] init:false :NULL :0 :verts :Document_getPageCount(doc)];
            break;
        case 4:
            //for dual view
            m_view = [[PDFVDual alloc] init:true :NULL :0 :NULL :0];
            //for single view
            //m_view = [[PDFVDual alloc] init:true :NULL :0 :verts :Document_getPageCount(doc)];
            break;
        default:
            m_view = [[PDFVVert alloc] init];
            break;
    }
    free( verts );
    m_type = defView;
    struct PDFVThreadBack tback;
    tback.OnPageRendered = @selector(OnPageRendered:);
    tback.OnFound = @selector(OnFound:);
    [m_view vOpen:doc :4 :0xFFCCCCCC : self: &tback];
    [m_view vResize:m_w :m_h];
    
    m_timer = [NSTimer scheduledTimerWithTimeInterval:0.03f
                                               target:self selector:@selector(timerFireMethod:)
                                             userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop]addTimer:m_timer forMode:NSDefaultRunLoopMode];
    m_status = sta_none;
    m_ink = NULL;
    m_modified = false;
    
    m_rects = NULL;
    m_rects_cnt = 0;
    m_rects_max = 0;
    
    m_ellipse = NULL;
    m_ellipse_cnt = 0;
    m_ellipse_max = 0;
    
    m_cur_page = -1;
    m_delegate = delegate;
}
plz see 3, 4 case in switch

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

  • Page:
  • 1
Powered by Kunena Forum