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

I Can not open created PDF on new tab genered by PDFMake.js in Internet Exploer

I am working on a projected developed using WEB API2 and AngularJS. I am created report in PDF using pdfmake.js. It works fine for Firefox. But for security reason, I like to restrict the user to use Internet Explorer. Because I need to identify the…
0
votes
2 answers

Nested/Sub Tables with PDFMake

How do I use nested/sub tables with PDFmake? I've tried simply putting in multiple tables but that doesn't automatically repeat the top level table's header for page breaks.
Elijah Lofgren
  • 1,437
  • 3
  • 23
  • 39
0
votes
1 answer

Saving HTML as PDF

I need to be able to click a button and save a modal window as a PDF. It needs to take the styling and all content inside the div the modal is built in. I'm not tied to any specific library but I need to use a client-side library to to get this to…
0
votes
1 answer

How to handle SVG and canvas in pdfmake & html2pdfmake

I am using html2pdfmake to convert a div to pdf. My div contains tables and also contains some svg charts. But i am not getting the svg into the pdf. I tried converting it using base64 but is paste the base64 code into the pdf. I converted my svg to…
Mandeep Singh
  • 1,287
  • 14
  • 34
0
votes
1 answer

What would cause pdfMake to ignore this definition?

We are using the pdfMake javascript framework to render HTML to a PDF document. pdfMake.org Given that a simple working document definition object is rendered thusly: var docDefinition = { content: { stack: [ { text: 'foo', style: 'normal',…
0
votes
1 answer

how to convert html to pdf with specific font or language using pdfmake

This is just a simple html file using pdfmake . I click a button and then open a pdf file . using : pdfMake.createPdf(docDefinition).open(); it's ok , but now i want to see a specific language (ex:Bangla) in my pdfpage . how it is possible .…
0
votes
1 answer

PDF uploading to AWS S3 corrupted

I managed to get my generated pdf uploaded to s3 from my node JS server. Pdf looks okay on my local folder but when I tried to access it from the AWS console, it indicates "Failed to load PDF document". I have tried uploading it via the s3.upload…
jlyh
  • 681
  • 9
  • 32
0
votes
1 answer

PDFmake "unknown image format" error

I'm trying to put a BMP image (encoded as a base64 string) into a PDF, however it is failing with the error Uncaught Error: Unknown image format. I know the image is formatted correctly because it loads in pure HTML correctly like so:
mulllhausen
  • 4,225
  • 7
  • 49
  • 71
0
votes
2 answers

Issue on generate pdf with custom name using pdfmake and nodejs

I use pdfmake to generate pdf in nodejs and send the data to my angular request page. I can generate pdf. but my issue is when i download the pdf its name looks like "16064905-c4aa-4d40-96db-ca7464c38858.pdf".how can i set custom name to my .pdf…
MANJU MOHAN
  • 23
  • 1
  • 5
0
votes
1 answer

Warning "dump_dir not found" when running grunt

I am trying to use the grunt plugin dump_dir to generate a vfs_font.js file for pdfmake. I installed grunt ~0.4.2, configured Gruntfile.js, installed the grunt_dump_dir plugin and checked the package.json file. Yet every time I try to start grunt…
Cos
  • 1,649
  • 1
  • 27
  • 50
0
votes
2 answers

Save this pdf in the cache/local storage on ionic

Ho to everyone. I followed this tutorial to create a modal view with a pdf generated with pdfmake. http://gonehybrid.com/how-to-create-and-display-a-pdf-file-in-your-ionic-app/ My simply question is how can i save the pdf in my local storage on in…
Steph8
  • 1,483
  • 2
  • 16
  • 32
0
votes
0 answers

DataTables.net - PDF Export report customization

I have problem with setting margins for PDF exported document. I've tried a lot of things and settings, but no hope. The ones that are interested in helping and solving this problem can check this…
IvanS
  • 1
  • 1
  • 2
0
votes
1 answer

please tell me how can i use the below mentioned elements using pdfmake

the below elements how can i use in the pdf make for create cricle, rectangle or any other shape 'tableCellPadding' 'cellBorder', 'headerCellBorder', 'oddRowCellBorder', 'evenRowCellBorder', 'tableBorder'
bhanu avinash
  • 484
  • 2
  • 16
0
votes
1 answer

How to mimic HTML layout with pdfmake

I am having a dynamically generated HTML layout which I would like to mimic in a PDF report, but I am having trouble with the columns specification. Assume that the HTML looks like this: +------------------------------------------------------+ | …
0
votes
3 answers

Format a date on Pdfmake

I have used pdfmake library to export pdf content with the Angular UI Grid.Could you tell me how to format the date on it ? Thanks. Currently it shows like this : Angular grid it's like this : { name: app.localize('BrDateReceived'), field:…
Sampath
  • 63,341
  • 64
  • 307
  • 441