Coder Social home page Coder Social logo

pdfiumviewer's Introduction

NuGet NuGet

PdfiumViewer

Apache 2.0 License.

Note: this is a .Net Core WPF port of PdfiumViewer

Download from NuGet.

Download Portabl PdfiumViewer WPF Demo

PdfiumViewer.WPF

PdfiumViewer.WPF

PdfiumViewer.WPF

Introduction

PdfiumViewer is a PDF viewer based on the PDFium project.

PdfiumViewer provides a number of components to work with PDF files:

  • PdfDocument is the base class used to render PDF documents;

  • PdfRenderer is a WPF control that can render a PdfDocument;

Note: If you want to use that in WinForms, please use the main project from PdfiumViewer WinForm

Compatibility

The PdfiumViewer library has been tested with Windows XP and Windows 8, and is fully compatible with both. However, the native PDFium libraries with V8 support do not support Windows XP. See below for instructions on how to reference the native libraries.

Using the library

The PdfiumViewer control requires native PDFium libraries. These are not included in the PdfiumViewer NuGet package. See the Installation instructions Wiki page for more information on how to add these.

Note on the PdfViewer control

The PdfiumViewer library primarily consists out of three components:

  • The PdfRenderer control. This control implements the raw PDF renderer. This control displays a PDF document, provides zooming and scrolling functionality and exposes methods to perform more advanced actions;
  • The PdfDocument class provides access to the PDF document and wraps the Pdfium library.

Building PDFium

Instructions to build the PDFium library can be found on the Building PDFium wiki page. However, if you are just looking to use the PdfiumViewer component or looking for a compiled version of PDFium, these steps are not required. NuGet packages with precompiled PDFium libraries are made available for usage with PdfiumViewer. See the chapter on Using the library for more information.

Alternatively, the PdfiumBuild project is provided to automate building PDFium. This project contains scripts to build PdfiumViewer specific versions of the PDFium library. This project is configured on a build server to compile PDFium daily. Please refer to the PdfiumBuild project page for the location of the output of the build server. The PdfiumViewer specific libraries are located in the PdfiumViewer-... target directories.

Bugs

Bugs should be reported through github at http://github.com/bezzad/PdfiumViewer/issues.

License

PdfiumViewer is licensed under the Apache 2.0 license. See the license details for how PDFium is licensed.

pdfiumviewer's People

Contributors

bezzad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pdfiumviewer's Issues

ASP.Net core 3.1 - pdfium.dll not found

Hi, I download form nuget and try print pdf file in asp.net core but when I debug my app, it's crash because can not found .dll file reference.
I hope you slove it for asp.net core
Thank you!

Can't select text. Limitation of the underlying Pdfium library?

I think selecting and copying text is an essential feature of a PDF viewer. I had tried another C# Pdfium control that was deprecated in 2017, but most web search results were referring to. It did not have text selection. It only had "Get Text" button. I downloaded this control and it was the same: I could not select text, and only "Get Text" is available.

So..., is this the limitation that comes from Google's Pdfium library itself and there is no easy way to add text selection?

links of pdf

The links aren't working..
They are not clickable...

Search/Scroll not working

Hi bezzad,

looks like you know it already: the automate scroll function of the search is not working. Also text is not being highlighted.
Do you have a clue why? Can I help you?

Best regards
FC

Multi-threaded print

Is it possible to somehow do the rendering to print a multi-page PDF using multiple threads - e.g. separate chunks of pages for each thread? I'm not very experienced with C# and threads but am trying to find a way to speed up printing for large jobs (e.g. 500+ pages). Somehow Adobe Acrobat is way faster than our print program which uses Pdfium.. Your thoughts would be much appreciated!

Missing Page Thumbnails Panel

Hi
Thank you for this great app, I am also looking for the pages thumbnails panel, any idea where to start or you have planned for the feature.

Thanks
AW

Print button

Hello, I'm sending a code that I found in the stackoverflow to print the document in pdf, if you can implement this option, thank you.

public bool PrintPDF(PdfDocument document , string printer, string paperName, string filename, int copies)
{
try
{
// Create the printer settings for our printer
var printerSettings = new PrinterSettings
{
PrinterName = printer,
Copies = (short)copies,
};

            // Create our page settings for the paper size selected
            var pageSettings = new PageSettings(printerSettings)
            {
                Margins = new Margins(0, 0, 0, 0),
            };
            foreach (PaperSize paperSize in printerSettings.PaperSizes)
            {
                if (paperSize.PaperName == paperName)
                {
                    pageSettings.PaperSize = paperSize;
                    break;
                }
            }

            // Now print the PDF document

                using (var printDocument = document.CreatePrintDocument())
                {
                    printDocument.PrinterSettings = printerSettings;
                    printDocument.DefaultPageSettings = pageSettings;
                    printDocument.PrintController = new StandardPrintController();
                    printDocument.Print();
                }
            return true;
        }
        catch (Exception)
        {
            return false;
        }
    }

var ret = PrintPDF(Renderer.Document,"Microsoft Print to PDF", "A4", dialog.FileName, 1);

Request support for touch screen swipe to turn pages

Hello Bezzad,

I am very grateful for developing this PDF viewer control, which has been of great help to my development. However, I am now developing a Windows tablet program and have found that it does not support touch scrolling for page turning. Would it be possible to add support for this feature?

Best regards.

not up to date

Severity Code Description Project File Line Suppression State
Error Could not install package 'PdfiumViewer.WPF 1.0.6'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

.NET 5 support

Hi, I'm trying to use PdfiumViewer as library in a .NET 5 project but Visual Studio says that is not compatible.

Have you any info about .NET 5 support?

Thanks!

Editable fields

Hi!
I downloaded your project, everything is great!

I't would be perfect if it could handle the editable fields
Now they are ignored..

It's a scheluded feature?

Thanks!
Stefano

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.