Action

RootDir="C:\\drorbn\\AcademicPensieve";
OpenNotebooks = Notebooks[];
UpdatePDF[NotebookFilename_String] := (
SplitName = StringSplit[NotebookFilename, {"\\", "/"}];
PDFFilename  = ToFileName[
PDFDir = ToFileName[Append[Drop[SplitName, -1], "views"]],
StringDrop[Last@SplitName, -2]<>"pdf"
];
If[
Or[
FileType[PDFFilename] === None,
AbsoluteTime[FileDate[PDFFilename]] < AbsoluteTime[FileDate[NotebookFilename]]
],
Print["Exporting ",NotebookFilename, " into ", PDFFilename," ..."];
If[FileType[PDFDir] === None, CreateDirectory[PDFDir]];
NotebookPrint[nb = NotebookOpen[NotebookFilename], PDFFilename];
If[!MemberQ[OpenNotebooks, nb], NotebookClose[nb]],
Print["Skipping ", NotebookFilename,"."]
]
);
UpdatePDF /@ FileNames["*.nb", {RootDir}, Infinity];

Delete all PDF files

False && DeleteFile[
(StringDrop[#, -2]<>"pdf")& /@ FileNames["*.nb", {RootDir}, Infinity]
]

Experiments

Export["C:\\drorbn\\AcademicPensieve\\MathematicaMake.html", nb = NotebookOpen["C:\\drorbn\\AcademicPensieve\\MathematicaMake.nb"], "MathOutput" -> "DisplayForm"]

FileType[PDFFilename]

?*Directory*

Component Object Model Experiments

Following http : // reference.wolfram.com/mathematica/NETLink/tutorial/CallingNETFromMathematica.html

PDF Creator

<< NETLink`

InstallNET[]

pc = CreateCOMObject["PDFCreator.clsPDFCreator"]

opts=pc@cOptions

opts@AutosaveFilename = "test"

opts@AutosaveFilename

pc@cSaveOptions[opts]

pc@cStart["/NoProcessingAtStartup"]

OneNote

Following http : // msdn.microsoft.com/en - us/library/ms788684.aspx

<< NETLink`
InstallNET[]

on=CreateCOMObject["OneNote.Application"]

If[!NETObjectQ[on], $Failed,
on@OpenHierarchy[
"C:\\drorbn\\AcademicPensieve\\PublicNotebook\\2008-11.one",
"",
doc
];
on@Publish[
doc,
"C:\\drorbn\\AcademicPensieve\\PublicNotebook\\Annotations\\views\\EtingofKazhdan.pdf",
3,
""
]
]

on@OpenHierarchy[
"C:\\drorbn\\AcademicPensieve\\PublicNotebook\\2008-11.one",
"",
doc
]; doc

on@GetPageContent[doc, content]; content

on@GetHierarchy[doc,4, hier]; hier

on@NavigateTo[doc, "{2C2DBCEB-B999-4BA3-94D8-CDF30D8F0911}{1}{B0}"]

on@NavigateTo[doc, doc]