Hello again, please can somebody advise me, how can i create crossplatform solution. 3 projects -> ios, android, core. In core, should be logic for pdf generator. I found at least 5 different libraries, but some working only for ios, some for android, some can work in both, but there is no support for system.drawing assemby etc...I think that this is not so extraordinary think, that developer want from xamarin. This should be basic feature for all platforms.
Posts
Preprocess could be the answer ;-)
http://msdn.microsoft.com/en-us/library/ed8yd1ha(v=vs.71).aspx
Do it on the server, much easier solution. I investigated the same thing and concluded that there was no simple cross platform solution. I am now generating the PDF on the server and sending it down to the devices.
This is nice, but in fact it is not solution;) I can create mobile webapp or create whole logic on server and viewing only results, but then i dont need xamarin for 1k USD... I still trying to find some real usecase but it looks like you have to implement everything for each device separately but in c#...
have you looked at this: http://xfiniumsoft.com/xfinium-pdf-mobile/xfinium-pdf-overview.html ?
Thanks krumelur, Xfinium comes with price tag. can you please suggest any open source libraries.
Try PDFSharp library for ...Create PDF from C#
Is PDFSharp can be use on xamarin android?
I think syncfusion xamarin controls come with a library to create pdfs
http://www.syncfusion.com/products/xamarin
@CodeMonkey please can you elaborate on how you implemented processing PDF at the server and returning to the device? I will like to implement similar setup. What library did you use at the server and what do you send to the server? xml, json?
Thanks
PdfSharp is best option for PDF creation, modification and other operations.. It works well with Xamarin.Forms and have very simple and familiar methods of generating PDF.
Best way is, put this "Library" in your project, and reference it as done in "sample" project.
Git https://github.com/roceh/PdfSharp.Xamarin
NOTE : If you are looking fro RTL languages like Arabic, then I will suggest to use Native APIs to create PDF because PdfSharp doesn't support RTL completely.
To create pdf you should try zetpdf. It is a great handler of pdf files...
i am getting error on new "Xfont" something about directive...but i dont what directive to use...no tutorial
var document = new PdfDocument();
var page = document.AddPage();
var gfx = XGraphics.FromPdfPage(page);
var font = new XFont("Verdana", 20);
gfx.DrawString("Test of PdfSharp on iOS", font, new XSolidBrush(XColor.FromArgb(0, 0, 0)), 10, 130);
document.Save(Path.Combine(Path.GetTempPath(), "test.pdf"));
Hi,
did you find answer to this? i am trying to implement same thing
I know this is an old thread, but for information SkiaSharp is a free library that allow to generate PDF documents.
Please refer to this link for more information
Hello in 2021! Any way to create table in pdf using skiasharp ? I couldn't find it. I want to generate a report in table like structure.
Thank in advance.