Re: Version 6 NotebookPrint to file not woking for me
- To: mathgroup at smc.vnet.net
- Subject: [mg78638] Re: Version 6 NotebookPrint to file not woking for me
- From: Mark Fisher <mark at markfisher.net>
- Date: Thu, 5 Jul 2007 06:19:26 -0400 (EDT)
- References: <f6fq5m$8fk$1@smc.vnet.net> <f6i8er$1cb$1@smc.vnet.net>
Jean-Marc Gulliet wrote:
> Mark Fisher wrote:
>> I see that NotebookPrint can take a file name as a second argument such
>> as "test.pdf". On my system this does not seem to actually write a file
>> or produce any output. If this is working for others, I'll try again; if
>> not, I'll report it as a bug (if someone hasn't reported it already).
>>
>> $Version --> "6.0 for Microsoft Windows (32-bit) (April 20, 2007)"
>>
>> --Mark Fisher
>
> Mark,
>
> The following works fine on my system: I can open the newly created file
> in Acrobat Reader. The PDF document is created int the directory pointed
> by the system symbol $UseDocumentDirectory. Have you check there? (Note
> that Mathematica does not return any messages that would indicate that
> it successfully created the file.)
>
> In[1]:= nb = CreateDocument[{x^2}];
> NotebookPrint[nb, "temp.pdf"]
>
> In[3]:= $UserDocumentsDirectory
>
> Out[3]= "C:\\Documents and Settings\\Jean-Marc\\Mes documents"
>
> In[4]:= $Version
>
> Out[4]= "6.0 for Microsoft Windows (32-bit) (April 20, 2007)"
>
> Regards,
> Jean-Marc
>
Ah-ha! $UserDocumentsDirectory! Never heard of it. I've been using
Mathematic since Version 2.2. It appears to be new in Version 6. I
expected NotebookPrint to write to the directory returned by Directoy[].
I didn't see $UserDocumentDirectory mentioned in the documentation
for NotebookPrint. Is there something I *should* have done to discover
this? How do you know about it?
Thank you.
--Mark