node-wkhtml icon indicating copy to clipboard operation
node-wkhtml copied to clipboard

[feature demand]"add" function works on html type

Open gitawego opened this issue 14 years ago • 1 comments

currently , PDF.add works only on url and file type, but it doesn't work on html type:

pdf = new PDF({
   html:"html content 1"
});
pdf.add({
   html:"html content 2"
});

it will generate:

echo 'html content 2' | wkhtmltopdf - -

then throw an error: Command failed: Loading pages (1/6).

I'm not very familiar on stdin :(

gitawego avatar Aug 02 '11 10:08 gitawego

Yeah, this is really tricky. I'm not all that familiar with stdin either. I tried to get this feature to work, but unfortunately I can only seem to pipe in one input stream.

I'll leave this issue open. For now, concatenating the HTML beforehand is probably the best choice. If you need page breaks, CSS does support page break hints that webkit will honor.

mhemesath avatar Aug 02 '11 12:08 mhemesath