0

I use the Notability app for note taking in my iPad. I need to export one of my notes and upload it to a web site with file size restrictions (unfortunately I don't know the maximum size, but I have reason to believe it is 2 MB).

A 12-page-long note, consisting only of written text/mathematics and a single grayscale imported figure in one of the pages is taking up 10+ MB, which is frankly outrageous. Also, I'm pretty sure taking out the figure would make little difference; seems like the developers never paid attention to exported file sizes.

How can I reduce this to fit into my 2 MB budget?

Ideally I'd like to flip a switch inside Notability itself which reduced the export file size, but I don't think anything like that exists.

Otherwise, I'm looking for free tools which would help me reduce the file size. EDIT: online tools are not a possibility, as I can't run the risk of my file being stored and later distributed somehow.

I've already tried exporting a PDF from Preview.app with the "Reduce File Size" filter, which didn't make a difference.

Ghostscript fared a little better: gs -o out.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET in.pdf reduced the file size to 7 MB, but it's not enough for me.

ImageMagick's convert tool produced output that could be barely classified as readable, even at an alleged 600 DPI.

I also tried exporting JPEGs from Notability and concatenating them with Preview.app, which produced a 4 MB file size, still unsuitable for me (and also, I lose vector rendering, searching, etc. that way, which if possible I'd like to retain).

My best result until now was running this 4 MB file through gs -o out.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET in.pdf (note ebook instead of printer). It is readable, although visibly compressed, and takes up 1.3 MB. Lacking any other options, this is the file I'm going to submit, but I'm hopeful there's a better solution.

Any other suggestions?

  • What is the file size per page? Are you limited to the tools on your iPad or can you use a desktop computer to modify the output files? – Thunder_Ruler Apr 4 at 22:31
  • As it came out of Notability, about 800 KB/page. I don’t mind processing it on my computer, but I won’t submit to online services of unknown origin. Since posting the question, though, I’m quite convinced the fault lies with Notability developers and the way they encode pencil strokes on PDF, which seems very wasteful. Apparently only they could fix it by moving to a more efficient encoding. – swineone Apr 4 at 22:35
  • So were you able to solve it with Notability? I was going to make the suggestion of using a third part program like photoshop or paint.net to compress high resolution jpegs but limited to a set number of colors (2 page colors & 5 pen colors) with moderate compression which would bring down the file size to <70kb a page possibly. But you would loose all ability to search words. – Thunder_Ruler Apr 4 at 22:43
  • I haven’t solved it, the situation remains the same as reported in the question. I did get lucky that my web service increased the upload quota to 7 MB, but that already requires some post-processing to reach that size, and for a slightly larger document, even post-processing would not solve the problem. In that case I will have to move to an image-based version of the file. – swineone Apr 4 at 22:55
1

Assuming your top priority is to minimize file size. You are going to have to sacrifice and switch over to an image format. Notability uses a vast amount of vectors in order to keep your handing writing sharp and readable at any size, so we will need to discard that information in favor of a simpler , less sharp jpeg file.

If you have photoshop, export all the files from Notability into an image format and bring them into your desktop to work on. Opening all the images inside Photoshop, use the “save for web” feature and select the absolute minimum of colors possible. I suggest 2 colors for the page (background & lines), and and 3-5 colors for pens (black, red, blue, green, is okay with dithering ).

This will allow you to create an image with minimal compression, at a sharper resolution.

If you have GIMP (free and open source <3): You can add an extension that gives you similar functionality to that of Photoshop’s “save for web” function. Here is a guide to how to install and use its different options on TemplateToaster.com.

These are both options for bringing 1920x1080 images down to about ~<80 KB each with readable text and minimal compression.

Edit:

I thought I would include an example that I create with my own notes, exported to Jpeg directly from Goodnotes 5 (this works regardless of program). All images are at the native resoultion of 1668x2154

Below are the results you can expect to see. Image hsowing the difference in files sizes between compressed images and non compressed On the right, are the original, straight from Goodnotes exported jpegs. On the left, are the images compressed down with the "save for web" plugin on Gimp.

Below are the options that I used for most of the pages, with the exception of pages with images, where instead the "use web-optimized pallete" option was selected. Note how there are only 5 colors.(page, page line, 2 pen colors, white text) image showing options used for exporting png's from Gimp

Using this option will retain all text sharpness from the original exported text. Below is difference in quality, on the left is the compressed image, and the right uncompressed.

Image showing the difference in quality in text

This should answer your question. As previously stated, you cannot expect to maintain the .pdf format and submit your work under such a tight data budget. The size of all the files combined together in the first image is in relative to a normal folder with all the images inside. When .zipped, you can expect an even larger file reduction (depending of course on the level of compression that you select with something like 7zip). As I predicted in my orignal response, the average file size among the 13 pages is 76.38 kb, just 3.62 kb under.

| improve this answer | |
0

You could use PDFsam to split your pdf into smaller parts and see if you can load the separate files. PDFsam stands for PDF split and merge. It's a free package and it runs on a mac. Maybe split your file into multiple files and see which ones will load. This may help you find what is causing the file to be so large. If file split PDF 3, for example, is 10 MB maybe you can track down why your file is so large and fix it at the source. If all the split files are large maybe that will tell you something.

| improve this answer | |
0

You could see if Exporting to PostScript and then re-distilling as PDF improves matters. In Preview, click on Export, and then hold Alt and click on the drop-down list of file Formats. (Alt will provide a bigger list of formats.)

Select PostScript, save the file, and then run the .ps file through GhostScript to create a new PDF.

I'm a bit worried when you say that the text appears visibly compressed -- that would suggest that the text is an image, rather than ... well, text. Ideally, text data should be smaller than pages of images.

| improve this answer | |
  • Text is compressed after exporting it as JPEG images and concatenating them together, so that I can start from a 4 MB file rather than a 10 MB one. – swineone Apr 2 at 2:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .