Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

How to shrink PDF file size using Microsoft Print to PDF






The "Microsoft Print to PDF" functionality is often used when you don't have a license of Adobe and still would like to print your PDF as another PDF, e.g., print PDF to get rid of all security/password related restrictions of the original document.

While the functionality is awesome and free, one limitation might be the output file size sometimes is less optimized, which results in oversized file to upload to some websites. For example, the Original Doc in the following is 1,852KB only while using the "Microsoft Print to PDF" default settings results in 19,390KB. I cannot upload the file to a website with an upload limit of 10MB for instance.




Microsoft Print to PDF default setting


As an alternative, I found that enabling the "Print As Image" option in the "Advanced" option reduces the file output size to some extent, as shown in the first figure above. As we can notice from the figure, with this setting, the output file size is reduced to 5,166KB compared to 19,390KB. Now I can submit this file to the website with an upload limit of 10MB.

Microsoft Print to PDF enable "Print As Image"




Jupyter notebook download as pdf: nbconvert failed: Pandoc wasn't found. nbconvert failed: No suitable chromium executable found on the system. Please use '--allow-chromium-download' to allow downloading one.



Install Pandoc

After that you need to have XeTex installed on your machine:
  • Linux : TeX Live
  • Mac : MacTex
  • Windows : MikTex

Install nbconvert and pyppeteer

pip install nbconvert
pip install pyppeteer

Now we can convert an ipynb file to to PDF via HTML or via Tex.

jupyter nbconvert --to webpdf --allow-chromium-download filename.ipynb
or 


jupyter nbconvert --to pdf filename.ipynb

filename.ipynb is the filename of your file to be converted to a PDF file.

Annotating PDF files using Wacom One

Wacom One does a decent job for writing on MS Powerpoint slides, and also its whiteboard. But when I try to use it for writing on PDF, it seems something is not right and it is extremely difficult to write on PDF files with the "Comment"=>"Draw" functionality of PDF with Wacom One.

After digging a little bit, I found out a workaround where you can change settings of Wacom Tablet Properties to make it working reasonably well on PDF files.

First, search the "Wacom Tablet Properties" and open it.




Secondly, go to "Mapping" and you will find at the bottom there is "Use WIndows ink" checked by default. UNCHECK it and close the window.



That's it! Now you will find writing on PDF files are musch smoother than before.

How to manage PDF files between laptops and iPAD?

If you'd like to manage(sync) files between different devices like laptops, iPAD, smart phones, there are several cloud service options available for you like Dropbox with 2GB free space and Onedrive from Microsoft with 10GB free and so forth. There's no difference among these solutions if you only want to use file synchronization function, and there's no doubt about that the larger space, the better the service is in this case. 

I'd like to show manage files between laptops and iPAD and including modifying files within the flow.

1.Dropbox

If you registered Dropbox and installed it in your computer, the icon will be shown in under your favorite automatically. You could save any files you want to save in the Dropbox cloud service and use it in another devices. The reason why I choose Dropbox over Onedrive is because PDF note (which is the iPAD app can manage PDF files efficiently) only support to sync with Dropbox and Google Drive.


2.PDF notes (iPAD application for managing PDF)

It is free to download and can manage PDF files importing from Dropbox, Google Drive and can mark sentences and modify PDF while reading. After you mark on whatever parts you'd like to, you could also save the modified file and upload the modified version to Dropbox. Then you could read the version from your desktop or laptop and other devices as well.