pdfium.patagames.com
Open in
urlscan Pro
173.248.176.41
Public Scan
Submitted URL: http://pdfium.patagames.com/
Effective URL: https://pdfium.patagames.com/
Submission: On January 27 via manual from US — Scanned from DE
Effective URL: https://pdfium.patagames.com/
Submission: On January 27 via manual from US — Scanned from DE
Form analysis
1 forms found in the DOMPOST
<form method="post" id="continue_to_US">
<input type="hidden" name="ContinueToUs" value="1">
<div><a class="switchto" onclick="$('#continue_to_US').submit();">Continue to United States</a></div>
</form>
Text Content
* * * Pdfium.Net SDK * Overview * Features * Wpf Pdf Viewer * WinForms Pdf Viewer * -------------------------------------------------------------------------------- * OCR Pdf Documents * Support * Company * About Us * Merchandise * Contact * Pricing * Downloads Pdfium.Net SDK THE C# PDF LIBRARY * Create PDFs from scratch, or from a bunch of scanned images * Edit, merge, split and manipulate PDFs, extract text and images * Embed standalone Winforms or WPF PDF Viewer * Supports: .Net 2.0+, .Net 6, Standard, Core, Mono, Azure * And it also works on Windows XP and Mac OS Download Pdfium.Net SDK Install with NuGet ADVANCED PDF LIBRARY FOR TOTAL CONTROL OVER YOUR PDF CREATION WORKFLOW Pdfium.Net SDK is the leading .Net library for generating, manipulating and viewing files in the portable document format. We are offering a high level c# / VB.Net API for dynamic pdf creation on a WEB server or any other server system, and to implement «Save as PDF» feature in existing desktop or WEB applications. GET STARTED: C# CODE EXAMPLES * Create a PDF Document on the Fly * Generate PDFs From Multiple Images * Printing PDF Files With C# * Extract Text From PDF in C# * Extract Text Coordinates from Pdf With C# * Extracting Images from Pdf File With .Net C# * Search for a Text in a PDF File * Search for a Text Asynchronously * Split PDF in C# * Merge PDFs With C# * Render a PDF to Images * Filling Editable PDF Fields and Extracting Data From Them HOW TO CREATE A PDF DYNAMICALLY WITH C# /// <summary> /// Create PDF Document on The Fly in C# using Pdfium.Net SDK Library /// </summary> public void CreatePdf() { // The PDF coordinate system origin is at the bottom left corner of the page. // The X-axis is pointing to the right. The Y-axis is pointing in upward direction. // The sizes and coordinates in this method are given in the inches. // Step 1: Initialize PDF library and create empty document // Return value: PdfDocument main class PdfCommon.Initialize(); var doc = PdfDocument.CreateNew(); // Create a PDF document // Step 2: Add new page // Arguments: page width: 8.27", page height: 11.69", Unit of measure: inches // The PDF unit of measure is point. There are 72 points in one inch. var page = doc.Pages.InsertPageAt(doc.Pages.Count, 8.27f * 72, 11.69f * 72); // Step 3: Add graphics and text contents to the page // Insert image from file using standart System.Drawing.Bitmap class using (PdfBitmap logo = PdfBitmap.FromFile(@"e:\63\logo_square.png")) { PdfImageObject imageObject = PdfImageObject.Create(doc, logo, 0, 0); //image resolution is 300 DPI and location is 1.69 x 10.0 inches. imageObject.Matrix = new FS_MATRIX(logo.Width * 72 / 300, 0, 0, logo.Height * 72 / 300, 1.69 * 72, 10.0 * 72); page.PageObjects.Add(imageObject); } // Create fonts used for text objects PdfFont calibryBold = PdfFont.CreateFont(doc, "CalibriBold"); // Insert text objects at 7.69"; 11.02" and font size is 25 PdfTextObject textObject = PdfTextObject.Create("Sample text", 1.69f * 72, 11.02f * 72, calibryBold, 25); textObject.FillColor = FS_COLOR.Black; page.PageObjects.Add(textObject); // Step 5: Generate page content and save pdf file // argument: PDF file name page.GenerateContent(); doc.Save(@"e:\63\sample_document.pdf", SaveFlags.NoIncremental); } C# Copy Pdfium.Net SDK Library allows developers to create PDF documents easily in C#. This example shows that a PDF document can be dynamically created using page objects. You can create multiple page objects and place them anywhere on the page. There are several types of page objects: paths, forms, images and text objects. Related Tutorial API Documentation HOW TO GENERATE PDF PROGRAMMATICALLY FROM SET OF IMAGES WITH C# /// <summary> /// Generate PDF document From Multiple Images in C# using PDF Library /// </summary> public void GeneratePdf() { //Initialize C# PDF Library PdfCommon.Initialize(); //Create a PDF document using (var doc = PdfDocument.CreateNew()) { //Read images var files = System.IO.Directory.GetFiles(@"c:\Images\", "*.*", System.IO.SearchOption.AllDirectories); foreach (var file in files) { //Create empty PdfBitmap using (PdfBitmap pdfBitmap = PdfBitmap.FromFile(file)) { //Create Image object var imageObject = PdfImageObject.Create(doc, pdfBitmap, 0, 0); //Calculate size of image in PDF points var size = CalculateSize(pdfBitmap.Width, pdfBitmap.Height); //Add empty page to PDF document var page = doc.Pages.InsertPageAt(doc.Pages.Count, size); //Insert image to newly created page page.PageObjects.Add(imageObject); //set image matrix imageObject.Matrix = new FS_MATRIX(size.Width, 0, 0, size.Height, 0, 0); //Generate PDF page content to content stream page.GenerateContent(); } } // Save PDF document as "saved.pdf" in no incremental mode doc.Save(@"c:\test.pdf", SaveFlags.NoIncremental); } } /// <summary> /// The function takes width and height of the bitmap in pixels as well as /// horizontal and vertical DPI and calculates the size of the PDF page. /// To understand the conversion you should know the following: /// One inch contains exactly 72 PDF points; /// DPI of the scanned image may vфry and depends on scanning resolution /// <summary> private FS_SIZEF CalculateSize(int width, int height, float dpiX=300, float dpiY=300) { return new FS_SIZEF() { Width = width * 72 / dpiX, Height = height * 72 / dpiY }; } C# Copy This example shows how you can generate a PDF document from a bunch of scanned images using a simple C# code and PDF library. Related Tutorial HOW TO PRINT PDF FILES IN C# /// <summary> /// Printing PDF Files in C# using PDF Library /// </summary> public void PrintPdf() { var doc = PdfDocument.Load("c:\test.pdf"); // Read PDF file var printDoc = new PdfPrintDocument(doc); printDoc.Print(); } C# Copy The code above prints a PDF document to the default printer. Standard printing dialog with printing progress is also shown. If you want to suppress progress window please modify the code like shown below. public void PrintPdf() { var doc = PdfDocument.Load("c:\test.pdf"); var printDoc = new PdfPrintDocument(doc); PrintController printController = new StandardPrintController(); printDoc.PrintController = printController; printDoc.Print(); // C# Print PDF document } C# Copy The PdfPrintDocument is derived from standard PrintDocument class, so that you can use .Net Framework's print dialog box (PrinterDialog) that configures a PrintDocument according to user input. public void OnPrintClick() { if (PdfViewer.Document.FormFill != null) PdfViewer.Document.FormFill.ForceToKillFocus(); //create an instance of PrintDocument class var printDoc = new PdfPrintDocument(PdfViewer.Document); // create an instance of Print document class that is used for printing PDF document. //Create a standard print dialog box var dlg = new PrintDialog(); dlg.AllowCurrentPage = true; dlg.AllowSomePages = true; dlg.UseEXDialog = true; //sets the PrintDocument used to obtain PrinterSettings. dlg.Document = printDoc; //show PrinterDialog and print pdf document if (dlg.ShowDialog() == DialogResult.OK) printDoc.Print(); // C# Print PDF } C# Copy API Documentation READ PDF FILE AND EXTRACT TEXT FROM IT IN C# /// <summary> /// Read PDF File and Extract Text From it in C# /// </summary>public void ExtractText() { //Initialize the SDK library //You have to call this function before you can call any PDF processing functions. PdfCommon.Initialize(); //Open and load a PDF document from a file. using (var doc = PdfDocument.Load(@"c:\test001.pdf")) // C# Read PDF File { foreach (var page in doc.Pages) { //Gets number of characters in a page or -1 for error. //Generated characters, like additional space characters, new line characters, are also counted. int totalCharCount = page.Text.CountChars; //Extract text from page to the string string text = page.Text.GetText(0, totalCharCount); page.Dispose(); } } } C# Copy Pdfium.Net SDK allows developers to easily extract the full text from almost any PDF file. API Documentation HOW TO SEARCH FOR A TEXT IN A PDF FILE /// <summary> /// Search for a Text in a PDF File in C# With Pdfium.Net SDK Library /// </summary> public void Search() { //Open PDF document using (var doc = PdfDocument.Load(@"d:\0\test_big.pdf")) // Read PDF document and enumerate pages { //Enumerate pages foreach(var page in doc.Pages) { var found = page.Text.Find("text for search", FindFlags.MatchWholeWord, 0); if (found == null) return; //nothing found do { var textInfo = found.FoundText; foreach(var rect in textInfo.Rects) { float x = rect.left; float y = rect.top; //... } } while (found.FindNext()); page.Dispose(); } } } C# Copy This example shows how you can search for a text in PDF document using a simple C# code and the PDF library. API Documentation HOW TO SEARCH FOR A TEXT ASYNCHRONOUSLY /// <summary> /// Search for a Text Asynchronously in C# using PDF Library /// </summary> public void SearchAsync() { //Open PDF document var doc = PdfDocument.Load(@"c:\test_big.pdf"); // C# Read PDF File PdfSearch search = new PdfSearch(doc); search.FoundTextAdded += (s, e) => { var textInfo = doc.Pages[e.FoundText.PageIndex].Text.GetTextInfo(e.FoundText.CharIndex, e.FoundText.CharsCount); foreach (var rect in textInfo.Rects) { float x = rect.left; float y = rect.top; Console.WriteLine(string.Format("Found text: {0}, Page = {1}, x= {2}, y={3}", textInfo.Text, e.FoundText.PageIndex, x, y)); //... } }; search.SearchCompleted += (s, e) => { doc.Dispose(); }; search.SearchProgressChanged += (s, e) => { Console.WriteLine(string.Format("Progress: {0}%", e.ProgressPercentage)); }; search.Start("document", FindFlags.MatchWholeWord); Console.ReadLine(); } C# Copy This example shows how you can use C# PDF Library for search for a text Asynchronously. API Documentation HOW TO EXTRACT TEXT COORDINATES FROM PDF /// <summary> /// Extract Text Coordinates from Pdf in C# using PDF Library /// </summary> public void ExtractTextInfo() { //Initialize the SDK library //You have to call this function before you can call any PDF processing functions. PdfCommon.Initialize(); //Open and load a PDF document from a file. using (var doc = PdfDocument.Load(@"c:\test001.pdf")) // C# Read PDF File { //Get second page from document using (var page = doc.Pages[1]) { //Extract text information structure from the page // 10 - Index for the start characters // 25 - Number of characters to be extracted var textInfo = page.Text.GetTextInfo(10, 25); //Gets text from textInfo strtucture string text = textInfo.Text; //Gets a collection of rectangular areas bounding specified text. var rects = textInfo.Rects; } } } C# Copy Pdfium.Net SDK also allows developers to easily extract the text coordinates from any PDF file. API Documentation HOW TO EXTRACT IMAGES FROM PDF DOCUMENT /// <summary> /// Extracting Images from Pdf File With .Net C# and PDF Library /// </summary> private int _writedImageIndex = 0; public void ExtractAllImages() { //Initialize the SDK library //You have to call this function before you can call any PDF processing functions. PdfCommon.Initialize(); //Open and load a PDF document from a file. using (var doc = PdfDocument.Load(@"c:\test001.pdf")) // C# Read PDF File { //Enumerate all pages sequentially in a given document foreach (var page in doc.Pages) { //Extract and save images ExtractImagesFromPage(page); //dipose page object to unload it from memory page.Dispose(); } } } private void ExtractImagesFromPage(PdfPage page) { //Enumerate all objects on a page foreach (var obj in page.PageObjects) { var imageObject = obj as PdfImageObject; if (imageObject == null) continue; //if not an image object then nothing do //Save image to disk var path = string.Format(@"c:\\Images\\image_{0}.png", ++_writedImageIndex); imageObject.Bitmap.Image.Save(path, ImageFormat.Png); } } C# Copy The example demonstrates extracting different format images from a pdf file, and saves them to disk. API Documentation HOW TO SPLIT PDF DOCUMENT INTO SMALL ONES /// <summary> /// Split PDF in C# using PDF Library /// </summary> public void SplitDocument() { //Initialize the SDK library //You have to call this function before you can call any PDF processing functions. PdfCommon.Initialize(); //Open and load a PDF document from a file. using (var sourceDoc = PdfDocument.Load(@"c:\test001.pdf")) // C# Read PDF File { //Create one PDF document for pages 1-5. using (var doc = PdfDocument.CreateNew()) { //Import pages from source document doc.Pages.ImportPages(sourceDoc, "1-5", 0); //And save it to doc1.pdf doc.Save(@"c:\doc1.pdf", SaveFlags.Incremental); } //Create another PDF document for pages 5-10. using (var doc = PdfDocument.CreateNew()) { //Also import pages doc.Pages.ImportPages(sourceDoc, "5-10", 0); //And save them too doc.Save(@"c:\doc2.pdf", SaveFlags.Incremental); } } } C# Copy The following code example demonstrates how to use C# PDF Library to split a PDF document. API Documentation MERGE SELECTED PAGES FROM MULTIPLE PDF FILES INTO ONE IN C# /// <summary> /// Merge PDFs in C# using PDF Library /// </summary> public void MergePdf() { //Initialize the SDK library //You have to call this function before you can call any PDF processing functions. PdfCommon.Initialize(); //Open and load a PDF document in which will be merged other files using (var mainDoc = PdfDocument.Load(@"c:\test001.pdf")) // C# Read source PDF File #1 { //Open one PDF document. using (var doc = PdfDocument.Load(@"c:\doc1.pdf")) //Read PDF File #2 { //Import all pages from document mainDoc.Pages.ImportPages( doc, string.Format("1-{0}", doc.Pages.Count), mainDoc.Pages.Count ); } //Open another PDF document. using (var doc = PdfDocument.Load(@"c:\doc2.pdf")) { //Import all pages from document mainDoc.Pages.ImportPages( doc, string.Format("1-{0}", doc.Pages.Count), mainDoc.Pages.Count ); } mainDoc.Save(@"c:\ResultDocument.pdf", SaveFlags.NoIncremental); } } C# Copy Using C# PDF Library, you can not only merge multiple PDF files into a single file, but also select specific pages from the source files and combine them in one PDF document. The code above shows how it can be done using ImportPages operation. API Documentation Source Code10 API Documentation Source Code11 API Documentation HOW TO CONVERT EACH PAGE OF PDF DOCUMENT TO SET OF IMAGES /// <summary> /// Render whole PDF document using C# PDF Library /// </summary> using (var doc = PdfDocument.Load(@"d:\0\test_big.pdf")) // C# Read PDF Document { foreach (var page in doc.Pages) { int width = (int)(page.Width / 72.0 * 96); int height = (int)(page.Height / 72.0 * 96); using (var bitmap = new PdfBitmap(width, height, true)) { bitmap.FillRect(0, 0, width, height, Color.White); page.Render(bitmap, 0, 0, width, height, PageRotate.Normal, RenderFlags.FPDF_LCD_TEXT); bitmap.Image.Save("...", ImageFormat.Png); } } } C# Copy In this example we are create a bitmap of each page, so we calculate the required width and height of the bitmap in pixels converted from the dimensions of the PDF page in Points. Each Point is 1/72 of an inch, so we basically take the vertical or horizontal DPI of the image (96 in our example), multiply it to corresponding dimension and divide by 72. Next we are create a new PdfBitmap using the dimensions we just computed. The last parameter of the constructor tells to use the true color mode. Then we fill the entire bitmap with white and render the page to it. Thats all! API Documentation HOW TO PROGRAMMATICALLY POPULATE AND EEXTRACT DATA FROM PDF FIELDS /// <summary> /// Filling Editable PDF Fields and Extracting Data From Them using .Net PDF Library /// </summary> private void btnTest_Click(object sender, RoutedEventArgs e) { var forms = new PdfForms(); var doc = PdfDocument.Load(@"c:\test.pdf", forms); // C# Read PDF Document //doc.FormFill is equal to forms and can be used to get access to acro forms as well; int i = 0; foreach(var field in forms.InterForm.Fields) { if(field.FieldType == Patagames.Pdf.Enums.FormFieldTypes.FPDF_FORMFIELD_TEXTFIELD) { field.Value = "This is a field #" + (++i); } } } C# Copy This example code demonstrates how programmatically fill all editable forms in pdf document using .Net PDF Library. API Documentation AFFORDABLE SUPPORT FROM DEVELOPERS TO DEVELOPERS Patagames support service is what you might call «developers for developers». When you license product, you receive more than a great library. To get the most from this one, you also receive 12 months of free technical support directly from our .Net development team. > I've tried your latest release and it works perfectly ― solves both my > problems! Thanks for meeting my request ―it's much appreciated. We still use > [other product] for some legacy projects, but we have dropped it for all new > projects. Although the [other product] library itself is good, we found their > support to be poor ― without doubt Pdfium.NET support has proven to be far > better, both in speed and quality! > Again, many thanks for your first-rate service and excellent product. -Terry > The link is hidden due to ethical concerns. WE FOCUS ON SIMPLICITY SO THAT YOU CAN FOCUS ON YOUR APPS The primary design goal of Pdfium.Net SDK is to make things simple and intuitive to developers. The class library abstracts all the details of using the underlying pdfium library and provides an interface based on world objects and other intuitive classes. Furthermore, Pdfium.Net SDK is well documented SDK! We provide a rich documentation which aims to give beginners and advanced users an overview of what is possible with the Pdfium.Net SDK. Explore Documentation OPTIMIZED FOR ENTERPRISE AND CLOUD SERVICES One of our target is to provide developers with high quality tool for dynamic PDF creation on any server system like Microsoft Azure. > I have verified that your SDK does work when deployed to Azure (several > products I tested did not ― you may want to advertise this). And I have made > the purchase. > Thanks again! -Cyberg > https://forum.patagames.com/posts/m1105-Workability-in-various-environments#post1105 EMBED 100% STANDALONE C# PDF VIEWER IN YOUR APPS. CUSTOMIZE THE LOOK. HANDLE EVENTS AND ENJOY DRAMATIC INTERACTIVITY. Bestow the ability to view pdf files to your .Net app! With multiple view modes, nuanced customization and complete support for acroforms pdf viewer fits into your application seamlessly and tailored to your design. * Fully Customizable UI * Smooth PDF-application interaction * Flexible text processing * Simple integration * Open Source WPF PDF Viewer Winforms PDF Viewer Refer to documentationfor more information about appearance of PdfViewer PDFIUM.NET SDK Download NuGet package is also available in the official repo at nuget.org PM> Install-Package Pdfium.Net.SDK DESIGNED FOR View more... patagames © 2024 - United States Change Region privacy policy | eula | SDK Reference | Support Forum CHOOSE YOUR REGION × Selecting a region changes the language and/or content on patagames.com. Americas Canada - English United States - English Europe, Middle East and Africa Հայաստան - русский Österreich - Deutsch Беларусь - русский België - Deutsch Eesti - русский საქართველო - русский Deutschland - Deutsch Ireland - English ישראל - English ישראל - русский Қазақстан - русский Кыргызстан - русский Latvija - русский Liechtenstein - Deutsch Lietuva - русский Lëtzebuerg - Deutsch Молдова - русский Россия - русский Suid-Afrika - English Svizzera - Deutsch Тоҷикистон - русский Україна - русский United Kingdom - English Ўзбекистон Республикаси - русский Europe - English Asia Pacific Australia - English 中华人民共和国 - 中文(简体) 旧版 香港特別行政區 - English 香港特別行政區 - 中文(繁體) 舊版 भारत - English 日本 - 日本語 대한민국 - 한국어 Malaysia - English New Zealand - English Philippines - English 新加坡 - 中文(简体) 旧版 新加坡 - English 台灣 - 中文(繁體) 舊版 × Surfen Sie auf patagames.com außerhalb der USA? Besuchen Sie Ihre regionale Website für die neuesten Tarife, Veranstaltungen und Angebote in Ihrem Land. Are you visiting patagames.com from outside the US? Visit your regional site for more relevant pricing, promotions and events. Zur Website für Deutschland Continue to United States