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

TOPIC:

Move image 5 years 9 months ago #13971

  • thirukamu
  • thirukamu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
I am using below code to draw an image, i am able to resize the image. But unable to move the image

- (void)drawStampStart:(CDVInvokedUrlCommand*)command
{
self.cdv_command = command;

NSDictionary *params = (NSDictionary*) [cdv_command argumentAtIndex:0];

NSString *imageBase64 = [params objectForKey:@"image"];

if (imageBase64 == nil) {
[m_pdf drawImage];
} else {
NSData *data = [[NSData alloc] initWithBase64EncodedString:imageBase64 options:0];
UIImage *image = [UIImage imageWithData:data];
[m_pdf drawImageWithImage:image];
}


[self cdvOkWithMessage:@"success"];
}

Is it possible to move the image? or if i can place the image as annotation can it be moved.

Appreciate your support.

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

Move image 5 years 9 months ago #13974

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

you should edit canMoveAnnot method in PDFObjc class in this way:
- (BOOL)canMoveAnnot
{
return (self.type == 4 || self.type == 5 || self.type == 6 || self.type == 13 || self.type == 15);
}

to move image annotations
The following user(s) said Thank You: thirukamu

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

Move image 5 years 9 months ago #13989

  • thirukamu
  • thirukamu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Its working, Thanks a lot.

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

  • Page:
  • 1
Powered by Kunena Forum