Jump to content

Enscript exportNotes question


dyuhas

Recommended Posts

I've discovered (or at least I think I have) an undocumented limitation to the Enscript exportNotes command: if the notebook name contains a space, then Enscript will not create the output file, and it will not display an error message. I've tried enclosing the query string in quotes (/q "notebook:Reading List - Books" or notebook:"Reading List - Books") to no avail. But when I changed the name of the notebook to Reading_List_Books then Enscript created the output file.

Must notebooks be named without spaces for exportNotes to work as advertised? Is this common knowledge that I've failed to pick up on?

One more thing, does Enscript return an errorlevel?

Link to comment
  • Level 5

Must notebooks be named without spaces for exportNotes to work as advertised? Is this common knowledge that I've failed to pick up on?

It's a bug in ENScript and it seems that renaming the notebook to remove the spaces is the only viable workaround. We'll address the bug in a future release. Thanks for pointing it out!

One more thing, does Enscript return an errorlevel?

ENscript returns 0 on success and 1 on failure.

Link to comment
  • 1 year later...
  • 10 months later...
  • 4 months later...
  • Level 5

You can make this work by quoting the notebook parameter as follows:

 

enscript exportNotes /q notebook:\""Reading List - Books"\"

 

To make the specific characters I'm using more obvious, I'll insert some spaces between them below for clarity (but don't do that when running the command :) )

 

notebook: \ " " Reading List - Books " \ "

Link to comment
  • Level 5*

Wow, I'm not sure that I would have ever guessed that that combination would work. :) The following works as well:


enscript showNotes /q notebook:"\"Test Notebook"\"

or, in expanded form:

 

notebook: " \ " Test Notebook " \ "
 

Which is a little more consistent, somehow.

Thanks for tracking that one down.

Link to comment
  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...