Generating editable PDF files from HTML code with CSS properties support
- itext7
- Version: 7.1.4
- Author: iText Software
- license: AGPL
- itext7.pdfhtml
- Version: 2.1.1
- Author: iText Software
- license: Legal
-
Dependency Reference
pm> Install-Package itext7 -Version 7.1.4
pm> Install-Package itext7.pdfhtml -Version 2.1.1
- Run App
~$ dotnet HTML2PDF-netcore.dll
- API
-
-
uri: http://localhost:5000/api/pdf/create?pdfHtmlString=&saveName=
-
method: GET
-
params:
name type meaning pdfHtmlString string HTML document in string saveName string The name of PDF to be saved -
Example:
http://localhost:5000/api/pdf/create?pdfHtmlString=<div%20class="main"%20style="margin:%2030px%200;">DHCPスヌーピングをサポートし、DHCPサーバを設定し、DHCPサーバの適合性を保証します。</div>&saveName=test
-
-
Create PDF files using HTML file in path
/wwwroot/src/html/
. If parameterhtmlFileName
is given, it create PDF file using this specific HTML file, otherwise using all HTML files in the path(create multiple PDF files).-
uri: http://localhost:5000/api/pdf/createfromhtml?htmlFileName=
-
method: GET
-
params:
name type meaning htmlFileName string (optional)HTML document full-name in path /wwwroot/src/html/
-
Example:
http://localhost:5000/api/pdf/createfromhtml?htmlFileName=forTest.html
- The generated PDF files will be located in the same path
/wwwroot/src/html/
.
-
-
The test method for API Create. You will get a pdf created using the existed HTML string(parameter
pdfHtmlString
in Create) as follows by calling this.<div class="main" style="margin: 30px 0;"> DHCPスヌーピングをサポートし、DHCPサーバを設定し、DHCPサーバの適合性を保証します。DoS防御をサポートし、防御ランドスキャン、SYNFIN、Xmascan、Ping Floodingなどを攻撃。 </div>
- uri: http://localhost:5000/api/pdf/testcreate
- method: GET
- If you are using a machine with Unix system, the generated PDF file can be found at path
/data/webroot/pdf/
. - If you are using a machine with Windows system, the generated PDF file may be found at path
D:\pdf
(If diskD
exist).
-
- This project is license by GNU GENERAL PUBLIC LICENSE.
- The ownership of this project is owned by the author. All resources in this project are based on CC BY-NC-SA 4.0 , that means you can copy and reissue the contents of this project, but you will also have to provide the original author information as well as the agreement statement. At the same time, it cannot be used for commercial purposes. In accordance with our narrow understanding (Additional subsidiary terms), All activities that are profitable are of commercial use.