locked
PDFSharp.netstandard - XFont Operation is not supported on this platform. RRS feed

  • Question

  • User393906 posted

    Hi all,

    I want to use PDFSharp.netstandard on Android and iOS to create and save a PDF-file (not viewing), but I get a error which I cannot place.

    I have the following example code:

    But now I get the following error when I want to create this PDF:

    Does someone know how to use this on Android and iOS?

    Saturday, June 20, 2020 11:40 PM

Answers

  • User393906 posted

    Init PDFSharp on Android solves the problem:

    PdfSharp.Xamarin.Forms.Droid.Platform.Init();

    iOS can be left alone.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, June 26, 2020 11:00 PM

All replies

  • User377758 posted

    I did a test, but couldn't reproduce the error you posted above.

    Could you please post a basic demo so that we can test ourselves?

    Monday, June 22, 2020 6:14 AM
  • User393906 posted

    Hi @Tracy320 ,

    I think I found my mistake: I put this code in the MainPage (so the Cross Platform part). It seems I have to add it to iOS and Android separately. Is this true? If so, can you share your code on how to do this?

    Monday, June 22, 2020 2:05 PM
  • User393906 posted

    Hi @Tracy320 ,

    Please find a basic demo in the attachment.

    Tuesday, June 23, 2020 11:00 AM
  • User393906 posted

    Init PDFSharp on Android solves the problem:

    PdfSharp.Xamarin.Forms.Droid.Platform.Init();

    iOS can be left alone.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, June 26, 2020 11:00 PM