Questions tagged [pdfmake]

Client/server side PDF printing in pure JavaScript

Client/server side PDF printing in pure JavaScript

In-browser

Print PDFs directly in the browser or delegate it to your NodeJS backend. Use the same document definition in both cases.

Fully declarative

Forget about manual x, y calculations. Declare document structure and let pdfmake do the rest.

Powerful layout engine

Use paragraphs, columns, lists, tables, canvas, etc... Declare your own styles, use custom fonts, build a DSL and extend the framework.

Features

  • line-wrapping,
  • text-alignments (left, right, centered, justified),
  • numbered and bulleted lists,
  • tables and columns
    • auto/fixed/star-sized widths,
    • col-spans and row-spans,
    • headers automatically repeated in case of a page-break,
  • images and vector graphics,
  • convenient styling and style inheritance,
  • page headers and footers:
    • static or dynamic content,
    • access to current page number and page count,
  • background-layer
  • page dimensions and orientations,
  • margins,
  • custom page breaks,
  • font embedding,
  • support for complex, multi-level (nested) structures,
  • helper methods for opening/printing/downloading the generated PDF.

References

560 questions
0
votes
1 answer

How do I get the byte array from a PDF generated by pdfMake?

I have a web app that is creating a PDF using pdfMake. I want to get the byte[] from the generated pdf to be used to transmit to a database. How can I get the byte[] of the pdf generated by pdfmake?
user3897392
  • 397
  • 2
  • 5
  • 22
0
votes
0 answers

Ionic - Issue in displaying more than one page of PDF using pdfmake

I am developing an Ionic application in which I have generated the PDF using pdfmake. But, I could not able to display the pdf if it is more than one page as the pageBreak property does not work Document definition object : var documentdefinition =…
Rakesh L
  • 1,136
  • 4
  • 18
  • 44
0
votes
1 answer

How can I iterate through array in javascript and display its content in a specific form?

I'm playing around with a http://pdfmake.org/#/ library that generates pdf files on demand. I can set up there directly everything that has to be printed, and since I can choose the appropriate layout, I've decided to go with a table. So the code…
user3766930
  • 5,629
  • 10
  • 51
  • 104
0
votes
1 answer

Text going off page while using pdfmake library

I am using pdfmake to get users to fill out a form and the data from that form is taken and converted into a PDF. But the issue is when a user types in a long text the text goes off page. I have tried settings style to justify but that does not…
Skywalker
  • 4,984
  • 16
  • 57
  • 122
0
votes
1 answer

Error URL pdfMake.js with Ionic Cordova App

I have a problem using pdfMake.js library. This library is supposed to generate PDF, client-side only. It works well with chrome, Firefox... But when I launch my ionic app on a device (Android in my case), I have the following error : …
Rémi P
  • 421
  • 5
  • 11
0
votes
1 answer

How to programatically create PDFmake docDefinition

I am trying to create PDF's by dynamically creating the docDefinition from my scope data. My data is constantly changing so dynamic creation is essential. Below is what I have done so far, however I am not able to get my images to show in the…
Taylorsuk
  • 1,419
  • 1
  • 16
  • 51
0
votes
2 answers

Cannot get pdfmake to work for me

I am a complete novice when it comes to javascript. I want to use pdfmake so that i can save the output of my html page in a pdf. Below are the exact steps i followed. Copied pdfmake.min.js and vfs_fonts.js to a directory called build. I got this…
zeus
  • 1
  • 1
  • 1
0
votes
2 answers

Save file as .pdf or .doc

I'm using pdfmake.js, and I get this when I open in a…
Patrick Fritch
  • 199
  • 1
  • 2
  • 10
-1
votes
2 answers

Error when using fetch method and NodeJs route

I got an issue using fetch method in JavaScript with a NodeJS routing. My JS code : fetch(url, { method: 'POST', headers: { 'Accept': 'application/json, text/plain, */*', 'Content-Type': 'application/json' }, credentials:…
tonymx227
  • 5,293
  • 16
  • 48
  • 91
-1
votes
1 answer

all column not display properly in the dynamic table of pdfMake in react

I made a dynamic table in pdf make. Everything works fine, data comes from the backend and is integrated in the pdf make, but when I downloaded the PDF, some of the columns is missing and some of the column data were showing partially. Let me know…
Pranay kumar
  • 1,983
  • 4
  • 22
  • 51
-1
votes
1 answer

I have a list of invoices - i need to display a print dialog with all invoices then the user can send them all to a printer

~html click printSelectedInvoices(); ~typescript import * as pdfMake from 'pdfmake/build/pdfmake'; import * as pdfFonts from 'pdfmake/build/vfs_fonts'; printSelectedInvoices(){ invoiceArray.forEach((invoice) => { var invoicePdf = { …
-1
votes
2 answers

how to pass array in PdfMake to make table

console.log(this.pgCheckOutList); i need this data for table in PdfMake plz someone help me
-1
votes
1 answer

How to create a PDF and download it when the endpoints is requested by client

I'm building an API in NodeJS and Express. IT is about a marketplace for products. I recently started to implement the PKG called PDFMake but I have issues to make it work. What I'm trying to do is that when I hit the endpoint…
Jakub
  • 2,367
  • 6
  • 31
  • 82
-1
votes
1 answer

Vertical print in pdf make library JavaScript

i use pdf make library. can some one say me how to rotate text (elements) using this library? I want to print pdf vertically. thank you so much.
-1
votes
1 answer

HTML/CSS Report - RTL Language

I am not very expert at all when it comes to html layouts. I am trying to generate an invoice report which looks exactly like this: Print dimensions must be 13.9cm x 22.8 cm but I am finding a very hard time since it's in Arabic, and Arabic is a…
user9601534
1 2 3
37
38