# Create PDF file using the file plugin

**URL:** <https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892>\
**Category:** Classic Servoy\
**Created:** [September 17, 2010, 2:46pm UTC](https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892 "2010-09-17T14:46:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diana.bodnarescu](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@diana.bodnarescu](https://forum.servoy.com/u/diana.bodnarescu)\
**Post date:** [September 17, 2010, 2:46pm UTC](https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892/1 "2010-09-17T14:46:14Z")

</div>

Hi,

I am using Servoy 3.5.12 and i am encounterring an issue with the file plugin:

plugins.file.writeFile(vFullPath, vBlob)

returns true but creates a file with 0 kb sometimes when the file type is a pdf.

I select the blob from the database, any idea what could be the reason of this?

Thank you,  
Diana

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [September 17, 2010, 3:25pm UTC](https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892/2 "2010-09-17T15:25:20Z")

</div>

I have seen this also, but in all my cases, the blob was empty!

---

<div class="post-metadata">

**Author:** ![diana.bodnarescu](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@diana.bodnarescu](https://forum.servoy.com/u/diana.bodnarescu)\
**Post date:** [September 21, 2010, 9:22am UTC](https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892/3 "2010-09-21T09:22:35Z")

</div>

Hi Harjo,

The blob is not empty in this case.

Diana

---

<div class="post-metadata">

**Author:** ![dpearce](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dpearce](https://forum.servoy.com/u/dpearce)\
**Post date:** [September 22, 2010, 6:21am UTC](https://forum.servoy.com/t/create-pdf-file-using-the-file-plugin/12892/4 "2010-09-22T06:21:54Z")

</div>

Diana,

this works for me in 3.5.12 every time.

```auto
if (thepressed=='Save')
{
var filename = plugins.file.showFileSaveDialog();

var success = plugins.file.writeFile(filename,rw_final_report);
}

```

rw\_final\_report is a mysql blob field.

David
