Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF

TOPIC:

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6379

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
when you add a bitmap, you have to set "has_alpha" parameter to true, in Page_addAnnotBitmap method.
I also tried to add a png with transparent background with success

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

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6386

  • Rossi
  • Rossi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 49
  • Thank you received: 0
ok, now also i add successfully png with transparent background, but app crash frequently at this function
-(bool)IsFinished
{
if( m_cache )
return [m_cache Stat] == 1;
if( m_thumb )
return [m_thumb Stat] == 1;
return true;
}
in PDFVPage on
return [m_cache Stat] == 1;
with EXEC_BAD_ACCESS error

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

Last edit: by Abdikayrov.

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6401

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
It crashes when you add a bitmap? or in another case?

There is a specific sequence to get this crash?

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

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6402

  • Rossi
  • Rossi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 49
  • Thank you received: 0
Yes, it crash when i add the bitmap. I add the bitmap the page begin the render but crash before showing the image.

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

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6403

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
i think you shall add bitmap first, then, invoke vRenderSync to re-render the page.

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

addAnnotBitmap doesn't work in 2.2.0 10 years 10 months ago #6407

  • Rossi
  • Rossi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 49
  • Thank you received: 0
I not find vRenderSync function.
This is my code:
CGImageRef ref = [[UIImage imageNamed:@"emoticon"] CGImage];
PDFMatrix *mat = [vpage CreateMatrix];
BOOL result = [page addAnnotBitmap:mat.handle :ref :YES :&rect];
Matrix_destroy(mat.handle);
[m_view vRenderPage:pos.pageno];
[self refresh];

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

Last edit: by Abdikayrov.
Powered by Kunena Forum