Aah Mehim - you are correct on the current released version
My bad - we have extended these options significantly in v1.0.
However the Parse method is pretty simple. The source parameter is simply a unique identifier and the reference resolver is a delegate used to return relative parsed components referenced within the file. The below should help.
private PDFDocument ParseMyDocument(string rsrcname, System.IO.Stream data)
PDFReferenceResolver resolver = new PDFReferenceResolver(MyResourceReferenceResolver);
return PDFDocument.Parse(rsrcname, data, resolver) as PDFDocument;
private IPDFComponent MyResourceReferenceResolver(string rsrcname, string xpath, Generation.PDFGeneratorSettings settings)
using(System.IO.Stream data = GetMyResource(rsrcname))
PDFReferenceResolver method = settings.Resolver; //actually refers to this method anyway - should be checking for circular references too :-)
//if you wanted to you could also use the xpath parameter to select nodes within the xml data stream before parsing .
return PDFDocument.Parse(rsrcname, data, method, settings);