Takes too much time to save file with dropdowns - 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: Takes too much time to save file with dropdowns

Takes too much time to save file with dropdowns 3 years 5 months ago #9043

  • bhagyashree
  • bhagyashree's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
If pdf file have many drop down list then it taken much time to save file.

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

Takes too much time to save file with dropdowns 3 years 5 months ago #9047

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
Hi,
can you share the pdf used for this test?

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

Takes too much time to save file with dropdowns 3 years 5 months ago #9049

  • bhagyashree
  • bhagyashree's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hi,
Actually, It takes time when we make the file flatten.
To make file flatten, we removed all the annotations in the file by using library function 'vAnnotRemove'.

But, Before removing checkbox or dropdownlist annotation, we draw the images for them.
We have written following code before removing dropdownlist annot
float pageHeight = self.contentSize.height / m_doc.pageCount;
CGRect mrkupRect = CGRectMake([vpage ToDIBX:annotRect.left], [vpage ToDIBY:annotRect.bottom] + (pageHeight * pageno), [vpage ToDIBX:annotRect.right] - [vpage ToDIBX:annotRect.left], [vpage ToDIBY:annotRect.top] - [vpage ToDIBY:annotRect.bottom]);

UIImageView *mrkupView2 = UIImageView alloc] initWithImage:[UIImage imageNamed:mrkupRect.size.width < 10 ? @"checkboxsmallest.png" : @"checkbox.png";
mrkupView2.frame = mrkupRect;
mrkupView2.backgroundColor = [UIColor clearColor];

PDFMatrix *m = [[PDFMatrix alloc] init:fabsf(annotRect.left - annotRect.right) :fabsf(annotRect.top - annotRect.bottom) :annotRect.left :annotRect.top];
[thisContent gsCatMatrix:m];

[self addSubview:mrkupView2];
NSString *imgPath = [self createImageFromUIView:mrkupView2 withName:@"bullet"];
PDFDocImage *annotImage = [m_doc newImageJPEG:imgPath];
PDF_PAGE_IMAGE pgImage = [page addResImage:annotImage];
[thisContent drawImage:pgImage];
[page addContent:thisContent :YES];
[mrkupView2 removeFromSuperview];

and then [self vAnnotRemove];
Please suggest the changes or modification required in the above function to make the execution fast.
Also find attached file which takes time to save when we make it flatten.

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

Last edit: by bhagyashree.

Takes too much time to save file with dropdowns 3 years 5 months ago #9056

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
There is no attachment.

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

Takes too much time to save file with dropdowns 3 years 4 months ago #9179

  • bhagyashree
  • bhagyashree's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hello,
Actually we cannot share the attachments as these are the actual files used.
If you take a pdf with multiple drop-downs, you will be able to reproduce the issue.
Please do the needful.

Thanks!

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

  • Page:
  • 1
Powered by Kunena Forum