I'm having some trouble getting started with the Hello World sample.
I have this code (from HelloWorld):
Code:
#I "../../packages/PDFSharp-MigraDoc/lib/net20/"
#r "PdfSharp.dll"
#r "MigraDoc.Rendering.dll"
#r "MigraDoc.DocumentObjectModel.dll"
open PdfSharp
open PdfSharp.Pdf
open PdfSharp.Drawing
open System.IO
let generate () =
let d = new PdfDocument()
let p = d.AddPage()
let gfx = XGraphics.FromPdfPage p
let font = XFont("Arial", 15., XFontStyle.Regular)
let topLeft = XPoint (0., 0.)
gfx.DrawString("Hello, World!",
font, XBrushes.Black,
XRect(topLeft, XSize(100., 20.)),
XStringFormats.Center)
use fs = File.OpenWrite("./HelloWorld.pdf")
d.Save(fs)
Generation.generate ()
But it just hangs on DrawString with one core pegged at 100%.
Packages in use:
Code:
NUGET
remote: https://www.nuget.org/api/v2
FSharp.Core (4.0.0.1)
PDFsharp-MigraDoc (1.50.4000-beta3b)
Runtime version:
Code:
$ mono --version
Mono JIT compiler version 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45 Wed Jul 27 16:20:13 EDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/a173357)
GC: sgen
Same for nuget PdfSharp (1.32.3057)