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

Takes too much time to save file with dropdowns

More
11 years 3 months ago #9043 by bhagyashree
If pdf file have many drop down list then it taken much time to save file.
More
11 years 3 months ago #9047 by emanuele
Hi,
can you share the pdf used for this test?
More
11 years 3 months ago - 11 years 3 months ago #9049 by bhagyashree
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.
Last edit: 11 years 3 months ago by bhagyashree.
More
11 years 3 months ago #9056 by support
There is no attachment.
More
11 years 2 months ago #9179 by bhagyashree
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!
Time to create page: 0.465 seconds
Powered by Kunena Forum