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

Issue in developement - IOS

More
IP: 192.168.0.71 11 years 5 months ago - 11 years 5 months ago #7013 by vkinjan86
Hello their...
I have an error in following line of code ,Which is directly copy-paste from pdf file included in sdk zip.
I have create PDf Doc object like :
PDF_DOC m_doce;
And I have Error in code below:
- (int)PDFOpen:(NSString *)path withPassword:(NSString *)pwd
{
[self PDFClose];
const char *cpath = [path UTF8String];
PDF_ERR err = 0;
const char *password = [pwd UTF8String];
m_doce = Document_open(cpath, password, &err);
if( m_doce == NULL )
{
switch( err )
{
case err_password:
return 2;
break;
default: return 0;
}
}
CGRect rect = [[UIScreen mainScreen]bounds];
float hi = self.navigationController.navigationBar.bounds.size.height;
m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height-20-hi)];
[m_view vOpen:(m_doce): self];<
<
Error showing on m_doce
[self.view addSubview:m_view];
return 1;
}
For further explanation I have attached image also..
I am using
Xcode : Version 5.1.1 (5B1008)
iOS Simulator : Version 7.1 (463.9.41)
OS X : 10.9.4
Last edit: 11 years 5 months ago by shlomok.
More
IP: 192.168.0.161 11 years 5 months ago #7015 by emanuele
Hi,

try to init m_doc in this way:

PDF_ERR err = 0;
m_doc = [[PDFDoc alloc] init];
err = [m_doc open:path :pwd];

instead of:

m_doce = Document_open(cpath, password, &err);
Time to create page: 0.396 seconds
Powered by Kunena Forum