Hướng dẫn grapecity html to pdf - html to pdf

GCHTML là một gói có sẵn với các sản phẩm GCPDF và GCimaging). Điều này cho phép chuyển đổi nội dung HTML thành PDF và hình ảnh. Trong video này, chúng tôi sẽ chuyển đổi một tệp HTML thành PDF bằng GCPDF.

Xem video demo:

Chuyển đổi tệp HTML thành PDF

  1. Đầu tiên, chúng tôi sẽ tạo ứng dụng bảng điều khiển .NET Core.

  2. Thêm tệp HTML vào dự án của bạn.

  3. Nhấp chuột phải vào ‘phụ thuộc và chọn‘ Thêm gói.

  4. Trong nuget.org, tìm kiếm grapecity.document.pdf -> grapecity.document.html.packages.

Tùy thuộc vào hệ điều hành của bạn, bạn có thể cần thêm một gói có liên quan vào dự án của bạn. Vì dự án này đang được tạo trên macOS, chúng tôi sẽ chọn gói GCHTML cho Mac.

  1. Thêm các gói vào dự án của bạn.

  2. Thêm không gian tên cần thiết vào dự án.

  3. Tạo đối tượng GCPDFDocument và thêm trang mới vào nó. Ngoài ra, khởi tạo đồ họa trang.

  4. Gọi phương thức DrawHTML đọc nội dung HTML từ tệp hóa đơn.html và vẽ tại một vị trí cụ thể trên đồ họa PDF. Thuộc tính HTMLTOPDFFORMAT sẽ đặt các giá trị mặc định để hiển thị nội dung HTML với kích thước trang và màu nền mặc định.

  5. Lưu tài liệu vào tệp PDF và chạy ứng dụng. Bạn vừa chuyển đổi tệp HTML thành tài liệu PDF.

Thêm chuỗi HTML vào PDF

  1. Tạo một biến chứa nội dung HTML.

  2. Gọi phương thức DrawHTML hiển thị chuỗi HTML tại một vị trí cụ thể trên đồ họa PDF. Thuộc tính HTMLTOPDFFORMAT sẽ đặt các giá trị mặc định để hiển thị nội dung HTML với kích thước trang và màu nền mặc định.

  3. Bạn có thể đặt MaxWidth của trang thành một kích thước cần thiết. Bạn có thể vẽ một hình chữ nhật tròn xung quanh chuỗi này cho các hiệu ứng hình ảnh.

  4. Lưu tài liệu vào PDF và chạy ứng dụng. Chuỗi HTML của bạn hiển thị trên tài liệu PDF.

Kết xuất toàn bộ trang web cho PDF (không mất chất lượng)

  1. Tạo một URI biến giữ URI vào trang web.

  2. Tạo một biến cho gchtmlrenderer và chuyển URI vào hàm tạo.

  3. Khởi tạo phiên bản cài đặt PDF giữ các cài đặt cho PDF được tạo.

  4. Gọi phương thức RENDERTOPDF của gchtmlRenderer và truyền tệp PDF và cài đặt PDF sẽ áp dụng trên tệp PDF.

  5. Chạy ứng dụng và bạn sẽ thấy toàn bộ trang web chuyển đổi thành PDF mà không mất chất lượng.

Bạn nghĩ gì về các tính năng mới? Để lại một bình luận dưới đây.

  • Các sản phẩm
  • Hỗ trợ & Học tập
  • Blog
  • Giá cả
  • Tìm kiếm
  • Xe đẩy
  • Đăng nhập

  • .NET UI
  • .NET Điều khiển cho máy tính để bàn, web và điện thoại di động gốc
  • Thành phần
  • Winforms
  • WPF
  • UWP
  • Winui
  • Xamarin
  • ASP.NET MVC
  • ASP.NET Core
  • Blazor
  • ActiveX
  • API web
  • Dịch vụ dữ liệu
  • Hình thức web ASP.NET

  • JavaScript
  • Điều khiển HTML5/JavaScript với sự hỗ trợ cho góc, phản ứng và Vue
  • Wijmo
  • Lây lan
  • ActiveReportsjs
  • DATAVIEWSJS
  • API tài liệu
  • Kiểm soát toàn bộ tài liệu của bạn với API tài liệu trực quan tốc độ cao
  • Tài liệu cho Excel, .NET
  • Tài liệu cho Excel, Java
  • Tài liệu cho PDF
  • Tài liệu cho Trình xem PDF
  • Tài liệu cho từ
  • Tài liệu cho hình ảnh

  • BÁO CÁO
  • Các giải pháp báo cáo đầy đủ với trực quan hóa dữ liệu, người xem và nhà thiết kế rộng rãi
  • ActiveReports .Net
  • ActiveReportsjs
  • DATAVIEWSJS
  • API tài liệu
  • Spread.NET
  • Lây lan
  • ActiveReportsjs
  • DATAVIEWSJS

API tài liệu

Hướng dẫn grapecity html to pdf - html to pdf

Kiểm soát toàn bộ tài liệu của bạn với API tài liệu trực quan tốc độ cao

Tài liệu cho Excel, .NET
Learn More!

Tiêu chuẩn hoạt động grapecity


Phiênn Bản NH

Giải Phấm

Với báio tar dựa trán mÃ, các nhà thiết kế dễ dụng và api lih hoạt

  • Thiết Kế, Tùy Chỉnh
  • Tạo báio cáir Khâm đó
  • Viết báio tar tat
  • Tận dụng Công Cụ Báio Cái
  • Xuất ra nhiều ĐịNH


  • Sự mô tả
  • |

Phiênn Bản NH

Tạo báio cáir Khâm đó

Viết báio tar tat

Tận dụng Công Cụ Báio Cái

Xuất ra nhiều ĐịNH

Sự mô tả

|

Cung cấp Các Báilo Cáir Mới Trong thời Gian ngắn Hơn với ứng dụng prodesigner trán máiy tính để bàn. Nhà Phát Triển Sẽ lÀm Việc trong trình thiết ké kéo và thả, liên Kết dữ liệu trong một vào

Cung Cấp Cho người Dùng Sức MạNH Của Báio Cái

Nhúng các điều khiển thiết kế người dùng cuối của ProDesigner vào giải pháp máy tính để bàn hoặc web của bạn cho phép người dùng tạo báo cáo của riêng họ một cách nhanh chóng, với các tiêu đề, điều khiển và công thức có thể tùy Chỉnh Hoàn Toàn

Thiết Kế Và Cung Cấp Các

Bổ trợ vSdesigner tích hợp Đầy Đủ Bao

Thiết kế loại báio tar lựa chọn

Các tính năng hàng đầu của ActiveReports Professional

Hướng dẫn grapecity html to pdf - html to pdf

Cung cấp báo cáo đột xuất cho người dùng cuối

Bằng cách nhúng thành phần ProDesigner * có thể tùy chỉnh trong giải pháp máy tính để bàn hoặc web của bạn, nhà phát triển có thể cung cấp cho người dùng trải nghiệm tạo báo cáo quảng cáo phù hợp

Hướng dẫn grapecity html to pdf - html to pdf

Công cụ báo cáo mạnh mẽ

Công cụ báo cáo tốc độ cao của ActiveReports được tối ưu hóa để nhập nhanh, xuất, tính toán và tạo báo cáo lớn

Hướng dẫn grapecity html to pdf - html to pdf

Chi nhánh ra với nhiều loại báo cáo

Chọn từ các báo cáo trang dựa trên bố cục, cuộn báo cáo RDL và báo cáo phần dựa trên mã để tạo thư viện báo cáo đầy đủ tính năng

Hướng dẫn grapecity html to pdf - html to pdf

Thiết kế không có mã với ứng dụng ProDesigner

Thiết kế và gửi báo cáo nhanh chóng và dễ dàng với ứng dụng ProDesigner * trên máy tính để bàn

Hướng dẫn grapecity html to pdf - html to pdf

Tiết kiệm thời gian với báo cáo chính

Tạo báo cáo chính * làm mẫu để giữ thương hiệu nhất quán trong các tiêu đề, chân trang, logo và hơn thế nữa

Hướng dẫn grapecity html to pdf - html to pdf

Xuất ra nhiều định dạng

Xuất sang các loại tài liệu hiện đại chính như PDF, Excel, CSV, DocX *, JSON, Word, RTF, HTML, Text, XML và TIFF

Khám phá bộ tính năng mở rộng của ActiveReportsTận dụng các tính năng tích hợp và mở rộng theo nhu cầu với API
Tận dụng các tính năng tích hợp và mở rộng theo nhu cầu với API

.NET Report types Data-driven continuous RDL reports Layout-driven page reports Banded section reports
Data-driven continuous RDL reports
Layout-driven page reports
Banded section reports

Report creation Create reports in Visual Studio with VSDesigner Add-In Code-free design with standalone ProDesigner* Add ad-hoc reporting for end users on web and desktop*
Create reports in Visual Studio with VSDesigner Add-In
Code-free design with standalone ProDesigner*
Add ad-hoc reporting for end users on web and desktop*

Dynamic .NET reports .NET overloadable events Comprehensive, flexible .NET API Control Section Report behavior using events Design dynamic .NET reports entirely in code Change run-time behavior of RDL and Page reports HTTP handlers*
.NET overloadable events
Comprehensive, flexible .NET API
Control Section Report behavior using events
Design dynamic .NET reports entirely in code
Change run-time behavior of RDL and Page reports
HTTP handlers*

Self-service .NET reporting for end users Add ad-hoc report design for end users in desktop solutions* Add ad-hoc report design for end users in web solutions* Construct reports from parts of other reports* Customizable set of .NET report designer controls Install without Visual Studio for BI and IT teams Customize report layouts for different customers using Layers
Add ad-hoc report design for end users in desktop solutions*
Add ad-hoc report design for end users in web solutions*
Construct reports from parts of other reports*
Customizable set of .NET report designer controls
Install without Visual Studio for BI and IT teams
Customize report layouts for different customers using Layers

Shared .NET Report Sources Nested data regions bound to different data Shared datasources and datasets* Visual Query Designer
Nested data regions bound to different data
Shared datasources and datasets*
Visual Query Designer

Localize .NET Reports Major language character sets and locales Multiple languages supported RTL support Standard and custom multi-byte character sets
Major language character sets and locales
Multiple languages supported
RTL support
Standard and custom multi-byte character sets

Streamlined design and customization .NET Report themes Create and use custom controls in your project CSS-like stylesheets Master reports* Embed SubReports in multiple reports Mail merge operations
.NET Report themes
Create and use custom controls in your project
CSS-like stylesheets
Master reports*
Embed SubReports in multiple reports
Mail merge operations

Display richly formatted text in XHTML Include HTML text to render reports with rich text Add mail merge fields Add table, table row, table cell, and table header tags and attributes Define element names and output Map attributes to CSS properties Set background and border colors Toggle visibility on rich text
Include HTML text to render reports with rich text
Add mail merge fields
Add table, table row, table cell, and table header tags and attributes
Define element names and output
Map attributes to CSS properties
Set background and border colors
Toggle visibility on rich text

Printing Add print methods to your reports Booklet and duplex printing Define different gutters and margins on odd and even pages Define paper sizes, page margins, watermarks, and page scaling PDF print presets Print selected layers, select paper trays, and set pages per sheet Scan preprinted forms for accurate layouts View printer job
Add print methods to your reports
Booklet and duplex printing
Define different gutters and margins on odd and even pages
Define paper sizes, page margins, watermarks, and page scaling
PDF print presets
Print selected layers, select paper trays, and set pages per sheet
Scan preprinted forms for accurate layouts
View printer job

Interactivity Drill down Filter parameters Sorting
Drill down
Filter parameters
Sorting

Royalty-free viewers JavaScript Viewer* WinForms viewer WPF viewer with touch HTML5 Viewer ASP.NET Viewer* ASP.NET Viewer (Raw HTML)* ASP.NET Viewer (PDF)*
JavaScript Viewer*
WinForms viewer
WPF viewer with touch
HTML5 Viewer
ASP.NET Viewer*
ASP.NET Viewer (Raw HTML)*
ASP.NET Viewer (PDF)*

Report conversion Convert Crystal Reports Convert Section Reports to RDL Import layouts from Excel Convert MS Access reports Convert RPX reports
Convert Crystal Reports
Convert Section Reports to RDL
Import layouts from Excel
Convert MS Access reports
Convert RPX reports

Data Sources Microsoft SQL Server Oracle Client Provider CSV Files JSON Datasources XML Datasources ODBC Providers OLEDB Providers Data Objects Extensible Custom Data Providers Shared datasources and datasets*
Microsoft SQL Server
Oracle Client Provider
CSV Files
JSON Datasources
XML Datasources
ODBC Providers
OLEDB Providers
Data Objects
Extensible Custom Data Providers
Shared datasources and datasets*

Export CSV and Excel DocX* and Doc HTML and XML JSON PDF Advanced PDF encryption* like security, settings, and embedded fonts RTF and Text TIFF
CSV and Excel
DocX* and Doc
HTML and XML
JSON
PDF
Advanced PDF encryption* like security, settings, and embedded fonts
RTF and Text
TIFF

Chart Controls Area Chart Bar Chart Bubble Chart Column Chart Financial Charts Line Chart Pie Chart Scatter Chart
Area Chart
Bar Chart
Bubble Chart
Column Chart
Financial Charts
Line Chart
Pie Chart
Scatter Chart

Data Visualization Banded Lists Barcodes Bullets and Sparklines* Containers and Overflow Placeholders Formatted and Rich Textboxes Images Maps* Tables Table of contents* Tablix in reports
Banded Lists
Barcodes
Bullets and Sparklines*
Containers and Overflow Placeholders
Formatted and Rich Textboxes
Images
Maps*
Tables
Table of contents*
Tablix in reports

   LÝ DO NÊN DÙNG PHẦN MỀM BẢN QUYỀN

  • Luôn được cập nhật phiên bản mới và các tính năng mới nhất khi hãng cung cấp phiên bản mới.
  • Tôn trọng sở hữu trí tuệ và tránh bị thanh tra bản quyền.
  • Giảm rủi ro khỏi virus, mã hóa dữ liệu khi dùng các công cụ bẻ khóa, crack phần mềm.
  • Nhận được hỗ trợ từ hãng sản xuất và đối tác chính hãng SOFT365 tại Việt Nam.
  • Tăng năng suất và hiệu quả công việc với phần mềm đầy đủ tính năng. Khi sử dụng bản crack, có thể một số tính năng sẽ không sử dụng được.
  • Nhận được sự tôn trọng từ phía đối tác khi biết bạn đang sử dụng phần mềm có bản quyền.