}
private void createPdfDocumentFileFromTIFF(File tiffFile, File pdfFile) throws Exception {
Document document = new Document(PageSize.A4, 0.0f, 0.0f, 0.0f, 0.0f);
PdfWriter.getInstance(document, new FileOutputStream(pdfFile));
document.open();
RandomAccessFileOrArray ra = new RandomAccessFileOrArray(tiffFile.getCanonicalPath());
int pageCount = TiffImage.getNumberOfPages(ra);
for (int i = 0; i < pageCount; ++i) {
God.appWindow.getStatusBar().setInitProgress(i, pageCount);
Image img = TiffImage.getTiffImage(ra, i + 1);