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

Text field shifts after flattening

More
IP: 71.10.183.243 7 years 6 months ago - 7 years 6 months ago #14051 by jhaskins



I have an issue that is only happening on some PDF files. The fields that are shifting have the comb property applied to them. However, not all fields with that property display incorrectly. Also, the issue only appears after I flatten the PDF:
Code:
//flatten pdf // create and load the document. PDFDoc *pdfDocument = [[PDFDoc alloc] init]; PDF_ERR err = [pdfDocument open:[destinationPath stringByAppendingPathComponent:fileName] :nil]; // create the cache. NSString *cacheName = [[NSTemporaryDirectory() stringByAppendingString:@""] stringByAppendingString:@"cache.dat"]; [pdfDocument setCache:cacheName]; // get the page count. int pageCount = [pdfDocument pageCount]; // loop through the pages. for (int pageIndex = 0; pageIndex < pageCount; pageIndex++) { // get the page and prepare it. PDFPage *page = [pdfDocument page:pageIndex]; [page flatAnnots]; } [pdfDocument save];

Using 3.8.1
Last edit: 7 years 6 months ago by jhaskins.
More
IP: 212.97.62.176 7 years 6 months ago #14052 by emanuele
Hi,

first of all you can try to update your project with the latest lib version (now is 3.8.5).
You can also share your pdf file and we'll check it
Time to create page: 0.383 seconds
Powered by Kunena Forum