Hello again,
The code that produce this error is the following:
Code:
Using graf = Drawing.XGraphics.FromPdfPage(page)
Dim pen As Drawing.XPen = _penConfig
For Each stick In sequence
graf.DrawLine(pen, positionX, positionY, positionX, positionY + PipeHeight)
positionX += PipeWidth + PipeSpace
Next
End Using
We use a XGraphics object to draw bars, when commenting this part they are no error in the Saving of the Pdf.
When I keep this part, the exception is thrown and when comparing the 2 objects (one already existing in the dictionary and the one causing the exception. "iref" is from the loop iteration of "irefs", "o" is the PdfReference already existing in the directionary) we can see borth have the same ObjectID but different uid. ref attached image.
How is this possible as we dispose the XGraphics reference ?
Thanks for helping