master
editor 1 week ago
commit a3a2c62d5b

@ -0,0 +1,57 @@
WINFORM版PDF阅读器
一、源码描述
winform版Pdf阅读器
环境VS2022 Winform
二、功能介绍
winform使用PdfiumViewer加载查看pdf文件。
PdfiumViewer.Demo为启动项目。
三、注意事项
1、编译设置为x86.
2、ctrl+F5运行即可。
作者: coderbest
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/WinformPDFReader
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
namespace PdfiumViewer.Demo
{
partial class ExportBitmapsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
public partial class ExportBitmapsForm : Form
{
private int _dpiX;
private int _dpiY;

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace PdfiumViewer.Demo
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
public partial class MainForm : Form
{
private SearchForm _searchForm;

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
namespace PdfiumViewer.Demo
{
partial class PageRangeForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
public partial class PageRangeForm : Form
{
private readonly IPdfDocument _document;
public IPdfDocument Document { get; private set; }

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Text;
namespace PdfiumViewer.Demo
{
public class PdfRangeDocument : IPdfDocument
{
public static PdfRangeDocument FromDocument(IPdfDocument document, int startPage, int endPage)
{
if (document == null)
throw new ArgumentNullException(nameof(document));

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\PdfiumViewer.Native.x86.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86.v8-xfa.props" Condition="Exists('..\packages\PdfiumViewer.Native.x86.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86.v8-xfa.props')" />
<Import Project="..\packages\PdfiumViewer.Native.x86_64.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86_64.v8-xfa.props" Condition="Exists('..\packages\PdfiumViewer.Native.x86_64.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86_64.v8-xfa.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{ADD131F6-17EB-4E42-932F-74CBE6DBEEB3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PdfiumViewer.Demo</RootNamespace>
<AssemblyName>PdfiumViewer.Demo</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>

@ -0,0 +1,15 @@
namespace PdfiumViewer.Demo
{
partial class PrintMultiplePagesForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
public partial class PrintMultiplePagesForm : Form
{
private readonly PdfViewer _viewer;
public PrintMultiplePagesForm(PdfViewer viewer)

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{

@ -0,0 +1,15 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("PdfViewer.Demo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Pieter van Ginkel")]
[assembly: AssemblyProduct("PdfViewer.Demo")]
[assembly: AssemblyCopyright("Pieter van Ginkel © 2012-2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PdfiumViewer.Demo.Properties {
using System;
/// <summary>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PdfiumViewer.Demo.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]

@ -0,0 +1,15 @@
namespace PdfiumViewer.Demo
{
partial class SearchForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer.Demo
{
public partial class SearchForm : Form
{
private readonly PdfSearchManager _searchManager;
private bool _findDirty;

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

@ -0,0 +1,15 @@
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\PdfiumViewer.Demo.exe.config
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\PdfiumViewer.Demo.exe
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\PdfiumViewer.Demo.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\PdfiumViewer.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\PdfiumViewer.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\Debug\nl\PdfiumViewer.resources.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.csproj.AssemblyReference.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.ExportBitmapsForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.MainForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.PageRangeForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.PrintMultiplePagesForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.Properties.Resources.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.SearchForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.csproj.GenerateResource.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\Debug\PdfiumViewer.Demo.csproj.CoreCompileInputs.cache

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

@ -0,0 +1,15 @@
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\x86\pdfium.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\x64\pdfium.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\PdfiumViewer.Demo.exe.config
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\PdfiumViewer.Demo.exe
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\PdfiumViewer.Demo.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\PdfiumViewer.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\PdfiumViewer.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\bin\x86\Debug\nl\PdfiumViewer.resources.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.csproj.AssemblyReference.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.ExportBitmapsForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.MainForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.PageRangeForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.PrintMultiplePagesForm.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.Properties.Resources.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Demo\obj\x86\Debug\PdfiumViewer.Demo.SearchForm.resources

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PdfiumViewer.Native.x86.v8-xfa" version="2017.11.2.204" targetFramework="net20" />
<package id="PdfiumViewer.Native.x86_64.v8-xfa" version="2017.11.2.204" targetFramework="net20" />
</packages>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using NUnit.Framework;
namespace PdfiumViewer.Test
{
[TestFixture]
public class MultiAppDomainFixture
{
[Test]
public void MultipleAppDomains()
{

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{61083268-3F14-47B7-8753-AF69BB3D0891}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PdfiumViewer.Test</RootNamespace>
<AssemblyName>PdfiumViewer.Test</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>

@ -0,0 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PdfiumViewer.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PdfiumViewer.Test")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>nunit.framework</name>
</assembly>
<members>
<member name="T:NUnit.Framework.ActionTargets">
<summary>
The different targets a test action attribute can be applied to
</summary>
</member>
<member name="F:NUnit.Framework.ActionTargets.Default">
<summary>
Default target, which is determined by where the action attribute is attached
</summary>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

@ -0,0 +1,12 @@
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\PdfiumViewer.Test.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\PdfiumViewer.Test.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\nunit.framework.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\PdfiumViewer.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\PdfiumViewer.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\nunit.framework.xml
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\bin\Debug\nl\PdfiumViewer.resources.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\obj\Debug\PdfiumViewer.Test.csproj.AssemblyReference.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\obj\Debug\PdfiumViewer.Test.csproj.CoreCompileInputs.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\obj\Debug\PdfiumVi.3ECECC0A.Up2Date
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\obj\Debug\PdfiumViewer.Test.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.Test\obj\Debug\PdfiumViewer.Test.pdb

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net40" />
</packages>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

@ -0,0 +1,9 @@
<Application x:Class="PdfiumViewer.WPFDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PdfiumViewer.WPFDemo"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace PdfiumViewer.WPFDemo
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{

@ -0,0 +1,15 @@
using System;
using System.Windows.Media.Imaging;
using System.Drawing;
using System.Windows.Media;
namespace PdfiumViewer.WPFDemo
{
internal class BitmapHelper
{
public static BitmapSource ToBitmapSource(Image image)
{
return ToBitmapSource(image as Bitmap);
}

@ -0,0 +1,15 @@
<Window x:Class="PdfiumViewer.WPFDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:PdfiumViewer.WPFDemo"
mc:Ignorable="d" Loaded="Window_Loaded" Closed="Window_Closed"
Title="MainWindow" Height="600" Width="800">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>

@ -0,0 +1,15 @@
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace PdfiumViewer.WPFDemo
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PdfiumViewer.WPFDemo
{
internal static class NativeMethods
{
[DllImport("gdi32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DeleteObject([In] IntPtr hObject);
}

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CBD6C52A-F0F4-48B8-957B-8CAD54ACD837}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PdfiumViewer.WPFDemo</RootNamespace>
<AssemblyName>PdfiumViewer.WPFDemo</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>

@ -0,0 +1,15 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PdfiumViewer.WPFDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("IRISTED")]
[assembly: AssemblyProduct("PdfiumViewer.WPFDemo")]
[assembly: AssemblyCopyright("Copyright © 2015")]

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PdfiumViewer.WPFDemo.Properties {
using System;
/// <summary>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PdfiumViewer.WPFDemo.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

@ -0,0 +1,15 @@
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FACDE6EF1E77E9F0A447D39F4579EC39C827654F328D7CB4917412DEB069D0B6"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FACDE6EF1E77E9F0A447D39F4579EC39C827654F328D7CB4917412DEB069D0B6"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F5B27EF55F00CF13479F2E4029C4B4AFC4DFF9ADC8C9E368B371CAF7516BC79E"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F5B27EF55F00CF13479F2E4029C4B4AFC4DFF9ADC8C9E368B371CAF7516BC79E"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\PdfiumViewer.WPFDemo.exe.config
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\PdfiumViewer.WPFDemo.exe
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\PdfiumViewer.WPFDemo.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\PdfiumViewer.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\PdfiumViewer.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\Debug\nl\PdfiumViewer.resources.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo.csproj.AssemblyReference.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\MainWindow.g.cs
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\App.g.cs
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo_MarkupCompile.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo_MarkupCompile.lref
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\MainWindow.baml
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo.g.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo.Properties.Resources.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\Debug\PdfiumViewer.WPFDemo.csproj.GenerateResource.cache

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

@ -0,0 +1,15 @@
#pragma checksum "..\..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FACDE6EF1E77E9F0A447D39F4579EC39C827654F328D7CB4917412DEB069D0B6"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FACDE6EF1E77E9F0A447D39F4579EC39C827654F328D7CB4917412DEB069D0B6"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F5B27EF55F00CF13479F2E4029C4B4AFC4DFF9ADC8C9E368B371CAF7516BC79E"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F5B27EF55F00CF13479F2E4029C4B4AFC4DFF9ADC8C9E368B371CAF7516BC79E"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using PdfiumViewer.WPFDemo;
using System;
using System.Diagnostics;
using System.Windows;

@ -0,0 +1,15 @@
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\PdfiumViewer.WPFDemo.exe.config
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\PdfiumViewer.WPFDemo.exe
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\PdfiumViewer.WPFDemo.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\PdfiumViewer.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\PdfiumViewer.pdb
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\bin\x86\Debug\nl\PdfiumViewer.resources.dll
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo.csproj.AssemblyReference.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\MainWindow.g.cs
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\App.g.cs
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo_MarkupCompile.cache
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo_MarkupCompile.lref
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\MainWindow.baml
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo.g.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo.Properties.Resources.resources
C:\Users\coder\Desktop\2024Code\10\20241008\submit\1\PdfiumViewer\PdfiumViewer.WPFDemo\obj\x86\Debug\PdfiumViewer.WPFDemo.csproj.GenerateResource.cache

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Text;
using System.Windows.Forms;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class CustomScrollControl : Control
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public enum HitTest
{
Border = NativeMethods.HitTestValues.HTBORDER,
Bottom = NativeMethods.HitTestValues.HTBOTTOM,
BottomLeft = NativeMethods.HitTestValues.HTBOTTOMLEFT,
BottomRight = NativeMethods.HitTestValues.HTBOTTOMRIGHT,
Caption = NativeMethods.HitTestValues.HTCAPTION,

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Represents a PDF document.
/// </summary>
public interface IPdfDocument : IDisposable
{
/// <summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Represents a marker on a PDF page.
/// </summary>
public interface IPdfMarker
{
/// <summary>
/// The page where the marker is drawn on.
/// </summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class LinkClickEventArgs : HandledEventArgs
{
/// <summary>
/// Gets the link that was clicked.

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public enum MouseWheelMode
{
PanAndZoom,
Pan,
Zoom
}
}

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using System.IO;
#pragma warning disable 1591
namespace PdfiumViewer
{
partial class NativeMethods
{
// Interned strings are cached over AppDomains. This means that when we
// lock on this string, we actually lock over AppDomain's. The Pdfium

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32.SafeHandles;
namespace PdfiumViewer
{
internal static partial class NativeMethods
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer
{
internal class NativeTreeView : TreeView
{
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
private extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName,
string pszSubIdList);
protected override void CreateHandle()

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
#pragma warning disable 1591
namespace PdfiumViewer
{
public abstract class PanningZoomingScrollControl : CustomScrollControl
{
public const double DefaultZoomMin = 0.1;
public const double DefaultZoomMax = 5;

@ -0,0 +1,15 @@
namespace PdfiumViewer
{
partial class PasswordForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer
{
internal partial class PasswordForm : Form
{
public string Password
{
get { return _password.Text; }

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfBookmark
{
public string Title { get; set; }
public int PageIndex { get; set; }

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer
{
/// <summary>
/// Provides functionality to render a PDF document.

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public enum PdfError
{
Success = (int)NativeMethods.FPDF_ERR.FPDF_ERR_SUCCESS,
Unknown = (int)NativeMethods.FPDF_ERR.FPDF_ERR_UNKNOWN,
CannotOpenFile = (int)NativeMethods.FPDF_ERR.FPDF_ERR_FILE,
InvalidFormat = (int)NativeMethods.FPDF_ERR.FPDF_ERR_FORMAT,
PasswordProtected = (int)NativeMethods.FPDF_ERR.FPDF_ERR_PASSWORD,

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfException : Exception
{
public PdfError Error { get; private set; }
public PdfException()
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
namespace PdfiumViewer
{
internal class PdfFile : IDisposable
{
private static readonly Encoding FPDFEncoding = new UnicodeEncoding(false, false, false);

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
/// <summary>
/// Contains text from metadata of the document.
/// </summary>
public class PdfInformation
{
public string Author { get; set; }
public string Creator { get; set; }

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace PdfiumViewer
{
internal class PdfLibrary : IDisposable
{
private static readonly object _syncRoot = new object();
private static PdfLibrary _library;
public static void EnsureLoaded()
{
lock (_syncRoot)

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfMarker : IPdfMarker
{
public int Page { get; }
public RectangleF Bounds { get; }
public Color Color { get; }
public Color BorderColor { get; }

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfMarkerCollection : Collection<IPdfMarker>
{
public event EventHandler CollectionChanged;
protected override void ClearItems()
{

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfMatch
{
public string Text { get; }
public PdfTextSpan TextSpan { get; }
public int Page { get; }
public PdfMatch(string text, PdfTextSpan textSpan, int page)

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public class PdfMatches
{
public int StartPage { get; private set; }
public int EndPage { get; private set; }

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Describes a link on a page.
/// </summary>
public class PdfPageLink
{
/// <summary>
/// The location of the link.
/// </summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Describes all links on a page.
/// </summary>
public class PdfPageLinks
{
/// <summary>
/// All links of the page.
/// </summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public struct PdfPoint : IEquatable<PdfPoint>
{
public static readonly PdfPoint Empty = new PdfPoint();
// _page is offset by 1 so that Empty returns an invalid point.
private readonly int _page;

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using System.Text;
namespace PdfiumViewer
{
internal class PdfPrintDocument : PrintDocument
{
private readonly IPdfDocument _document;
private readonly PdfPrintSettings _settings;
private int _currentPage;
public event QueryPageSettingsEventHandler BeforeQueryPageSettings;

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Specifies the mode in which the document should be printed.
/// </summary>
/// <remarks>
/// Printers have a hard margin. This is a (small) margin on which it is not
/// possible to print. PdfPrintMode specifies whether the page should be
/// scaled to fit into this margin, or that the margin should be cut off of
/// the page.
/// </remarks>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace PdfiumViewer
{
/// <summary>
/// Configuration for printing multiple PDF pages on a single page.
/// </summary>
public class PdfPrintMultiplePages
{
/// <summary>
/// Gets the number of pages to print horizontally.
/// </summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Configures the print document.
/// </summary>
public class PdfPrintSettings
{
/// <summary>
/// Gets the mode used to print margins.
/// </summary>
public PdfPrintMode Mode { get; }

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
#pragma warning disable 1591
namespace PdfiumViewer
{
public struct PdfRectangle : IEquatable<PdfRectangle>
{
public static readonly PdfRectangle Empty = new PdfRectangle();
// _page is offset by 1 so that Empty returns an invalid rectangle.
private readonly int _page;

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace PdfiumViewer
{
/// <summary>
/// Flags that influence the page rendering process.
/// </summary>
[Flags]
public enum PdfRenderFlags
{
/// <summary>
/// No flags.
/// </summary>

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace PdfiumViewer
{
/// <summary>
/// Control to render PDF documents.
/// </summary>
public class PdfRenderer : PanningZoomingScrollControl
{
private static readonly Padding PageMargin = new Padding(4);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save