Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ on:
required: true
default: false
type: boolean
ForceContinueOnError:
description: 'Force continue-on-error (temporary not used)'
required: false
default: true
type: boolean
UploadServerLogs:
description: 'Upload server logs (temporary not used)'
required: false
default: false
type: boolean
EnableProcessDump:
description: 'Enable .NET process dump (temporary not used)'
required: false
default: '0'
type: choice
options:
- "0"
- "1"

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/generateclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
DOTNET_CreateDumpDiagnostics: 1
DOTNET_CreateDumpVerboseDiagnostics: 1
DOTNET_EnableCrashReport: 1
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ENCODED_2_5_21 }}
JNet_Version: 2.5.13
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ENCODED_2_6_1 }}
JNet_Version: 2.6.1
PDFBox_Version: 3.0.5
FONTCACHE_FOLDER: ${{ github.workspace }}\fontcache

Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
shell: cmd
run: |
cd JNet\binReflector\net8.0
MASES.JNetReflector.exe -TraceLevel 1 -TraceTo %GITHUB_WORKSPACE%\JNetReflector.txt -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json
MASES.JNetReflector.exe -TraceLevel 1 -TraceTo %GITHUB_WORKSPACE%\JNetReflector.txt -CopyrightFile %GITHUB_WORKSPACE%\src\copyright.txt -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json

- name: Disable CET for dotnet process
if: ${{ inputs.UseLatestJNetReflectorSource == false }}
Expand All @@ -176,7 +176,7 @@ jobs:
- name: Build classes with latest published version of JNetReflector
if: ${{ inputs.UseLatestJNetReflectorSource == false }}
shell: cmd
run: jnetreflector -TraceLevel 1 -TraceTo %GITHUB_WORKSPACE%\JNetReflector.txt -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json
run: jnetreflector -TraceLevel 1 -TraceTo %GITHUB_WORKSPACE%\JNetReflector.txt -CopyrightFile %GITHUB_WORKSPACE%\src\copyright.txt -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json

- name: Upload artifacts
if: steps.cache.outputs.cache-hit != 'true'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ jobs:
- name: Recompile to create nuget packages
run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src\net\NetPDF.sln

- run: Compress-Archive -Path .\bin\*nupkg -DestinationPath .\NetPDFNuGet.zip

- name: Upload GitHub release
run: |
gh release upload --repo ${{ github.repository }} ${GITHUB_REF_NAME} .\NetPDFNuGet.zip
env:
GH_TOKEN: ${{ github.token }}

- name: Authenticate to GitHub
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ launchSettings.json
/**/binCLI/
/**/MASES.NetPDFPS/
/**/binPSCore/
/**/binReflector/
/**/CommonTools/
/**/obj/
/**/jars/
_site
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 MASES s.r.l.
Copyright 2024-2025 MASES s.r.l.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This project adheres to the Contributor [Covenant code of conduct](CODE_OF_CONDU
* [Usage](src/documentation/articles/usage.md)
* [Performance tips](https://jnet.masesgroup.com/articles/performancetips.html)
* [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html)
* [JVM callbacks](https://jnet.masesgroup.com/articles/jvm_callbacks.html)
* [JVM callbacks](https://jnet.masesgroup.com/articles/jvm_callbacks.html)
* [NetPDF CLI usage](src/documentation/articles/usageCLI.md)
* [NetPDF Docker usage](src/documentation/articles/docker.md)
* [NetPDF PowerShell usage](src/documentation/articles/usagePS.md)
Expand All @@ -67,21 +67,28 @@ This project adheres to the Contributor [Covenant code of conduct](CODE_OF_CONDU

NetPDF uses [JNet](https://github.com/masesgroup/JNet), and indeed [JCOBridge](https://www.jcobridge.com/) with its [features](https://www.jcobridge.com/features/), to obtain many benefits:
* **Cyber-security**:
* [JVM](https://en.wikipedia.org/wiki/Java_virtual_machine) and [CLR, or CoreCLR,](https://en.wikipedia.org/wiki/Common_Language_Runtime) runs in the same process, but are insulated from each other;
* JCOBridge does not make any code injection into JVM;
* [JVM](https://en.wikipedia.org/wiki/Java_virtual_machine) and [CLR, or CoreCLR,](https://en.wikipedia.org/wiki/Common_Language_Runtime) runs in the same process, but are insulated from each other;
* JCOBridge does not make any code injection into JVM;
* JCOBridge does not use any other communication mechanism than JNI;
* .NET (CLR) inherently inherits the cyber-security levels of running JVM;
* **Direct access the JVM from any .NET application**:
* .NET (CLR) inherently inherits the cyber-security levels of running JVM;
* **Direct access the JVM from any .NET application**:
* Any Java/Scala/Kotlin/... class can be directly managed;
* No need to learn new APIs: we try to expose the same APIs in C# style;
* No extra validation cycle on protocol and functionality: bug fix, improvements, new features are immediately available;
* Documentation is shared;
* **Dynamic code**: it helps to write a Java/Scala/Kotlin/etc seamless language code directly inside a standard .NET application written in C#/VB.NET: look at this [simple example](https://www.jcobridge.com/net-examples/dotnet-examples/) and [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html).

[JCOBridge 2.6.*](https://www.jcobridge.com) can be used for free without any obligations; you need to purchase a commercial license, or uninstall the software, if you have direct or indirect incomes from the product usage.

### JCOBridge resources

Have a look at the following JCOBridge resources:
- [Release notes](https://www.jcobridge.com/release-notes/)
- [Community Edition](https://www.jcobridge.com/pricing-25/)
- [Commercial Edition](https://www.jcobridge.com/pricing-25/)
- Latest release: [![JCOBridge nuget](https://img.shields.io/nuget/v/MASES.JCOBridge)](https://www.nuget.org/packages/MASES.JCOBridge)

|JCOBridge | 2.5.* series | 2.6.* series |
|:---: |:---: |:---: |
|NetPDF | > 3.0.* series | > 3.0.6 series |
|Release notes|[Link](https://www.jcobridge.com/release-notes/)| [Link](https://www.jcobridge.com/release-notes/)|
|Community Edition|[Conditions](https://www.jcobridge.com/pricing-25/)|[Conditions](https://www.jcobridge.com/pricing-25/)|
|Commercial Edition|[Information](https://www.jcobridge.com/pricing-26/)|[Information](https://www.jcobridge.com/pricing-26/)|

Latest release: [![JCOBridge nuget](https://img.shields.io/nuget/v/MASES.JCOBridge)](https://www.nuget.org/packages/MASES.JCOBridge)
17 changes: 17 additions & 0 deletions src/copyright.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2024-2025 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/
2 changes: 2 additions & 0 deletions src/documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
/**/bin/
/**/obj/
_site
/**/open_source/
/**/products/
4 changes: 2 additions & 2 deletions src/documentation/articles/commandlineswitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Plus it accepts from:
* **JCOBridge**:
* All command-line switches of JCOBridge available at https://www.jcobridge.com/net-examples/command-line-options/

## JVM identification
## JVM identification

One of the most important command-line switch is **JVMPath** and it is available in [JCOBridge switches](https://www.jcobridge.com/net-examples/command-line-options/): it can be used to set-up the location of the JVM library if JCOBridge is not able to identify a suitable JRE installation.
One of the most important command-line switch is **JVMPath** and it is available in [JCOBridge switches](https://www.jcobridge.com/net-examples/command-line-options/): it can be used to set-up the location of the JVM library if JCOBridge is not able to identify a suitable JRE installation.
If a developer is using NetPDF within its own product it is possible to override the **JVMPath** property with a snippet like the following one:

```c#
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/articles/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Usage .NET suite for PDFBox™
_description: Describes how to use NetPDF, set-up environment, identify the JVM and write good code
_description: Describes how to use NetPDF, set-up environment, identify the JVM and write good code
---

# NetPDF usage
Expand Down
6 changes: 3 additions & 3 deletions src/documentation/articles/usageCLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _description: Describes the CLI tool to use PDFBox™ classes from any command-l
* The image hosts both .NET 6 and JRE 11 runtimes

> [!IMPORTANT]
> The **dotnet tool** needs a JRE/JDK installed within the system (see [JVM identification](#jvm-identification))
> The **dotnet tool** needs a JRE/JDK installed within the system (see [JVM identification](#jvm-identification))

## Usage

Expand Down Expand Up @@ -53,6 +53,6 @@ _netpdf_ accepts the following command-line switch:

Plus other switches available at [Command line switch](commandlineswitch.md) page.

### JVM identification
### JVM identification

One of the most important command-line switch is **JVMPath** and it is available in [JCOBridge switches](https://www.jcobridge.com/net-examples/command-line-options/): it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation.
One of the most important command-line switch is **JVMPath** and it is available in [JCOBridge switches](https://www.jcobridge.com/net-examples/command-line-options/): it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation.
4 changes: 2 additions & 2 deletions src/documentation/articles/usagePS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ _netpdfps_ accepts the following cmdlets:
* OutputFile
* CompressParameter (optional)

### JVM identification
### JVM identification

One of the most important command-line switch is **JVMPath**: it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation.
One of the most important command-line switch is **JVMPath**: it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation.

25 changes: 16 additions & 9 deletions src/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This project adheres to the Contributor [Covenant code of conduct](https://githu
* [Usage](src/documentation/articles/usage.md)
* [Performance tips](https://jnet.masesgroup.com/articles/performancetips.html)
* [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html)
* [JVM callbacks](https://jnet.masesgroup.com/articles/jvm_callbacks.html)
* [JVM callbacks](https://jnet.masesgroup.com/articles/jvm_callbacks.html)
* [NetPDF CLI usage](src/documentation/articles/usageCLI.md)
* [NetPDF Docker usage](src/documentation/articles/docker.md)
* [NetPDF PowerShell usage](src/documentation/articles/usagePS.md)
Expand All @@ -72,21 +72,28 @@ This project adheres to the Contributor [Covenant code of conduct](https://githu

NetPDF uses [JNet](https://github.com/masesgroup/JNet), and indeed [JCOBridge](https://www.jcobridge.com/) with its [features](https://www.jcobridge.com/features/), to obtain many benefits:
* **Cyber-security**:
* [JVM](https://en.wikipedia.org/wiki/Java_virtual_machine) and [CLR, or CoreCLR,](https://en.wikipedia.org/wiki/Common_Language_Runtime) runs in the same process, but are insulated from each other;
* JCOBridge does not make any code injection into JVM;
* [JVM](https://en.wikipedia.org/wiki/Java_virtual_machine) and [CLR, or CoreCLR,](https://en.wikipedia.org/wiki/Common_Language_Runtime) runs in the same process, but are insulated from each other;
* JCOBridge does not make any code injection into JVM;
* JCOBridge does not use any other communication mechanism than JNI;
* .NET (CLR) inherently inherits the cyber-security levels of running JVM;
* **Direct access the JVM from any .NET application**:
* .NET (CLR) inherently inherits the cyber-security levels of running JVM;
* **Direct access the JVM from any .NET application**:
* Any Java/Scala/Kotlin/... class can be directly managed;
* No need to learn new APIs: we try to expose the same APIs in C# style;
* No extra validation cycle on protocol and functionality: bug fix, improvements, new features are immediately available;
* Documentation is shared;
* **Dynamic code**: it helps to write a Java/Scala/Kotlin/etc seamless language code directly inside a standard .NET application written in C#/VB.NET: look at this [simple example](https://www.jcobridge.com/net-examples/dotnet-examples/) and [APIs extensibility](https://jnet.masesgroup.com/articles/API_extensibility.html).

[JCOBridge 2.6.*](https://www.jcobridge.com) can be used for free without any obligations; you need to purchase a commercial license, or uninstall the software, if you have direct or indirect incomes from the product usage.

### JCOBridge resources

Have a look at the following JCOBridge resources:
- [Release notes](https://www.jcobridge.com/release-notes/)
- [Community Edition](https://www.jcobridge.com/pricing-25/)
- [Commercial Edition](https://www.jcobridge.com/pricing-25/)
- Latest release: [![JCOBridge nuget](https://img.shields.io/nuget/v/MASES.JCOBridge)](https://www.nuget.org/packages/MASES.JCOBridge)

|JCOBridge | 2.5.* series | 2.6.* series |
|:---: |:---: |:---: |
|NetPDF | > 3.0.* series | > 3.0.6 series |
|Release notes|[Link](https://www.jcobridge.com/release-notes/)| [Link](https://www.jcobridge.com/release-notes/)|
|Community Edition|[Conditions](https://www.jcobridge.com/pricing-25/)|[Conditions](https://www.jcobridge.com/pricing-25/)|
|Commercial Edition|[Information](https://www.jcobridge.com/pricing-26/)|[Information](https://www.jcobridge.com/pricing-26/)|

Latest release: [![JCOBridge nuget](https://img.shields.io/nuget/v/MASES.JCOBridge)](https://www.nuget.org/packages/MASES.JCOBridge)
14 changes: 8 additions & 6 deletions src/jvm/netpdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
<maven.compiler.target>11</maven.compiler.target>
<classpathfile>${basedir}/classpathfile.classpath</classpathfile>
<mavenSkipMain>false</mavenSkipMain> <!-- set mavenSkipMain to true to avoid source compilation: use directive in command-line -->
<jnetVersion>2.5.13.0</jnetVersion>
<jnetVersion>2.6.1.0</jnetVersion>
<pdfBoxVersion>3.0.5</pdfBoxVersion>
<netpdfversion>3.0.5.0</netpdfversion>
<jcobridgepath>../../../bin/net8.0/JCOBridge.jar</jcobridgepath>
<jnetpath>../../../bin/net8.0/jars/jnet-${jnetVersion}.jar</jnetpath>
<rootDir>${basedir}/../../../</rootDir>
<jcobridgepath>${rootDir}/bin/net8.0/JCOBridge.jar</jcobridgepath>
<jnetpath>${rootDir}/bin/net8.0/jars/jnet-${jnetVersion}.jar</jnetpath>
<jarsDestination>${rootDir}/jars/</jarsDestination>
</properties>
<distributionManagement>
<snapshotRepository>
Expand Down Expand Up @@ -83,7 +85,7 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/../../../jars/</outputDirectory>
<outputDirectory>${jarsDestination}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
Expand All @@ -104,7 +106,7 @@
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<outputDirectory>${basedir}/../../../jars/</outputDirectory>
<outputDirectory>${jarsDestination}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
Expand Down Expand Up @@ -137,7 +139,7 @@
<configuration>
<compilerArgs>
<arg>-cp</arg>
<arg>${originalClassPath}${path.separator}${basedir}/${jcobridgepath}${path.separator}${basedir}/${jnetpath}</arg>
<arg>${originalClassPath}${path.separator}${jcobridgepath}${path.separator}${jnetpath}</arg>
</compilerArgs>
<source>11</source>
<target>11</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 MASES s.r.l.
* Copyright (c) 2024-2025 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@
*/

/*
* This file is generated by MASES.JNetReflector (ver. 2.5.13.0)
* This file is generated by MASES.JNetReflector (ver. 2.6.1.0)
*/

package org.mases.netpdf.generated.org.apache.pdfbox.pdmodel.common.function.type4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 MASES s.r.l.
* Copyright 2024-2025 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading
Loading