HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ How to change the directory where the temp file is stored

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26357

    We are trying to create a scheduled agent in Lotus Notes that generates PDFs and run into a permission issue(no acces to c:windowstemp). Generally, we only have access to the directory where the Domino service runs (which is not on the c: drive). Is there a way to pass a parameter to File.createTempFile so we can define the file location? If not, please provide an alternate solution to the problem we are experiencing.

    This is the error we get:
    03/24/2010 10:57:02 AM AMgr: Agent (‘Create PDF (test scheduled)’ in ‘ZDEVCB&I APPLICATIONSTravelTravelAuthorizationPDF.nsf’) error message: java.lang.SecurityException: not allowed to access or modify file: C:WINDOWSTEMPCB&I PreTrip #2010-002331492.pdf

    #27929

    Java API offers an alternative method to create tmp file, which allows to specify tmp/ directory location:

    createTempFile(String prefix, String suffix, File directory)

    A call of the method may look like that:

    File file = File.createTempFile(“attachment”, “.” + fileName, new File(“e:\another\temp”));

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.