Calling AddAnnotRect returns FALSE - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Calling AddAnnotRect returns FALSE

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4571

  • rhill
  • rhill's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Hi there, we are using iOS SDK and am able to display a PDF, however using the addAnnotRect call is always returning FALSE.
- (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:
	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.

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

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4575

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 847
  • Karma: 43
  • Thank you received: 12
Global_activePremium get package name inner.
and the operation is binding to the package name.

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

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4578

  • rhill
  • rhill's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
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)?

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

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4579

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 847
  • Karma: 43
  • Thank you received: 12
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().

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

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4580

  • rhill
  • rhill's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
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?

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

Calling AddAnnotRect returns FALSE 5 years 2 weeks ago #4584

  • rhill
  • rhill's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
It's okay, I guessed what you meant and set my bundle identifier to com.radaee.pdf.PDFViewer. The annotations now appear. Thanks

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

  • Page:
  • 1
Powered by Kunena Forum