# Using vtk libraries for writing in xml/vtk fileformat using fortran

**URL:** https://discourse.vtk.org/t/using-vtk-libraries-for-writing-in-xml-vtk-fileformat-using-fortran/281
**Category:** Support
**Created:** [February 15, 2019, 6:38pm UTC](https://discourse.vtk.org/t/using-vtk-libraries-for-writing-in-xml-vtk-fileformat-using-fortran/281 "2019-02-15T18:38:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.vtk.org/u/vrkssai)
#### Post date: [February 15, 2019, 6:38pm UTC](https://discourse.vtk.org/t/using-vtk-libraries-for-writing-in-xml-vtk-fileformat-using-fortran/281/1 "2019-02-15T18:38:17Z")

</div>

I was wondering if someone would help me on how to use install,use vtk libraries to write data in binary format in fortran. Or, suitable modifications to write in binary format from a fortran code wrting files in .vtk in ASCII format are also welcome. I understand that its very easy to write and have a writer in place, hence was hoping someone would help me out with the binary format. The main problem is the mixed data to be written in vtk binary files, where the keyword phrases are to be in binary.

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.vtk.org/u/Kenichiro-Yoshimi)
#### Post date: [February 16, 2019, 5:22am UTC](https://discourse.vtk.org/t/using-vtk-libraries-for-writing-in-xml-vtk-fileformat-using-fortran/281/2 "2019-02-16T05:22:12Z")

</div>

I would recommend taking a look at VTKFortran ([https://github.com/szaghi/VTKFortran](https://github.com/szaghi/VTKFortran)). Since it supports _ascii_, _binary_ (Base64 encoding) and _raw_ file formats, this should come in useful.
