Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Vertical paging - Single Page Mode in iOS 3 years 10 months ago #15040

  • mobileapps@dewa.gov.ae
  • mobileapps@dewa.gov.ae's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Dear Team,
Currently in horizontal scroll I can able to enable single pdf's page per screen and able to enable paging also.
But in vertical scroll, its displaying more than one pdf's page per screen. I want to display like horizontal page( i.e single pdf's page per screen) in vertical scroll also.

Please guide me how can achieve this? Its urgent for us.

Thanks in Advance. I eagerly waiting for your quick reply.

Regards
Ponlingam

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

Vertical paging - Single Page Mode in iOS 3 years 10 months ago #15041

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Dear user,

this render mode is not available in demo project, but you could implement it editing the vertical layout.
Here is some steps to follow:
- In PDFLayoutView class edit pagingAvailable method and add GLOBAL.g_render_mode == 0 to available paging render mode.
- In PDFLayoutView class edit the open method and set GLOBAL.g_paging_enabled = YES on RDVLayoutVert initialization.
- In RDVLayout class edit vCalculateScales and set BOOL vert = NO.
- In RDVLayout class edit the RDVLayoutVert's init method and set m_align = align_vcenter;

These steps should be enough to implement paging in vertical mode.
To handle other particular behaviors, you could edit PDFLayoutView and RDVLayout class.

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

Vertical paging - Single Page Mode in iOS 3 years 10 months ago #15042

  • mobileapps@dewa.gov.ae
  • mobileapps@dewa.gov.ae's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Dear Emanuele,
Thank you so much. I followed your step, currently vertical paging is working fine.
But I need vertical paging with every page of pdf needs to display in different different page. But here, second page of pdf started in first page of device.
I need every pdf's page needs to display in separate page.

Check my attachment.
- I need like my 1st attachment (IMG_6234.PNG)
- But currently its displaying as 2nd attachment.

Please help me to achieve this.

I am eagerly waiting for your positive reply.

Thanks in Advance.

Regards
Ponlingam S
Attachments:

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

Last edit: by mobileapps@dewa.gov.ae.

Vertical paging - Single Page Mode in iOS 3 years 10 months ago #15044

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
You could try changing this code:
- in RDVLayout, ProLayout method of RDVLayoutVert change the default implementation of the switch(m_align) in this way:
default:
            {
                int pw = [m_doc pageWidth:pageno] * m_scales[pageno];
                int ph = [m_doc pageHeight:pageno] * m_scales[pageno];
                int ch = (ph + m_page_gap < m_h) ? m_h : ph + m_page_gap;
                RDVPage *vp = (RDVPage *)[m_pages objectAtIndex:pageno];
                [vp vLayout:(m_docw - pw) >> 1 :docy + (ch - ph) / 2 :m_scales[pageno] :true];
                docy += ch;
                break;
            }
- add vGotoPage in RDVLayoutVert implementation in this way:
-(void)vGotoPage:(int)pageno
{
    RDVPos pos;
    pos.pdfx = 0;
    pos.pdfy = [m_doc pageHeight:pageno];
    pos.pageno = pageno;
    int ph = [m_doc pageHeight:pageno] * m_scales[pageno];
    [self vSetPos:m_page_gap / 2 :(m_h - ph) / 2 :&pos];
}

This is a sample implementation and not supported in demo project.
We don't know if it works for pdf with particular sizes and you should handle these cases.

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

Last edit: by emanuele.

Vertical paging - Single Page Mode in iOS 3 years 10 months ago #15049

  • mobileapps@dewa.gov.ae
  • mobileapps@dewa.gov.ae's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Dear emanuele,
Thank You so much. Its working fine in 'RadaeePDF CALayer 3.61' Demo project.
Actually we are using old RadeePDF library (i.e Without CALayer Version), We customized lot of things with this old RadeePDF version.
If I implement new library I needs to do lot of customization with this library, it will take more time. we needs to release with this vertical paging option immediately .

Can you please help me to do same thing(vertical paging with single page) in old RadeePDF Source code(Without CA layer version)? this time only.

Please help me to do this with old RadeePDF version this time only. Meanwhile I will implement new version.

It will be very grateful and thankful if you help me to do this.

I eagerly waiting for your positive reply.

Best Regards
Ponlingam S

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

Last edit: by mobileapps@dewa.gov.ae.
  • Page:
  • 1
Powered by Kunena Forum