I don’t think so, didn’t checked deeply but seems that Capacitor “just” create a File from what you provide, so if you provide a pdf path it should create a pdf file (see https://github.com/ionic-team/capacitor/blob/781d2307fe92f535c1ec2a692ac6c0f1dcbe924f/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java#L212)
What’s the value of the path
you are providing to Capacitor writeFile? Does it contains the extension “.pdf”?