564 questions
61
votes
5
answers
176k
views
Why do I get an "unrecognized document structure" error when generating a PDF from HTML using pdfMake in Angularjs
I am trying to create a PDF from my HTML using pdfMake and Angular (I've also tried jsPDF and couldn't get it to work either). I tried using the following code in my Angular controller:
var blob = new ...
27
votes
10
answers
53k
views
PDFMAKE: 'Roboto-Regular.ttf' not found in virtual file system ONLY AFTER GULP
I created a simple app using knockout/bootstrap/gulp that downloads a pdf using pdfMake.js. It works fine in debug mode using VS2017. After publishing and using gulp it gives this error when run: File ...
22
votes
2
answers
25k
views
Increase header size pdfMake
I am trying to increase the header size on a pdf using pdfmake.
Currently am able to get a header on both the left and right of the page, which is what I want, but when the height passes 26, the ...
16
votes
3
answers
35k
views
pdfmake: How to create multiple page pdf with different orientation?
is there a way to create multiple page pdf with different page orientation using pdfmake?
to make it simple, I want something like this :
Page 1 with portrait orientation
page 2 with landscape ...
16
votes
3
answers
16k
views
pdfmake API? Is there a list of styles, fonts, capabilities?
I'm using pdfmake. I want to format a document and they have good examples on github and in their playground but I was wondering if they featured all capabilities therein. I get the feeling that ...
16
votes
5
answers
34k
views
Invalid image error using dataUrl in pdfmake
I'm using pdfmake to generate a PDF doc in an angular app, and just trying to add an image to the output using a dataURL (following the pdfmake docs.
var docDefinition = {
content: [...
14
votes
1
answer
17k
views
Type Error Cannot set property '_minWidth' of undefined - pdfmake, Angular 2
I am trying to add widths to my table but for some reason I get below error:
Component.html:187 ERROR TypeError: Cannot set property '_minWidth' of undefined at DocMeasure.measureTable (pdfmake.js:...
13
votes
4
answers
25k
views
Angular2: How to use pdfmake library
Trying to use client-side pdf library pdfmake in my Angular 2 (version=4.2.x) project.
In .angular-cli.json file, I declared js like this:
"scripts": [
"../node_modules/pdfmake/build/pdfmake.js",...
13
votes
3
answers
63k
views
Building table dynamically with PDFMake
I'm working with pdfmake to generate pdf with javascript. I'm trying to build a table dynamically but not works ,this my attempt
$.ajax({
type: "POST",
url: myURL,
success:function(data){
...
12
votes
4
answers
26k
views
Dynamic check if text Goes to next page and add pagebreak in pdf using pdfmake
For a project im making offer and invoice pdf's on the fly using pdfmake in javascript. The problem im facing is having text blocks going off the page in the middle. What i want is to check if a ...
12
votes
7
answers
21k
views
Lines, circles and other shapes?
Is it possible to draw lines, circles and other shapes with pdfmake? If yes, is there a documentation or are there any samples? I would like to replace jsPDF with pdfmake.
12
votes
2
answers
30k
views
How to fill column background color for pdfmake with fillColor?
Is there any option to fill column background color with fillColor: '#dedede' ?
fillColor works in tablecell very well at the same time it doesn't work for column :(
<script src="https://...
12
votes
3
answers
4k
views
How to use enum from typescript definition file?
I'm programming in nodejs using typescript.
I'm using pdfmake
and I installed typescript definition files for this library (@types/pdfmake)
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/...
12
votes
1
answer
9k
views
pdfMake table header not repeated on page break
Can I force somehow the table header repeating on each page in pdfMake, when I have a big table, that only fits on multiple pages.
11
votes
3
answers
21k
views
Embedding a background image in pdfmake
I'm using pdfmake http://bpampuch.github.io/pdfmake/index.html#/gettingstarted to implement html to pdf conversion. To create a PDF, I'm using some hard-coded text and some text pulled in with ...