Skip to main content
Skip table of contents

save (PdfUtils)

Versionshinweise

21.1, 20.2.03, 20.1.10, 19.2.16

Code

CODE
void save(PdfDocument pdfDocument) throws Exception

Beschreibung

Speichert die übergebene PDF Datei unter Verwendung des aktuellen Dateinamens.

Parameter

  • pdfDocument
    Repräsentiert das PDF Dokument


Exception 
Wird geworfen, wenn die PDF Datei nicht gespeichert werden kann.

Beispiele

CODE
IPdfResult openResult = PdfUtils.openFile("C:\\Work\\myPDF.pdf");


if (!openResult.isSuccessful())
{
 ScriptUtils.debug("Error: " + openResult.getFileName() + " - " + openResult.getErrorCode());
 /** do furthermore */
 return;
}


PdfDocument pdfDocument = null;

try
{
  pdfDocument = pdfResult.getPdfDocument(); 
  ...
  PdfUtils.save(pdfDocument);  
}
catch (Exception dpe)
{
  ScriptUtils.logException(dpe);
}
finally
{
 if (pdfDocument!=null)
 {
     PdfUtils.close(pdfDocument);
 }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.