jsPDF - 包括其他pdf [英] jsPDF - include other pdf

查看:171
本文介绍了jsPDF - 包括其他pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用jsPDF来解决这个问题:

I'm trying to solve such problem with jsPDF:

我有PDF文件,它存储在服务器上。我正在使用jsPDF生成另一个pdf,并试图将已存在的pdf文件(如上所述)附加到另一个页面。

I have PDF file, which is stored on server. I'm generating another pdf with jsPDF and trying to append to already existed pdf file (as I mentioned above) as a another page.

我用Google搜索了一下,但找不到任何帮助。另外我在stackoverflow上发现了这个问题,但它是不同的场景 -
将现有的Pdf附加到Jspdf

I googled about it, but can't find any help. Also I found this question on stackoverflow, but it is different scenario - Append Existing Pdf to Jspdf

我怎样才能使这个工作?
或者是其他任何插件还是别的东西?

How can I make this to work? Or is any other plugin or something else to make this?

推荐答案

不幸的是,jsPDF今天(2018年)它不支持。

Unforfortunately, with jsPDF today (2018) it is not supported.

替代解决方案

但您可以编辑服务器端免费的PHP库,如 FPDI 。使用FPDI,甚至可以编辑PDF文档,提取一些页面并将它们添加到新的PDF文档中。怎么做才能看到 这里

But you could edit server side with free PHP library like FPDI. With FPDI it is even possible to edit PDF documents, extract some pages and to add them to new PDF documents. How to do it see here.

您可以使用AJAX向服务器发送请求,服务器会执行此操作并为您提供新的PDF格式。

You could send to your server a request using AJAX and the server do it and gives you a new PDF back.

这篇关于jsPDF - 包括其他pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆