Credits: Based on http://tex.stackexchange.com/a/208824/24794
.tex file using following command:
# Increase buffer size to support large images # Setting the environment variable to a higher value works here export buf_size=99999999999 # To do this permanently, you'll have to update `texmf.cnf` file. # To know the location of `texmf.cnf` file type following command kpsewhich texmf.cnf # On Ubuntu, output is: /etc/texmf/web2c/texmf.cnf
Add/Change following settings/values:
Now you need to run
fmtutil-sys --all. You may have to use sudo for this.
xelatex -interaction=nonstopmode -shell-escape sample_inline_image.tex