Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

PDFVDual page position

More
IP: 192.168.0.71 11 years 5 months ago #7700 by Rossi
PDFVDual page position was created by Rossi
Hi, with pdfvdual visualization i need to render the pdf with odd page on right and even page on left, so the page number 1 it's visible alone on the right of the view.
In android there is the horzs param but i can do it on ios?
More
IP: 192.168.0.161 11 years 5 months ago - 11 years 5 months ago #7727 by emanuele
Replied by emanuele on topic PDFVDual page position
Hi,
in vOpen method, you should add:

bool *horzs = (bool *)calloc( sizeof(bool), [doc pageCount] );
for (int i = 0; i < m_doc.pageCount; i++) {
if (i > 0) {
horzs = true;
}
}

before the switch that check g_def_view; than you should change the case:3 like that:
m_view = [[PDFVDual alloc] init:false :NULL :0 :horzs :m_doc.pageCount];
Last edit: 11 years 5 months ago by CBA.
More
IP: 192.168.0.71 11 years 5 months ago #7728 by Rossi
Replied by Rossi on topic PDFVDual page position
hi, i tried your code but i have an EXC_BAD_ACCESS error on
memcpy( m_horz_dual, horzs, sizeof( bool ) * horzs_cnt ); in PDFV.m on line 627
More
IP: 192.168.0.161 11 years 5 months ago - 11 years 5 months ago #7730 by emanuele
Replied by emanuele on topic PDFVDual page position
sorry, this is the correct code:
Code:
for (int i = 0; i < m_doc.pageCount; i++) { if (i > 0) { horzs[i] = true; } }
Last edit: 11 years 5 months ago by CBA.
More
IP: 192.168.0.71 11 years 5 months ago #7731 by Rossi
Replied by Rossi on topic PDFVDual page position
Thanks, now works. I don't see the trivial error.
Time to create page: 0.430 seconds
Powered by Kunena Forum