How to display single line in drawbot-plugin?

I use a single line to do the path, some are not closed, some are closed, I want to print a PDF with drawbot-plugin, use .completebezierpath and .completeopenbezierpath can not achieve my effect, the software’s own print is correct display, how should I write code?