Error When Rendering

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
tplambeck
Posts: 17
Joined: Wed May 08, 2019 7:09 pm

Error When Rendering

Post by tplambeck »

I'm adding some images and text to an image. Works fine when I add images but when I add a TextLineFigure and I try and render, I get an error, 'Object is not part of this document.' I can see the TextLineFigure in the FigureViewCollection so not sure where the issue is.

Thanks!
Alex
Site Admin
Posts: 2303
Joined: Thu Jul 10, 2008 2:21 pm

Re: Error When Rendering

Post by Alex »

Hello,
tplambeck wrote: Sat Jul 13, 2019 8:57 pm I'm adding some images and text to an image. Works fine when I add images but when I add a TextLineFigure and I try and render, I get an error, 'Object is not part of this document.' I can see the TextLineFigure in the FigureViewCollection so not sure where the issue is.
A TextLineFigure object has a PdfFont object, which is used for text drawing. Please make sure that the PdfFont object references to a PDF font in your PDF document.

Please send us (to a support@vintasoft.com) a simple working aplication, which allows to reproduce the problem, if you cannot solve the problem by yourself.

Best regards, Alexander
tplambeck
Posts: 17
Joined: Wed May 08, 2019 7:09 pm

Re: Error When Rendering

Post by tplambeck »

Thank you Alexander, that explains the underlying issue. The PDF is image based and has no PdfFonts associated with it so I am creating a new PDFFont object. How do I add the PdfFont to the document? Looks like the Fonts collection is read only.

Thanks again!
Alex
Site Admin
Posts: 2303
Joined: Thu Jul 10, 2008 2:21 pm

Re: Error When Rendering

Post by Alex »

tplambeck wrote: Mon Jul 15, 2019 6:03 pm How do I add the PdfFont to the document? Looks like the Fonts collection is read only.
Please read how to create PDF font here: https://www.vintasoft.com/docs/vsimagin ... ument.html

Best regards, Alexander
Post Reply