I want to impose my document in code however I notice I can’t even do it manually. For example when I specify something like “3,30” in page range in the Export PDF Dialog settings, it exports two specific pages as a spread instead specifically pages “2,3”. Is there a way to export individual pages as spreads from Indesign to pdf or it just doesn’t work that way?
The code that I have which works for the most part but again doesn’t export individual pages as spreads
for (let index = 0; index < app.activeDocument.pages.length / 2; index++) {
const pageCount = app.activeDocument.pages.length
const pagesToExport = `${pageCount - (pageCount - index - 1)}, ${pageCount - index}`
app.pdfExportPreferences.pageRange = pagesToExport
app.pdfExportPreferences.exportReaderSpreads = true
app.pdfExportPreferences.exportAsSinglePages = true
app.pdfExportPreferences.optimizePDF = true
app.pdfExportPreferences.viewPDF = false
app.activeDocument.exportFile(ExportFormat.PDF_TYPE, `C:\\Users\\blaah\\OneDrive\\Documents\\fall 2023\\imposition\\test${index}.pdf`, false)
}