Create PDF document without the navigation pane
I love your library, thank you! I am using Rotativa v1.6.4 to create a PDF document based on a Razor view:
return new ViewAsPdf("GetPrintableBennies", bennies) { PageSize = Size.Letter, PageMargins = { Left = 0, Right = 0, Top = 0, Bottom = 0 } };
I display the resulting PDF embedded in a browser. My problem is that the navigation pane on the left side of the document is always open (bookmarks, search, comments...). This navigation pane is irrelevant in a one-page document and takes up too much space! My research tells me that whether the navigation pane is initially opened or closed is determined by the document. My question is: how can I generate the PDF document with the navigation pane closed? Any assistance would be greatly appreciated. -RS
setup a @print Style sheet. that hides any unwanted elements on the page. then pass " --print-media-type " as part of your CustomSwitches.