- Posts: 21
- 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
Calling AddAnnotRect returns FALSE
IP: 192.168.0.70
12 years 4 months ago #4571
by rhill
Calling AddAnnotRect returns FALSE was created by rhill
Hi there, we are using iOS SDK and am able to display a PDF, however using the addAnnotRect call is always returning FALSE.
I have made sure the PDF file is writable.
In the app delegate I am calling:
And when I look at the definition of APP_Init() it seems that the Global_activePremium line is active (the others are commented out).
We have not yet licensed the SDK from you and so I've just followed the information in the iOS help file which tells me how to integrate the relevant files from the demo app into my project.
Code:
- (void)addAnnotations {
PDFPage *annotationPage = [m_doc page:0];
if (annotationPage != nil) {
PDF_RECT rect;
rect.top = 175.0;
rect.left = 284.0;
rect.right = 470.0;
rect.bottom = 524.0;
[annotationPage objsStart];
BOOL success = [annotationPage addAnnotRect:&rect: g_rect_Width: g_rect_color: 0];
NSLog(@"success: %d", success);
if (success) {
NSLog(@"annotation added");
} else {
NSLog(@"annotation NOT added");
}
}
}
I have made sure the PDF file is writable.
In the app delegate I am calling:
Code:
APP_Init();
And when I look at the definition of APP_Init() it seems that the Global_activePremium line is active (the others are commented out).
We have not yet licensed the SDK from you and so I've just followed the information in the iOS help file which tells me how to integrate the relevant files from the demo app into my project.
IP: 192.168.0.70
12 years 4 months ago #4575
by radaee
Replied by radaee on topic Calling AddAnnotRect returns FALSE
Global_activePremium get package name inner.
and the operation is binding to the package name.
and the operation is binding to the package name.
IP: 192.168.0.70
12 years 4 months ago #4578
by rhill
Replied by rhill on topic Calling AddAnnotRect returns FALSE
Thanks for the reply. Can I just clarify: are you saying that I need to change the package name passed to the Global_activePremium - i.e. change it to match the iOS bundle identifier I am using (com.fred.fred) OR do I need to change my iOS bundle identifier to match the one currently passed to Global_activePremium (com.radaee.pdf.PDFViewer)?
IP: 192.168.0.70
12 years 4 months ago #4579
by radaee
Replied by radaee on topic Calling AddAnnotRect returns FALSE
APP_Init() in the demo project is binding to com.radaee.pdf.PDFViewer.
if you changed project package name to com.fred.fred, you need a license.
and need to modify codes of APP_Init().
if you changed project package name to com.fred.fred, you need a license.
and need to modify codes of APP_Init().
IP: 192.168.0.70
12 years 4 months ago #4580
by rhill
Replied by rhill on topic Calling AddAnnotRect returns FALSE
Okay thanks for the reply, I'm really sorry but I'm not clear on what I need to change in APP_Init(), can you tell me?
IP: 192.168.0.70
12 years 4 months ago #4584
by rhill
Replied by rhill on topic Calling AddAnnotRect returns FALSE
It's okay, I guessed what you meant and set my bundle identifier to com.radaee.pdf.PDFViewer. The annotations now appear. Thanks
Time to create page: 0.420 seconds