TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JsPDF - HTML5 PDF generator

191 点作者 smanuel超过 11 年前

18 条评论

HarrietJones超过 11 年前
Heh - This was first posted to hacker news over 1500 days ago. <a href="https://news.ycombinator.com/item?id=574854" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=574854</a>
评论 #6274089 未加载
hexagon超过 11 年前
Cannot get it to work for me. It shows only a blank page, both in the in-page viewer, and the saved document locally. I am on a linux Mint 15 and Firefox 23
评论 #6273723 未加载
评论 #6276286 未加载
评论 #6279575 未加载
mikegioia超过 11 年前
This is pretty awesome, but I think something that could PDF an html page would be much more valuable. Currently I have to use some wkhtmltopdf server-side trickery.
评论 #6273461 未加载
评论 #6273487 未加载
评论 #6273589 未加载
评论 #6275948 未加载
评论 #6273537 未加载
评论 #6274235 未加载
评论 #6274230 未加载
评论 #6273859 未加载
agumonkey超过 11 年前
Watching this under Firefox gives a nice JsPDF -&gt; PDF.js homolinguistic loop.
ahmett超过 11 年前
Github link is missing on that page. <a href="https://github.com/MrRio/jsPDF" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;MrRio&#x2F;jsPDF</a>
HarrietJones超过 11 年前
Previously hosted at JsPDF.Com. I&#x27;m not sure why it&#x27;s moved, but I&#x27;ve used this library and can attest to its awesomeness. It seems really stable to me. I use it to create and print off 4 page employment applications.<p>Gotchas : 1 - It can be hard to get downloading working using the Flash shim (For IE9 and below). It is possible though. 2 - Images have to be Base64 encoded, and that can be a royal pain.<p>I&#x27;m not the worlds best developer by a long chalk, but I had this library wrapped in a reporting class in a couple of days, and I can now pretty easily just throw some JS Structures at it, and have the tabular data printed out with headers and footers. I wish I could share it.
评论 #6273919 未加载
pippy超过 11 年前
I much prefer wkhtmltopdf: <a href="https://wkhtmltopdf.googlecode.com/" rel="nofollow">https:&#x2F;&#x2F;wkhtmltopdf.googlecode.com&#x2F;</a><p>It essentially allows you to make an HTML page and convert it to a PDF. It has powerful options around making footers, headers etc. The best part is you can run jQuery on it. It comes in handy when you don&#x27;t know what the data will be like.
sgt超过 11 年前
This is very interesting. Careful using only client-side technologies to generate PDFs though. What if down the line you get another user requirement, such as having a PDF generated and mailed to the user?<p>Assuming you are not using Node.js as a backend, that might pose a problem, and cause you to possibly maintain the logic for two separate PDF generators.
RamiK超过 11 年前
Wouldn&#x27;t a TeX engine written in Ecmascript make more sense?<p>A Web2JS of sorts maybe...<p>Though I&#x27;m more inclined towards using XeTeX since it solves a lot of problems without gluing a whole new language (LuaTex anyone?) in there.
评论 #6274605 未加载
评论 #6277341 未加载
评论 #6279643 未加载
ncrit超过 11 年前
Small Typo: &quot;A HTML5 client-side solution for generating PDFs&quot;. I think it should be &quot;An HTML5 client-side solution for generating PDFs&quot;.
评论 #6273635 未加载
thinkersilver超过 11 年前
I&#x27;ve been using this library and I really like it. If only it could do svg, then embedding D3 charts would be a cinch. Keep up the good work, though.
sitharus超过 11 年前
Looks good, but the typesetting is a little off and I don&#x27;t see any examples of paragraphs or line wrapping.<p>I built a PDF library for PHP many years ago and the hardest part was text, typesetting is a hard problem.<p>Looks good for exporting images and charts though.
talles超过 11 年前
Pretty useful, but didn&#x27;t work on Firefox 23.0.1 here (just blank pdf).<p>On Chrome seems fine.
评论 #6279656 未加载
ya3r超过 11 年前
This is really good. Specially the real-time rendering as one changes the code. But it does not work with Unicode (I tried farsi) characters.<p>Why does most of things related to PDF do not work with unicode characters?
TheZenPsycho超过 11 年前
Why isn&#x27;t the api compatible (or at least sympathetic with) 2D canvas? If it could do that, you&#x27;d be able to reuse so much code.
bachback超过 11 年前
AFAIK there is not a free lib which approach the commercial pdf generators. page-layouting can be complex.
gluxon超过 11 年前
It&#x27;s funny to see Firefox turn this back into HTML, CSS, and JavaScript with PDF.js...
unz超过 11 年前
Slightly off-topic, Pdf and Ps are just plain outdated for today. They&#x27;re unreadable on small screens and for people with bad eyesight, and no one sane prints stuff out these days Html is better, but the real thing today is tablet apps. All docs should be published as interactive 10&#x2F;7&#x2F;5 inch apps. Books should also disappear and be replaced by that form factor. Scientific paper authors also need to realize this and replace latex with app programming and publish their work as apps.
评论 #6276930 未加载
评论 #6276199 未加载
评论 #6275296 未加载