Why can't I convert large Excel files on iOS, using convertOfficeToPDF?


With PDFNet SDK for iOS, I’m using PTConvert’s convertOfficeToPDF to convert Excel documents to PDF. I have one Excel document that’s longer than ~4096 rows, but when I convert it the output stops at ~4096 rows. What’s going on?


Unfortunately it would seem not as the problem appears to be a limitation of UIWebView, which PDFNet uses internally for conversion. Loading the Excel document into a UIWebView directly also shows only 4094 rows.

An Apple software developer unofficially confirmed this limitation in the following post:


Because of limitations like this, we are currently developing our own XLSX->PDF conversion so that we can address such behaviour directly.

One workaround could be to split the Excel document into multiple files and convert them one-by-one. You could then merge the PDFs together using PDFNet (https://www.pdftron.com/pdfnet/samplecode.html#PDFPage).