How to get smaller pdf

Hello, I am converting visio to pdf, my code like this,

Diagram dgrm = new Diagram(oriFilePath);
dgrm.save(pdfPath, SaveFileFormat.PDF);

source file as below, it is 41MB, but the outcome pdf is 288MB, I just want to get a smaller pdf, are there any parameters I can use?

@guguzzz
Thanks for the template file.
I apologize, but the source file contains numerous NURBS curves. Currently, fitting these NURBS curves results in generating multiple lines, and we are unable to modify this algorithm in the near future.
Thanks.