To export just the first page, you need to set the export range in pngExportPreferences.So for example:app.pngExportPreferences.pngExportRange = PNGExportRangeEnum.EXPORT_RANGE; app.pngExportPreferences.pageString = "1"; doc.exportFile(ExportFormat.PNG_FORMAT, File(articleName.replace(".article",".p...