moved cli replacePdf transaction to package level (more secure)