The example of this article describes the use of Html2fpdf and Wkhtmltoimage in Linux to directly generate the HTML Web page PDF format File method, share for everyone to reference. The implementation methods are as follows:
Find a fpdf and Html2fpdf source based on the development of a set of open source programs, the author is very strong. The basic solution of the Chinese (as well as Japanese, Korean an
", "Virtual":"/", "Real":"/tmp/es/sy.txt" } }, "Highlight": { "content": [ "I like to eat " ] } } ]}
The complete IK word synonym filter is configured to complete.
In the txt,html format, other formats are available, but the file names are garbled in Chinese.
Attention:To select the version of fs2.2,
Prerequisites:
Install xhtml2pdf https://pypi.python.org/pypi/xhtml2pdf/Download Font:; give a address: http://www.jb51.net/fonts/8481.html
File to be converted: 1.htm
CopyCode The Code is as follows:
Html_to_assist.pyProgram
Copy code The Code is as follows: #-*-coding: UTF-8 -*-
Import Sx. pisa3 as Pisa
Data = open('1.htm'). Read ()
Result = file('test10000', 'wb ')
PDF = Pisa. createpdf (da
Aspose.words is a class library control that allows you to perform most of the work of file processing. Aspose.words supports doc,ooxml,rtf,html,opendocument,pdf,xps,epub and other formats. With Aspose.words you can generate, modify, convert, render and print without having to take advantage of Microsoft Word. Aspose.words for. NET is a report control for. NET and Java Word documents without a graphical use
Commands for opening PDF files and HTML files from the command line under Linux
[Date: 2012-06-18]
Source: Linux Community Author: hipercomer
[Font: big medium Small]
If you often work at a Linux terminal and need to look at some documents at some point (such as PDFs or HTML documents), it is often necessary to switch to the file sy
First of all, this tutorial is the essence of all my blog, I tidied up after two days to make this PDF document, exhausted me, the following free points to everyone, I hope we can not hesitate to correct, put forward some of its shortcomings, thank you:Here is its: 2014 Sinsing html, CSS Tutorial if the above address is not open, you can go to the browser to enter the following address, and then open: http:
Premise:
Install Xhtml2pdf https://pypi.python.org/pypi/xhtml2pdf/Download font: Microsoft James Black; Address: http://www.jb51.net/fonts/8481.html
Files to convert: 1.htm
Copy Code code as follows:
html_to_pdf.py Program
Copy Code code as follows:
#-*-Coding:utf-8-*-
Import SX.PISA3 as Pisa
Data= open (' 1.htm '). Read ()
result = File (' test.pdf ', ' WB ')
PDF
This article introduces how to use HTML2FPDF and wkhtmltoimage in linux to directly generate pdf files on Webpage html. I hope this method will be helpful to you.
Finally, I found an open-source program developed based on the FPDF and HTML2FPDF source code. It basically solves the problem of garbled characters in Chinese (as well as Japanese, Korean, and Southeast Asia and global languages). It is available
The example in this article describes the Java implementation of HTML-pdf-conversion methods. Share to everyone for your reference. as follows:
Package test;
Import Java.io.File;
Import Java.io.FileOutputStream;
Import Java.io.OutputStream;
Import Org.xhtmlrenderer.pdf.ITextFontResolver;
Import Org.xhtmlrenderer.pdf.ITextRenderer;
Import Com.lowagie.text.pdf.BaseFont; public class Wordtopdf {/** * @p
Address: https://developers.itextpdf.com/examples/xml-worker/html-listsMain method:public string Generate (string filePath){if (Deleteoldfile (FilePath)){throw new Exception ("The destination path already existed and unable to repleace it");}var fs = new FileStream (FilePath, FileMode.Create);var doc = new Document (PAGESIZE.B4);var pdfwriter = pdfwriter.getinstance (doc, FS);Doc. Open ();var html = this. G
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.