Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Pdf Generator. Filling up Temp Space..

Avatar

Level 1

I am converting Tiff to PDF's and optimizing using LiveCycle large no of Tiffs around 1500. It works good, but fills up temp space and starts failing. Here is the code. Please let me know how to clean up the Temp folder on the server..Any suggestions is greatly helpful!!

for (File f : packages.listFiles()) {

  inputFileName = f.getPath();

  fileInputStream = new FileInputStream(inputFileName);

  inDoc = new Document(fileInputStream);

  pdfResult = pdfGenClient.createPDF2(inDoc, ".tif", fileTypeSettings, adobePDFSettings,securitySettings, null, null);

  optResult = pdfGenClient.optimizePDF(pdfResult.getCreatedDocument(), null, null);

  inDoc = optResult.getConvertedDocument();

  // Save the converted PDF document as a PDF file

  inDoc.copyToFile(new File(outputPath + "\\" + f.getName().substring(0, f.getName().indexOf(".tif")) + ".pdf"));

}

Temp folder..

C:\Windows\Temp\pdfg-MACHINE01_\..

1 Reply

Avatar

Employee Advisor

Try disposing the document finally and check whether it makes any difference.

Thanks

Wasil