# Ionic 4 - Create PDF

**URL:** <https://forum.ionicframework.com/t/ionic-4-create-pdf/153975>\
**Category:** Ionic Framework\
**Created:** [January 23, 2019, 11:00pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975 "2019-01-23T23:00:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvanherk](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vvanherk/32/122741_2.png) [@vvanherk](https://forum.ionicframework.com/u/vvanherk)\
**Post date:** [January 23, 2019, 11:00pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/1 "2019-01-23T23:00:54Z")

</div>

Hello.

I’m looking for examples and API suggestions for creating PDF files based off the data in my Ionic 4 application.

I’ve seen a popular example (link below):

> **[How to Create PDF Files with Ionic using PDFMake \[v3\] - Ionic Academy](https://ionicacademy.com/create-pdf-files-ionic-pdfmake/)**
>
> Creating a PDF file that can be saved, printed or shared by your users can be a great addition inside your Ionic App. And actually...

However, it is based off Ionic 3 - so not sure it will work…

Any input appreciated.  
Cheers.

---

<div class="post-metadata">

**Author:** ![ivan5182](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ivan5182/32/123438_2.png) [@ivan5182](https://forum.ionicframework.com/u/ivan5182)\
**Post date:** [January 24, 2019, 12:06pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/2 "2019-01-24T12:06:12Z")

</div>

How about create pdf on server side , use php is easy to make it

---

<div class="post-metadata">

**Author:** ![moyhanarte](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@moyhanarte](https://forum.ionicframework.com/u/moyhanarte)\
**Post date:** [May 4, 2019, 10:51pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/3 "2019-05-04T22:51:31Z")

</div>

I had the same issue, I cound’t do it work whit anything for Ionic 4.

Do you find some solution?

---

<div class="post-metadata">

**Author:** ![Dachu](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dachu](https://forum.ionicframework.com/u/Dachu)\
**Post date:** [May 5, 2019, 12:54am UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/4 "2019-05-05T00:54:19Z")

</div>

PdfMake works with ionic 4 if you have implemented it in ionic 3 use the very same code there isn’t anything that is dependent on ionic version same code should work in any JS project.

---

<div class="post-metadata">

**Author:** ![moyhanarte](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@moyhanarte](https://forum.ionicframework.com/u/moyhanarte)\
**Post date:** [May 5, 2019, 10:48pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/5 "2019-05-05T22:48:47Z")

</div>

I create a new proyect with blank to try whit this guide ([Ionic Academy](https://ionicacademy.com/create-pdf-files-ionic-pdfmake/), but didn’t work, I see errors in everywhere 😪

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/6/8/6890d44aff1a042ba2131c2aa920106a6b68d5b6.png)

In the picture, I install the packages, but i couldn’t declare in the providers parts.

---

<div class="post-metadata">

**Author:** ![Dachu](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dachu](https://forum.ionicframework.com/u/Dachu)\
**Post date:** [May 6, 2019, 3:25am UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/6 "2019-05-06T03:25:56Z")

</div>

```auto
import { File } from '@ionic-native/file/ngx';
import { FileOpener } from '@ionic-native/file-opener/ngx';

```

Make sure you are using the correct plugins for V4 see the import statement for File Opener and File its from ngx

---

<div class="post-metadata">

**Author:** ![Dachu](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dachu](https://forum.ionicframework.com/u/Dachu)\
**Post date:** [May 6, 2019, 3:32am UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/7 "2019-05-06T03:32:52Z")

</div>

[File Opener](https://ionicframework.com/docs/native/file-opener)  
[File](https://ionicframework.com/docs/native/file)  
these two are what you want to install in v4

---

<div class="post-metadata">

**Author:** ![Tshesko1](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Tshesko1](https://forum.ionicframework.com/u/Tshesko1)\
**Post date:** [October 7, 2019, 10:06am UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/8 "2019-10-07T10:06:36Z")

</div>

The Tutorial given by Simon R in the [[https://ionicacademy.com/create-pdf-files-ionic-pdfmake/](https://ionicacademy.com/create-pdf-files-ionic-pdfmake/)]([http://Ionic](http://Ionic) Academy) works very well

The only change to be made is the one mentioned above here

---

<div class="post-metadata">

**Author:** ![emmy009](https://avatars.discourse-cdn.com/v4/letter/e/d78d45/32.png) [@emmy009](https://forum.ionicframework.com/u/emmy009)\
**Post date:** [September 12, 2020, 5:13pm UTC](https://forum.ionicframework.com/t/ionic-4-create-pdf/153975/9 "2020-09-12T17:13:03Z")

</div>

can u help…the same tutorial work for me, but i cant save the PDF file on IOS device…works every place else
