Giter Club home page Giter Club logo

Comments (8)

pofider avatar pofider commented on July 20, 2024

Hi,

could you try to print phantomjs output somewhere

var conversion = require("phantom-html-to-pdf")();
conversion({ html: "<h1>Hello World</h1>" }, function(err, pdf) {
  //print phantomjs output
  console.log(pdf.logs);
  console.log(pdf.numberOfPages);
  pdf.stream.pipe(res);
});

from phantom-html-to-pdf.

romanmt avatar romanmt commented on July 20, 2024

I added the above logging....

res.log was empty.

converter({html: html, paperSize: { orientation: 'landscape' }}, (err, pdf) => {
  log.debug({logs: pdf.logs}, "pdf logs");
  log.debug({pages: pdf.numberOfPages}, "pdf number of pages");
  pdf.stream.pipe(res);
})
[2016-05-05T15:02:41.038Z] DEBUG: okdj-app/70305 on stravinsky.local: pdf logs (logtype=services)
[2016-05-05T15:02:41.039Z] DEBUG: okdj-app/70305 on stravinsky.local: pdf number of pages (logtype=services, pages=1)

from phantom-html-to-pdf.

pofider avatar pofider commented on July 20, 2024

That is strange. The pdf.logs should be an array with at least 1 item. I double checked it and it is like that. I was using console.log..

Can you share your html?

from phantom-html-to-pdf.

demsey2 avatar demsey2 commented on July 20, 2024

We experienced a similar issue. Could you provide any update on that?

from phantom-html-to-pdf.

pofider avatar pofider commented on July 20, 2024

@demsey2 Can you share the html on which it is breaking? We are using this component very heavily in jsreport without experiencing it.

Did you try using the latest release 0.4.2?

from phantom-html-to-pdf.

demsey2 avatar demsey2 commented on July 20, 2024

@pofider we use Flatdoc to generate html on fly from makrdown files, from time to time our doc file doesn't contain any images, I am going to try 0.4.2 and let you know

from phantom-html-to-pdf.

pofider avatar pofider commented on July 20, 2024

@demsey2 Maybe you can also try to increase resourceTimeout #7 (comment)

from phantom-html-to-pdf.

pofider avatar pofider commented on July 20, 2024

Closing due to inactivity. There was a very low resource loading timeout (1000ms) in one of the release which could cause missing images. This should be increased now. If you have further problem with images, please reopen.

from phantom-html-to-pdf.

Related Issues (20)

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.