MATLAB: How to save simulink block diagram as pdf

diagramMATLABsimulink

Hello ,
i want to save simulink block diagram as pdf , is there any way to do this in simulink ?
saveas(h,'withseparateactuating2connect','pdf') Undefined function or variable 'h'.
i have tried as above , its is mentioned in matlab help
but giving me error for 'h'

Best Answer

Do you just want an image of the top-level model to be exported to a PDF file? If yes, I think you can just use the File>Print option and select a PDF Printer. If you're looking for a more extensive look inside subsystems, etc., I only know of the Simulink Report Generator product which lets you export the model as a Web View (HTML files), which is clickable.