I am working on a PDF app which imports pdf document from Mail app. After importing the file (2 MB) in the app and opening it using PDFKit PDFDocument class the file size increases to 35 MB. I checked it by using PDFDocument.dataRepresentation() method and saving it in documents directory.
Can someone help me understand why does the file size increases by such a huge number? What is the best way to handle this situation?
Related
I followed this document for handling multipart form data
I can upload ok with file size below 2GB. With the size is greater than 2GB, the application sends nothing.
Does anyone have experience in uploading large files using fsharp.data?
I am uploading PDFs from Dropbox/iCloud. But file sizes are like 50MB, 100MB. As of app requirement, there is no limit for file size to upload. How to reduce the file size before uploading to server?
You can use libHaru library to generate any kind of pdf. Try to reduce your pdf size while creating the pdf itself.
I'm trying to load a large video file (over 700MB) into memory from the documents directory using let data: NSData = NSFileManager.defaultManager().contentsAtPath(path)! but it crashes my app. Smaller files load fine. Is there a better way to load larger files? Thanks.
Depending on what you want to do with the file, using NSData.init(contentsOfURL:options:) with the option .DataReadingMappedIfSafe may work for you.
This will map the file into memory (if possible), i.e. the file's contents will only be loaded (page by page) as you access them via the bytes property.
I am using Carrierwave uploader V0.10.0 for my rails project (on RHEL) to upload 310 MB of zip file to server. While the file is being transferred, I could see the server's available memory is decreasing. After the file gets downloaded and when the call returns to the controller to save the uploaded file, I could see the deduction of 3 times (of zip file, say 930 MB) size of memory from available file system space. I am not able to figure out why it is happening.
I have tried for almost 2 days but unable to find any solution. I am doubtful whether it's a bug, but not sure.
I have downloaded some pdf files in my documents directory. I can view most of these files with QLPreviewController; however, when I try to open one especially large file (almost ~250 MB), QLPreviewController only shows the title of file with its size. Don't know how, but ONLY ONCE while debugging the issue it successfully loaded this file.
How do I resolve this?