Bygdrift.PdfToDrawio
0.1.1
I had to change the namespacing so please use Bygdrift.Tools.PdfToDrawio instead.
dotnet add package Bygdrift.PdfToDrawio --version 0.1.1
NuGet\Install-Package Bygdrift.PdfToDrawio -Version 0.1.1
<PackageReference Include="Bygdrift.PdfToDrawio" Version="0.1.1" />
paket add Bygdrift.PdfToDrawio --version 0.1.1
#r "nuget: Bygdrift.PdfToDrawio, 0.1.1"
// Install Bygdrift.PdfToDrawio as a Cake Addin
#addin nuget:?package=Bygdrift.PdfToDrawio&version=0.1.1
// Install Bygdrift.PdfToDrawio as a Cake Tool
#tool nuget:?package=Bygdrift.PdfToDrawio&version=0.1.1
PdfToDrawio
With this project, you can convert a pdf or svg-file to a drawio-file. Drawio-files can be read with Diagrams.net, which is an excellent, free diagramming and vector graphics application, that can be used online, as a desktop-program and as a plugin to visual studio code.
This project uses a great project called pdftosvg to convert pdf to svg and then merges the svg into drawio in a layer called Background and locks the layer. It also creates a new layer so the file is ready to draw upon. Here is an example on a drawio file.
The reason for this project, was the need of making an extension to an FM system (facility management), that can be integrated on a homepage, so users can download drawing files of buildings, to a free drawing program, and easily make there own:
- Evacuation map like this
- "You are here" map like this
- Description of correction to be done like this
- interior design plan
How to use it
var drawIo = new Bygdrift.PdfToDrawio.Convert("SomeContent.pdf"); //or svg
drawIo.ToDrawIo("someContent.drawio");
var stream = drawIo.ToDrawIo();
var drawIo = new Bygdrift.PdfToDrawio.Convert("SomeContent.pdf"); //or svg
drawIo.ToMxGraphModel("someContent.xml");
var stream = drawIo.ToMxGraphModel();
The imported pdf can consist of multiple pages.
This project can be tested by downloading it and run the unit test PdfToDrawioTests.ConvertTests.ConvertPdf()
.
Inspiration on how to use the project
Personally, I will build a function app to Azure, as an http-trigger, that consist of a simple front end html, that can be integrated on an organisations intranet, so people can search and find a pdf from a FM-system. Then they can choose, either to download the pdf or a drawio-file.
Whats next
It should be possible to add headers and footers to each page, and I will be working on a better help to users that doesn't know drawio. So if they are making an evacuation map, they can read in a "Howto get started"-shape on the fist page and some help to find a shape library for evacuation maps from their own organization.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- PdfToSvg.NET (>= 0.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|