Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
983dbfb
Improve GetTextBounds() not to bump.
wiera987 May 6, 2019
41d388d
Performance improvement.
wiera987 May 6, 2019
7070dcc
Fixed the blank space at the end of PDF file which has 1500 pages.
wiera987 May 26, 2019
8e1c98c
Fixed an issue that could not move to the next page.
wiera987 May 26, 2019
91bf871
Fixed maybe.
wiera987 May 26, 2019
2781c08
Fixed a wheel zoom issue that moved to a page not pointed by the mous…
wiera987 May 26, 2019
f1b1aff
Merge remote-tracking branch 'sschim/master'
Jun 23, 2019
e4c04c9
Demo:
Jun 23, 2019
d9b2b1b
Fixed an issue where panning and text selection were confused and the…
Jun 23, 2019
a66323b
Fixed an issue with text selection.It is copied more than the selecte…
Jun 24, 2019
96889c8
Added PdfMarker tag for multiple purposes.
Oct 21, 2019
5909adb
Rectangle drawing support for PDFComp boundary comparison.
wiera987 Feb 18, 2023
c9a885a
Fixed the display position shifting up when loading.
wiera987 Feb 22, 2023
95c7bfe
In bounds mode, the page with the bounds displayed has priority as th…
wiera987 Aug 10, 2024
e7cb0b6
Fixed: An exception occurred when pressing the zoom button.
wiera987 Nov 10, 2024
31f4af8
Fixed: An exception occurred when pressing the zoom button.
wiera987 Nov 10, 2024
54f06d3
Merge branch 'master' of https://github.com/wiera987/PdfiumViewer
wiera987 Nov 10, 2024
fb5d1f3
The bookmark that corresponds to the current page is now displayed as…
wiera987 Nov 24, 2024
0ff531a
Fixed an issue that caused an exception when calling ZoomMin/ZoomMax …
wiera987 Nov 25, 2024
6fd28a3
Fixed: Zooming with the mouse wheel changes the zoom position.
wiera987 Nov 27, 2024
543d031
Fixed: When zooming, the screen would flicker and update out of posit…
wiera987 Dec 7, 2024
3dec9f6
Change: Mouse wheel zooms to the focus point, zoom button zooms to th…
wiera987 Dec 7, 2024
32ebedd
Added buttons for bookmark operations.
wiera987 Dec 7, 2024
a1ab693
Fixed: An exception occurred when loading a short PDF after displayin…
wiera987 Dec 13, 2024
e500955
Fixed: When I minimized the window and restored it, the page was out …
wiera987 Dec 18, 2024
705bdd2
Patch: Repeated magnification causes the display position to shift du…
wiera987 Dec 19, 2024
739a40c
Patch: Repeated magnification causes the display position to shift du…
wiera987 Dec 19, 2024
255776c
Merge branch 'master' of https://github.com/wiera987/PdfiumViewer
wiera987 Dec 19, 2024
dec15cd
Patch: Repeated magnification causes the display position to shift du…
wiera987 Dec 26, 2024
bc73f92
Build bookmark tree even when bookmark panel is hidden.
wiera987 Jan 4, 2025
fb0f3ec
Fixed that the bookmark page range is an invalid value for pages that…
wiera987 Jan 5, 2025
97f58bc
Fixed an issue where text could not be selected correctly when rotate…
wiera987 Jan 10, 2025
6856431
Change: Disable assembly signing due to requirement for administrator…
wiera987 Feb 15, 2025
5f733b7
Change: Add a feature to flash the specified range of TextSpans.
wiera987 Mar 22, 2025
cff5a3e
Add a feature to flash the TextSpan area using DrawTextOutline().
wiera987 Jan 1, 2026
73c4f2e
Clarify custom version for PDFComp in README
wiera987 Jan 1, 2026
377fc71
Merge branch 'master' of https://github.com/wiera987/PdfiumViewer
wiera987 Jan 1, 2026
95c2553
Add note about custom PdfiumViewer version
wiera987 Jan 1, 2026
66030a7
Fixed: Corrected broken TextSpan outline when using DrawTwoRectangles…
wiera987 Jan 2, 2026
4053a13
Merge branch 'master' of https://github.com/wiera987/PdfiumViewer
wiera987 Jan 2, 2026
6a6075a
If no bookmark is selected, return an undefined range determined by t…
wiera987 Jan 3, 2026
652a636
Upgrade to newer pdfium build from https://github.com/bblanchon/pdfiu…
alxnull Sep 6, 2020
e57dc01
Add style-related features from Experimental APIs
wiera987 Feb 15, 2026
8bd8dbf
Add path-based detection for strikeout and underline
wiera987 Feb 22, 2026
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
114 changes: 68 additions & 46 deletions PdfiumViewer.Demo/MainForm.Designer.cs

Large diffs are not rendered by default.

25 changes: 9 additions & 16 deletions PdfiumViewer.Demo/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,9 @@ private void _hideBookmarks_Click(object sender, EventArgs e)

private void deleteCurrentPageToolStripMenuItem_Click(object sender, EventArgs e)
{
// PdfRenderer does not support changes to the loaded document,
// so we fake it by reloading the document into the renderer.

int page = pdfViewer1.Renderer.Page;
var document = pdfViewer1.Document;
pdfViewer1.Document = null;
document.DeletePage(page);
pdfViewer1.Document = document;
pdfViewer1.Renderer.Page = page;
pdfViewer1.Document.DeletePage(page);
pdfViewer1.Renderer.ReloadDocument();
}

private void rotate0ToolStripMenuItem_Click(object sender, EventArgs e)
Expand All @@ -313,15 +307,9 @@ private void rotate270ToolStripMenuItem_Click(object sender, EventArgs e)

private void Rotate(PdfRotation rotate)
{
// PdfRenderer does not support changes to the loaded document,
// so we fake it by reloading the document into the renderer.

int page = pdfViewer1.Renderer.Page;
var document = pdfViewer1.Document;
pdfViewer1.Document = null;
document.RotatePage(page, rotate);
pdfViewer1.Document = document;
pdfViewer1.Renderer.Page = page;
pdfViewer1.Document.RotatePage(page, rotate);
pdfViewer1.Renderer.ReloadDocument();
}

private void showRangeOfPagesToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -395,5 +383,10 @@ private void pdfViewerContextMenu_Opening(object sender, CancelEventArgs e)
{
copyToolStripMenuItem.Enabled = pdfViewer1.Renderer.IsTextSelected;
}

private void _textMode_Click(object sender, EventArgs e)
{
pdfViewer1.Renderer.CursorMode = (pdfViewer1.Renderer.CursorMode == PdfCursorMode.Pan) ? PdfCursorMode.TextSelection : PdfCursorMode.Pan;
}
}
}
15 changes: 15 additions & 0 deletions PdfiumViewer.Demo/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,21 @@
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="_textMode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="_showToolbar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
5 changes: 0 additions & 5 deletions PdfiumViewer.Demo/PdfRangeDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,6 @@ public int CountCharacters(int page)
return _document.CountCharacters(page);
}

public List<PdfRectangle> GetTextRectangles(int page, int startIndex, int count)
{
return _document.GetTextRectangles(page, startIndex, count);
}

private int TranslatePage(int page)
{
if (page < 0 || page >= PageCount)
Expand Down
8 changes: 4 additions & 4 deletions PdfiumViewer.Demo/PdfiumViewer.Demo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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')" />
<Import Project="..\packages\PDFium.x86.v8-xfa.4194.0.0\Build\pdfium.x86.v8-xfa.props" Condition="Exists('..\packages\PDFium.x86.v8-xfa.4194.0.0\Build\pdfium.x86.v8-xfa.props')" />
<Import Project="..\packages\PDFium.x64.v8-xfa.4194.0.0\Build\pdfium.x64.v8-xfa.props" Condition="Exists('..\packages\PDFium.x64.v8-xfa.4194.0.0\Build\pdfium.x64.v8-xfa.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -160,8 +160,8 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\PdfiumViewer.Native.x86_64.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86_64.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PdfiumViewer.Native.x86_64.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86_64.v8-xfa.props'))" />
<Error Condition="!Exists('..\packages\PdfiumViewer.Native.x86.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PdfiumViewer.Native.x86.v8-xfa.2017.11.2.204\build\PdfiumViewer.Native.x86.v8-xfa.props'))" />
<Error Condition="!Exists('..\packages\PDFium.x64.v8-xfa.4194.0.0\Build\pdfium.x64.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PDFium.x64.v8-xfa.4194.0.0\Build\pdfium.x64.v8-xfa.props'))" />
<Error Condition="!Exists('..\packages\PDFium.x86.v8-xfa.4194.0.0\Build\pdfium.x86.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PDFium.x86.v8-xfa.4194.0.0\Build\pdfium.x86.v8-xfa.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 2 additions & 2 deletions PdfiumViewer.Demo/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +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" />
<package id="PDFium.x64.v8-xfa" version="4194.0.0" targetFramework="net20" />
<package id="PDFium.x86.v8-xfa" version="4194.0.0" targetFramework="net20" />
</packages>
5 changes: 4 additions & 1 deletion PdfiumViewer.Test/PdfiumViewer.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PdfiumViewer.Test</RootNamespace>
<AssemblyName>PdfiumViewer.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
Expand Down
6 changes: 3 additions & 3 deletions PdfiumViewer.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net40" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net40" />
</packages>
12 changes: 6 additions & 6 deletions PdfiumViewer.WPFDemo/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
3 changes: 2 additions & 1 deletion PdfiumViewer.WPFDemo/PdfiumViewer.WPFDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PdfiumViewer.WPFDemo</RootNamespace>
<AssemblyName>PdfiumViewer.WPFDemo</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
134 changes: 63 additions & 71 deletions PdfiumViewer.WPFDemo/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 26 additions & 30 deletions PdfiumViewer.WPFDemo/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading