To export PDF with the size of the diagram instead of the page size, disable the page view. Make sure nothing in your diagram is selected, then in the panel on the right, deselect the Page view checkbox. 

Alternatively, you can change the scale and add a border by using the advanced export settings. 

1. Click File > Export As > Advanced

2. Select PDF from the Format drop down. 

3. Change the export settings to suit your requirements, then click Export.