Creating a PDF?


Hello… I’m trying to create a pdf report summary in my app… I found this:

but my app then returns error: Failed to find module: "stream",

This is my code snippet from the pdf creation:

var pdf = require("pdfkit");

var pdfpath = filesystem.path.join(documents.path, "output.pdf");
var file = filesystem.File.fromPath(pdfpath);


   .text('test!!!', 100, 100);

I think it has something to do with the file-system? or no? please help… thank you… :slight_smile:

Generate reports in nativescript app

The pdfkit package likely won’t work in the context of NativeScript.

But thanks for the idea, that can totally be made into a plugin, a simple one however.

Looking through search results Google reveals that PDF previewing/writing is a very problematic topic in Android. iText has an Android plugin, but besides being paid, it has not been wrapped as a NativeScript plugin.


Thanks… any idea of maybe a replacement? I need a way to produce a “hardcoded” report for my app… :slight_smile:


This pod for iOS looks promising:

This for Android perhaps:

I’m planning on doing a course on egghead for integrating libs like that directly into NativeScript projects as well as creating public plugins. Maybe I could focus on this one?


you can focus on this one… for me… but for the public? I’m not sure if this is a priority… :grin:


Hey @mansonmamaril,

I am also having same requirement means need to generate pdf report and certificate based on processed user given data in my nativescript with angular app.

How you managed? Did you find any working solution on this?


Hey @Pete.K,

After long months of this post, Shall i get any working solution on this?

Any further idea on this to generate the pdf through nativescript with angular app?


Check this POC with jsPDF :smiley: