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:
//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