PDF generation

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

  • ClemishhClemishh USMember

    Preprocess could be the answer ;-)

    http://msdn.microsoft.com/en-us/library/ed8yd1ha(v=vs.71).aspx

  • CodeMonkeyCodeMonkey GBMember ✭✭✭

    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.

  • tomaskotomasko USMember

    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#...

  • VikramVarmaVikramVarma INMember ✭✭

    Thanks krumelur, Xfinium comes with price tag. can you please suggest any open source libraries.

  • zamokuleezamokulee AEMember

    Try PDFSharp library for ...Create PDF from C#

  • Is PDFSharp can be use on xamarin android?

  • kentucker.8475kentucker.8475 USUniversity, Developer Group Leader ✭✭

    I think syncfusion xamarin controls come with a library to create pdfs

    http://www.syncfusion.com/products/xamarin

  • ValOkaforValOkafor USMember, University ✭✭

    @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

  • AfzalAliAfzalAli USMember ✭✭

    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.

  • NovaGreenNovaGreen Member

    To create pdf you should try zetpdf. It is a great handler of pdf files...

  • hypnocoolhypnocool Member ✭✭

    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"));

  • pearlshwetapearlshweta Member ✭✭

    @ValOkafor said:
    @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

    Hi,
    did you find answer to this? i am trying to implement same thing

Sign In or Register to comment.