Giter Site home page Giter Site logo

ng-html-to-pdf-save's People

Contributors

hearsid avatar martskins avatar steventhelinddd avatar vijaydogra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ng-html-to-pdf-save's Issues

Only works on simple elements?

First, on safari it generates blank page only.
Chrome/Firefox it generates .... something but its not very good looking. Page is all messed up in terms of columns/images/text all over the place.

Simple stuff like the demo, which is only text works ok.

No worries though, thanks for putting this together! Pretty cool idea.

Problem with dependency canvg

When i try tu run bower install angular-save-html-to-pdf i get this error:
_
bower canvg#1.5.3 ENORESTARGET No tag found that was able to satisfy 1.5.3_

but if i install canvg separatelly : bower install canvg its installation success with version canvg#1.3.0

What can i do?? im using angular version: "angular": "~1.6.0"

Bower.json issue

Hi! When I try to use the plugin the file "index.js" is not found, I think line 4 of the bower.json is incorrect and should be:
"main": "./dist/saveHtmlToPdf.js",

dist folder missing

When I install using bower bower install angular-save-html-to-pdf dist folder appeared to be missing?
help please?

invalid pdf generation

The PDF file being generated by the directive does not open on adobe acrobat or a nitro pdf etc. It opens up in the browser (i am using chrome) but shows an error when opening in abode acrobat for e.g. that the file corrupt. I tried changing the directive using but I was only able to go so far as to print the unformatted text.

Issues when export table to PDF

When I try to create a PDF from a bootstrap table, it does create the PDF file. However, I'm getting three issues:

  1. The background color of the table is black (on my browser is white). I wonder if this can be an issue with Bootstrap's CSS and html2canvas too.

  2. Table's length is greater than 1 page, but instead of creating another page, it cut's off the bottom of the table.

  3. Also it does not respect the pdf-name tag, the downloaded file is named "chart-reports.pdf".

My jade's template looks like:

    button(pdf-save-button="main", pdf-name="test.pdf", class="btn btn-primary") download
    div(pdf-save-content="main")
        table(class="table table-bordered table-condensed")
            tbody
                tr
                    td(rowspan="4", colspan="2")
                        img(class="center-block", src="/images/logo.png")
                    td(colspan="4") Report
                tr
                    td Col 1
                    td Col 2
                    td(colspan="2") Col 3

And the javascript:

    script(src='bower_components/angular/angular.min.js')
    script(src='bower_components/moment/moment.js')
    script(src='bower_components/angular-moment/angular-moment.min.js')
    script(src='bower_components/angular-animate/angular-animate.min.js')
    script(src='bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js')
    script(src='bower_components/jquery/dist/jquery.min.js')
    script(src='https://cdn.rawgit.com/niklasvh/html2canvas/0.5.0-alpha2/dist/html2canvas.min.js')
    script(src='bower_components/jsPDF/dist/jspdf.debug.js')
    script(src='bower_components/angular-save-html-to-pdf/dist/saveHtmlToPdf.min.js')

Landscape format

Hi,

I'm using this directive and it works properly, however my layout is to print as landscape. There is a property do make the PDF landscape?

Kind regards.

Cannot save PDF files

HI devs!!! :) i would like to ask you one thing: i cannot save my html in a pdf with this library. I think that there's a problem in createPDF() function, because after that getCanvas() function is done, the promise in then is broken because it doesn't create pdf or execute the function inside .then either.

UPDATE: i've modified a little bit the library and put error condition in resolve, so it logs me "CanvasRenderer is not defined". I googled a bit and i've found that maybe it's a jspdf version problem.

UPDATE 2: i have to put jspdf.debug.js and all works! but there's problem with pdfs with more than one page and quality. If you don't mind, can i make pull request? :)

Multi-page PDF

I have a fairly large HTML block - enough to cover multiple PDF pages.

When implementing ng-html-to-pdf-save, the PDF only saves one page - therefore the HTML block gets cut off.

Is there a way to allow multi-page PDFs?

Id is same

Uncaught (in promise) TypeError: Cannot read property 'clientHeight' of undefined
at Object.onrendered (saveHtmlToPdf.min.js:1)
at jspdf.debug.js:13681
onrendered @ saveHtmlToPdf.min.js:1
(anonymous) @ jspdf.debug.js:13681

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.