Simple .NET 7 command line (CLI) tool to search and replace URLs in a PDF document with regular expressions.
Report Bug
·
Request Feature
·
Contribute
·
Sponsor project
This is a simple .NET command line (CLI) tool to search and replace hyperlinks in a PDF document with regular expressions. It is for example used to change all hyperlinks from localhost to the actual domain name in an auto-generated PDF from a Docusaurus static web site. It was developed because there seemed to be no other free tool that can do this. The tool uses the iText7 library for PDF processing which is licensed under AGPL for non-commercial use. Hence, this tool is also published under the AGPL license.
Note: This tool was written by me in my spare time and will be developed only sporadically.
- Latest .NET SDK
winget install -e --id Microsoft.dotnet
-
Download the self-contained single-file executables from the releases section
-
Copy it to a location where you can easily call it and rename it as desired (e.g. to
ReplacePdfHyperlinks
) -
Open a command prompt or PowerShell and type
ReplacePdfHyperlinks --help
- Clone the repo
git clone https://github.com/thgossler/ReplacePdfHyperlinks.git
- Build
dotnet build
- Run without arguments to get help
dotnet run
Alternatively, you can open the folder in VS Code or the solution (.sln file) in the Microsoft Visual Studio IDE and press F5.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star 😉 Thanks!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the AGPL License. See LICENSE
for more information.