Skip to content

Commit 6f84cdd

Browse files
committed
Updated for 3.5 compatibility
1 parent 816ce2b commit 6f84cdd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
var doc = doc || context.document
2-
MSPDFBookExporter.exportPages([[doc currentPage]])
1+
var doc = doc || context.document,
2+
filename = "Untitled"
3+
4+
if (doc.fileURL() != null) {
5+
filename = doc.fileURL().path().lastPathComponent().stringByDeletingPathExtension()
6+
}
7+
8+
MSPDFBookExporter.exportPages_defaultFilename_([doc.currentPage()], filename)

0 commit comments

Comments
 (0)