- Posts: 67
- Thank you received: 0
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
I want to show pdf from certain page to certain page not whole pdf.
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
IP: 123.252.210.122
7 years 3 months ago #14373
by apdeveloper
Dear Team,
Currently i am working on a project where i have downloaded a pdf of 50 pages and now i want to show pdf suppose from 5 page no. to 10 page no. only.
Is it possible show pdf like this i dont want to show the whole 50 pages of that pdf.
Currently i am working on a project where i have downloaded a pdf of 50 pages and now i want to show pdf suppose from 5 page no. to 10 page no. only.
Is it possible show pdf like this i dont want to show the whole 50 pages of that pdf.
IP: 212.97.62.176
7 years 3 months ago #14375
by federico
Replied by federico on topic I want to show pdf from certain page to certain page not whole pdf.
Dear apdeveloper,
Which kind of programming language are you interested in for this feature?
Which kind of programming language are you interested in for this feature?
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 67
- Thank you received: 0
IP: 114.143.95.145
7 years 3 months ago #14377
by apdeveloper
Replied by apdeveloper on topic I want to show pdf from certain page to certain page not whole pdf.
In iOS Swift version or objc i want this funcatinality
IP: 111.196.245.60
7 years 3 months ago - 7 years 3 months ago #14378
by radaee
Replied by radaee on topic I want to show pdf from certain page to certain page not whole pdf.
it can create a new class derive from PDFDoc class.
you need to override methods:
rhe second solution shall be:
create a new PDF file and import pages you needed.
you need to override methods:
Code:
-(int)pageCount;
-(PDFPage *)page:(int) pageno;
-(float)pageWidth:(int) pageno;
-(float)pageHeight:(int) pageno;
-(NSString *)pageLabel:(int)pageno;
-(bool)newRootOutline: (NSString *)label :(int) pageno :(float) top;
-(PDFPage *)newPage:(int) pageno :(float) w :(float) h;
-(bool)movePage:(int)pageno1 :(int)pageno2;
create a new PDF file and import pages you needed.
Last edit: 7 years 3 months ago by radaee.
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 67
- Thank you received: 0
IP: 114.143.38.45
7 years 3 months ago #14379
by apdeveloper
Replied by apdeveloper on topic I want to show pdf from certain page to certain page not whole pdf.
How can i create new pdf and import pages which i need from old pdf using Radaeepdf.
IP: 111.196.245.60
7 years 3 months ago - 7 years 3 months ago #14383
by radaee
Replied by radaee on topic I want to show pdf from certain page to certain page not whole pdf.
you must have premium license, and create PDF file in sandbox, which has write access right.
and then objc codes like:
and then objc codes like:
Code:
PDFDoc *doc_src;
PDFDoc *doc_dst;
doc_src = [[PDFDoc alloc] init];
doc_dst = [[PDFDoc alloc] init];
[doc_src open:@"source path to extists pdf file"];
[doc_dst open:@"dest path to creating pdf file"];
PDFImportCtx *ctx = [doc_src newImportCtx];
int pgno = page_range_start;
int pgend = page_range_end;
int pgdst = 0;
wile(pgno < pgend)
{
[ctx import :pgno :pgdst];
pgno++;
pgdst++;
}
[doc_dst save];
ctx = nil;
doc_src = nil;
doc_dst = nil;
Last edit: 7 years 3 months ago by radaee.
Time to create page: 0.446 seconds