Invalid URI exception

Dec 5, 2013 at 2:13 PM
Edited Dec 6, 2013 at 11:09 AM
I've now copied this into the ISSUES section as I've had no reply...

I am calling FonetDriver.Render with an input MemoryStream containing the fo:root XML and expecting to get a rendered PDF in the output Stream. But I'm getting an exception instead:

System.UriFormatException occurred
Message=Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
... I can't see what URI it might be worried about apart from the input XML does have an image embedded like this:
      <fo:external-graphic src="url('file://')"/>
... However that gif is definitely accessible (not actual uri shown btw).

Here's the VB code I am using to call Render():

Dim output As System.IO.MemoryStream = New System.IO.MemoryStream
Dim driver As Fonet.FonetDriver = Fonet.FonetDriver.Make()
driver.CloseOnExit = False
input.Position = 0
driver.Render(input, output)

... this last line gives the exception.

Any help gratefully received.

Thanks, J
Dec 6, 2013 at 11:48 AM
The answer is that the image URI should not contain "file://".
Marked as answer by JamesLC on 12/6/2013 at 4:48 AM