- Posts: 20
- Thank you received: 0
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
- bhagyashree
- Topic Author
- Offline
- Junior Member
-
Less
More
11 years 3 months ago #9043
by bhagyashree
Takes too much time to save file with dropdowns was created by bhagyashree
If pdf file have many drop down list then it taken much time to save file.
11 years 3 months ago #9047
by emanuele
Replied by emanuele on topic Takes too much time to save file with dropdowns
Hi,
can you share the pdf used for this test?
can you share the pdf used for this test?
- bhagyashree
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
11 years 3 months ago - 11 years 3 months ago #9049
by bhagyashree
Replied by bhagyashree on topic Takes too much time to save file with dropdowns
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.
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.
11 years 3 months ago #9056
by support
Replied by support on topic Takes too much time to save file with dropdowns
There is no attachment.
- bhagyashree
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
11 years 2 months ago #9179
by bhagyashree
Replied by bhagyashree on topic Takes too much time to save file with dropdowns
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!
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