pdf: truncate only if really needed and only to 1Mb