Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Introduction to PDF Format</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
color: #333;
}
h1, h2 {
color: #2c3e50;
}
p {
line-height: 1.6;
}
section {
border-left: 4px solid #2c3e50;
padding-left: 16px;
margin-bottom: 24px;
}
</style>
</head>
<body>
<h1>Understanding the PDF Document Format</h1>
<section>
<p>The Portable Document Format (PDF) is a file format developed by Adobe in the early 1990s to present documents consistently across different devices and platforms. It encapsulates text, fonts, images, and graphics in a single file, preserving the layout and formatting regardless of the software or hardware used to view it.</p>
</section>

<h2>Key Features</h2>
<section>
<p>PDFs support a wide range of features including hyperlinks, bookmarks, annotations, encryption, and digital signatures. They are widely used for forms, manuals, reports, and legal documents due to their reliability and security.</p>
</section>

<h2>Advantages</h2>
<section>
<p>One of the main advantages of PDF is its platform independence. Whether you're using Windows, macOS, Linux, or a mobile device, a PDF will look the same. Additionally, PDFs can be compressed to reduce file size and can be protected with passwords or certificates.</p>
</section>

<h2>Use Cases</h2>
<section>
<p>PDFs are commonly used in business, education, and government sectors. They are ideal for sharing read-only documents, printing materials, and archiving important files. Tools like Adobe Acrobat, Foxit, and various open-source libraries allow users to create, edit, and manage PDFs efficiently.</p>
</section>
</body>
</html>

Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
using Syncfusion.HtmlConverter;
using Syncfusion.Pdf;
using System.Runtime.InteropServices;

//Initialize the HTML to PDF converter.
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();

//Initialize blink converter settings.
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();

//Enable offline mode.
//Enable offline mode
blinkConverterSettings.EnableOfflineMode = true;

//Assign Blink converter settings to HTML converter.
//Assign Blink converter settings to HTML converter
htmlConverter.ConverterSettings = blinkConverterSettings;

//Convert URL to PDF document.
PdfDocument document = htmlConverter.Convert("https://www.google.com");

//Save the PDF document
document.Save(fileStream);
//Close the document.
string inputHTML = Path.GetFullPath(@"Data/Input.html");
//Convert URL to PDF
PdfDocument document = htmlConverter.Convert(inputHTML);
//Save and close the PDF document.
document.Save(Path.GetFullPath(@"Output/Output.pdf"));
document.Close(true);
Loading