Glad to share... I had this code to do my online nb printing (in PDF) :
SetOptions[SelectedNotebook[],PrintingStyleEnvironment → "Printout", ShowSyntaxStyles → True]
CloudExport[EvaluationNotebook[], "PDF", Permissions → "Public"]
And if I want to view all hidden cell before printing, I'd run this one too (then Select all cells [Ctrl+A] , then use menu to Expand all selected cells) :
SetOptions[EvaluationNotebook[], ShowCellBracket → True]
Hope it helps.
Ref : multiple web search & trials. /(^_^)