cajuncoding / PdfTemplating.XslFO

This is a C# .NET solution that tests and illustrates the capabilities of Xsl-FO for dynamically generating PDF documents. It provides a way to generate the XSL-FO source xml from Xslt or Razor Templating to address various development teams. And it provides basic WinForms Application that can be used to aid in developing the Xslt and Xsl-FO markup.
https://github.com/cajuncoding/PdfTemplating.XslFO
Apache License 2.0
30 stars 5 forks source link

NullReferenceException when pageReference is null #13

Closed jw56 closed 2 years ago

jw56 commented 2 years ago

Hi, I've just started to use the library but I am getting a NullReferenceException which appears to be because the pageReference is null and then added to the PdfArray in PdfGoTo Write method.

I think this is because it is set to null in IDNode CreateInternalLinkGoTo.

When it is set to null in this way, is the code expecting the pageReference to be set some other way after the instantiation of the PdfGoTo object?

It sounds like I may have a link to a document element that cannot be found? Any ideas how I can diagnose this?

Thanks,

John

cajuncoding commented 2 years ago

You mention PdfGoto method & PdfArray classes…these aren’t part of my library…are you looking in the FONet library code?

That is mainly here for posterity and I don’t support it…

Though with that said, the FONet library does work and I have used it quite a bit in the past.

So, you will have to provide some additional details on what you are doing, what does your Xsl-FO look like, which rendering engine are you using? Provide sample code and XSL-FO markup, etc.

jw56 commented 2 years ago

Ah, ok. I'll try and see if it is a known issue in the FONet library then. Thanks