Skip to content

Commit

Permalink
general maintenance, pdfium version and some easy issue fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Modest-as committed Apr 24, 2022
1 parent 476cc6b commit 6842edb
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

**docnet** aims to be a fast PDF editing and data extraction library. It is a `.NET Standard 2.0` wrapper for `PDFium C++` library that is used by `chromium`.

PDFium version: `4955`
PDFium version: `5010`

Supported platforms:

Expand Down
3 changes: 0 additions & 3 deletions src/Docnet.Core/Models/BoundBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ public BoundBox(int left, int top, int right, int bottom)
Validator.CheckNotLessThanZero(right, nameof(right));
Validator.CheckNotLessThanZero(bottom, nameof(bottom));

Validator.CheckOrder(left, right, nameof(left), nameof(right));
Validator.CheckOrder(top, bottom, nameof(top), nameof(bottom));

Left = left;
Top = top;
Right = right;
Expand Down
2 changes: 1 addition & 1 deletion src/Docnet.Core/Models/PageDimensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public PageDimensions(int dimOne, int dimTwo)
/// scalingFactor represents a value to which physical page
/// dimensions should scale in a pixel space.
/// </summary>
/// <param name="scalingFactor">Page scaling PPI factor.</param>
/// <param name="scalingFactor">Page scaling factor in pixels-per-point. Convert PPI to scaling factor as PPI/72.</param>
public PageDimensions(double scalingFactor)
{
Validator.CheckNotLessOrEqualToZero(scalingFactor, nameof(scalingFactor));
Expand Down
Binary file modified src/Docnet.Core/runtimes/linux-arm/native/pdfium.so
Binary file not shown.
Binary file modified src/Docnet.Core/runtimes/linux-arm64/native/pdfium.so
Binary file not shown.
Binary file modified src/Docnet.Core/runtimes/linux/native/pdfium.so
Binary file not shown.
Binary file modified src/Docnet.Core/runtimes/osx/native/pdfium.dylib
Binary file not shown.
Binary file modified src/Docnet.Core/runtimes/win-x64/native/pdfium.dll
Binary file not shown.
Binary file modified src/Docnet.Core/runtimes/win-x86/native/pdfium.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions src/Docnet.Tests.Integration/PageReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public void GetText_WhenCalled_ShouldContainValidText(Input type, string filePat
[InlineData(Input.FromBytes, "Docs/simple_2.pdf", null, 3, 10)]
[InlineData(Input.FromBytes, "Docs/simple_5.pdf", null, 0, 40)]
[InlineData(Input.FromBytes, "Docs/protected_0.pdf", "password", 0, 2009)]
[InlineData(Input.FromBytes, "Docs/sample_bound_box_order_01.pdf", null, 0, 5432)]
public void GetCharacters_WhenCalled_ShouldReturnCharacters(Input type, string filePath, string password, int pageIndex, int charCount)
{
ExecuteForDocument(type, filePath, password, 10, 10, pageIndex, pageReader =>
Expand Down
2 changes: 0 additions & 2 deletions src/Docnet.Tests.Unit/Models/BoundBoxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ public class BoundBoxTests
[InlineData(0, -1, 0, 0)]
[InlineData(0, 0, -1, 0)]
[InlineData(0, 0, 0, -1)]
[InlineData(5, 0, 2, 0)]
[InlineData(0, 5, 0, 2)]
public void Ctor_WhenCalledWithInvalidVersion_ShouldThrow(int left, int top, int right, int bottom)
{
Assert.Throws<ArgumentException>(() => new BoundBox(left, top, right, bottom));
Expand Down
12 changes: 6 additions & 6 deletions tools/get_pdfium.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-linux-x64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-linux-arm.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-linux-arm64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-win-x64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-win-x86.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F4955/pdfium-mac-x64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-linux-x64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-linux-arm.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-linux-arm64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-win-x64.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-win-x86.tgz
wget https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5010/pdfium-mac-x64.tgz

mkdir linux
mkdir linux-arm
Expand Down

0 comments on commit 6842edb

Please sign in to comment.