PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Environment: Unity, platform: Android, Vhich version to use? http://forum.pdfsharp.com/viewtopic.php?f=2&t=3863 |
Page 1 of 1 |
Author: | fashrista [ Tue Oct 23, 2018 1:03 pm ] |
Post subject: | Environment: Unity, platform: Android, Vhich version to use? |
HAve been trying to utilize Migradoc and pdfSharp in my unity android app to create .pdf reports. I have imported : PDFsharp-MigraDoc.1.50.4845-RC2a into my project but the call: Code: MigraDoc.Rendering.PdfDocumentRenderer docrend = new MigraDoc.Rendering.PdfDocumentRenderer(true); docrend.Document = doc; docrend.RenderDocument();//this line throws a: Object reference not set to an instance of an object at PdfSharp.Pdf.PdfPage.Initialize () on android throws an exception, aldo it works great on windowsplatform. Am I doing something wrong? Have I imported the wrong package? What should I do to make this work? Android studio logcat reports: NullReferenceException: Object reference not set to an instance of an object at PdfSharp.Pdf.PdfPage.Initialize () [0x00000] in <filename unknown>:0 at PdfSharp.Pdf.PdfPage..ctor () [0x00000] in <filename unknown>:0 at PdfSharp.Pdf.PdfPages.Add () [0x00000] in <filename unknown>:0 at PdfSharp.Pdf.PdfDocument.AddPage () [0x00000] in <filename unknown>:0 at PdfSharp.Drawing.XGraphics.CreateMeasureContext (XSize size, XGraphicsUnit pageUnit, XPageDirection pageDirection) [0x00000] in <filename unknown>:0 at MigraDoc.Rendering.DocumentRenderer.PrepareDocument () [0x00000] in <filename unknown>:0 at MigraDoc.Rendering.PdfDocumentRenderer.PrepareDocumentRenderer (Boolean prepareCompletely) [0x00000] in <filename unknown>:0 at MigraDoc.Rendering.PdfDocumentRenderer.PrepareRenderPages () [0x00000] in <filename unknown>:0 at MigraDoc.Rendering.PdfDocumentRenderer.RenderDocument () [0x00000] in <filename unknown>:0 |
Author: | Thomas Hoevel [ Tue Oct 23, 2018 1:39 pm ] |
Post subject: | Re: Environment: Unity, platform: Android, Vhich version to |
Hi! The official empira packages are for Windows and Silverlight only. We do not have special packages for Mono or Android. But AIUI the regular packages can be used with Mono. I have no experience with Android. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |