1

I am working on a project using images where the user gets to choose if they want to save in .jpg or .pdf format. So what I thought was either way save it in .jpg initially and then if they choose .pdf, just push the image into pdf. I read a lot of documentation like xfinium pdf and syncfusion pdf but sadly all those are licensed for commercial use. I was wondering if anybody could point me at the right direction so as to how to get this done without using paid licensing.

Thanks in advance.

Christian
  • 25,249
  • 40
  • 134
  • 225
  • Did you check [this](https://stackoverflow.com/a/44807531/7462031) – FreakyAli Nov 07 '18 at 09:27
  • syncfusion has free community license. https://www.syncfusion.com/downloads/communitylicense – Access Denied Nov 07 '18 at 10:00
  • There is also LGPL itext port, which now can be ported to .net standard with System.Drawing.Common https://github.com/JamieMellway/iTextSharpLGPL-MonoForAndroid – Access Denied Nov 07 '18 at 10:03
  • You can use the native features in iOS and Android to create PDFs – SushiHangover Nov 07 '18 at 13:34
  • SkiaSharp seems to have PDF support. https://github.com/mono/SkiaSharp/releases/tag/v1.49.4-beta – Access Denied Nov 07 '18 at 13:44
  • This is off-topic, and I'm kinda confused as to why the moderator @christian edited the question instead of closing it. See #4, recommending software libraries https://stackoverflow.com/help/on-topic – Andy Nov 07 '18 at 17:25
  • Thanks a lot @AccessDenied I used Skiasharp to create my images I shall look into skiasharp for pdf and post here if i could complete it. – Nihal Sekhar Nov 08 '18 at 04:17
  • @G.hakim I am not using native method to build this project. I am using Xamarin. Thank you though. – Nihal Sekhar Nov 08 '18 at 04:19
  • @SushiHangover Thanks for helping me out I will look into platform specific approach after trying the Skiasharp approach. – Nihal Sekhar Nov 08 '18 at 04:21
  • @NihalSekhar No problem, while a cross-platform solutions are nice, the native ones tend to be a little faster and of course no app size bloat since you are using the features all ready on the device... happy coding ;-) – SushiHangover Nov 08 '18 at 04:26
  • @SushiHangover, I wouldn't make assumptions which is faster without benchmarks. Skia is a c++ library and is fast. Google chrome uses it as far as I know. Skia sharp is just a wrapper. – Access Denied Nov 08 '18 at 08:47
  • @AccessDenied Been there, done that ;-) ... via the native Android/iOS APIs PDF generation is faster then "SkiaSharp" (maybe not the native C++, but with the C# wrapper it sure is... did not benchmark the C++ code without the wrappers, but yes Skia itself is fast, the C# wrappers/objects and resulting GC kills the performance in many areas of SkiaSharp, then there is the memory bloat and app size issues after that...) – SushiHangover Nov 08 '18 at 08:53
  • @Andy : To me this question reads like a clear description of a problem that the user is having. The help says "Instead, describe the problem and what has been done so far to solve it." This question doesn't ask for a library but for the best way to solve the problem that the user has by reporting what research they have done. The fact that pointing the user to a library might be the best answer doesn't make it offtopic. – Christian Nov 12 '18 at 08:15
  • @Christian And yet the only answer and many of the above comments are just that; suggestions for which library to use and nothing else. The last part about not using a paid license does seem to suggest asking for a library. – Andy Nov 12 '18 at 13:58
  • @Andy : The policy is not worded in a way that prevents certain answers that are helpful (which this answer likely is) but to force people to specify the problem that they are having. I also see neither highly opiniated answer nor spam answers or comments that the policy is intended to hinder. – Christian Nov 12 '18 at 14:06
  • @Christian The policy is very clear "Some questions are still off-topic, *even if they fit into one of the categories listed above*: Questions asking us to *recommend or find […] software library [..]* are off-topic for Stack Overflow" I don't see any leeway there. – Andy Nov 12 '18 at 22:52
  • @Andy The question doesn't do that directly. It rather talks about the problem and that's the recommended way by the policy to address the issue. – Christian Nov 13 '18 at 09:55

1 Answers1

1

Try to use: PdfSharpCore is a partial port of PdfSharp.Xamarin for .NET Standard.

Yauheni Pakala
  • 868
  • 9
  • 16