4

hello friends i am developing the DMS application in which user can scan the document or images through scanner and upload on server.

For scanning purpose i am refered this link it works perfectly..:)

Now problem is ImageScanner.ScanFilesToFolderAsync(ImageScannerScanSource, StorageFolder) this Method accepts the image format which is supported by scanner. my scanner only support the .BMP format but i want to store an image in PDF or JPEG Format in given folder name.

Else please suggest any free pdf package( dll). which accept multiple image format and convert to single pdf format and PDFSharp package support in uwp ?

thanks in advance :)

  ScannerSettings _ScannerSettings = new ScannerSettings();  

  ImageScanner scanner = await ImageScanner.FromIdAsync(_settings.DeviceId);

  scanner = _ScannerSettings.SetScannerSettings(scanner, _settings); // here i am trying to assigning the scanner settings with pdf or jpeg format.

 var operation =  scanner.ScanFilesToFolderAsync(AssignScannerType, folder); // it gives exception if i am passing the pdf or JPEG format in scanner settings because my scanner not support this format.

1 Answers1

1

https://github.com/ststeiger/PdfSharpCore is a port for .NET Core 1.6+ It doesn't use System.Drawing.dll. It is based on PdfSharp 1.32 and has some missing and some half-working features.

https://github.com/ststeiger/PdfSharpNetStandard Is for NetStandard 2.1+, and is based on PdfSharp 1.5.

Very few things are missing (https://github.com/ststeiger/PdfSharpNetStandard/tree/master/PdfSharp_Removed https://github.com/ststeiger/PdfSharpNetStandard/tree/master/MigraDoc_Rendering_Removed). PdfSharpNetStandard should work work just like PdfSharp.

PdfSharpCore has changed PdfSharp to be based on the .NET-Core High-Performance implementations. It should have a better/higher performance - in theory.

Amir Hajiha
  • 836
  • 8
  • 20
  • thank you for your valuable reply. i have installed the PDFSHARPCORE. but problem is i got **Access Denied Exception** on this line XImage img = XImage.FromFile(path); –  May 09 '19 at 05:06
  • problem solved :) i am start storing scaned images to ApplicationData.Current.LocalFolder.CreateFolderAsync() folder and access denied problem solved. :) and all images converted successfully to single pdf Thnaks you :) for pdf code refered this [link](https://www.codeproject.com/Tips/1023435/Converting-Multiple-Image-Files-to-PDF) link :) –  May 09 '19 at 12:46
  • Please mark it as answer if it helped you :-) thanks – Amir Hajiha May 09 '19 at 13:47
  • 1.when i am install the PdfSharpCore in my uwp project in debug mode it works perfectly. **But** when i am trying to create a package in Release mode package will not be created through errors. 2. when i am installed the PdfSharpNetStandard from nuget package it Gives error like system.Drawing is not supported for this platform. :( Which Dll support in uwp ?? –  May 14 '19 at 06:59
  • Any idea how to store an image in pdf or jpeg format in uwp windows application. :( –  May 27 '19 at 07:26