VintaSoft PDF .NET Plug-in Discussions

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

PdfInkAnnotation draw with a Bezier curve



PdfInkAnnotation draw with a Bezier curve

Post by IntegraMike »

Hi, I'm looking to mimic the behavior of Adobe with the ink annotation. Currently when you draw an ink annotation there it draws a line from point to point while your drawing and when you exit edit mode it smooths that line into a curve (which appears to be a bezier curve). I'm looking to do the same, but I am not seeing a way to do it other than completely re-implementing the SetAppearance method since I want to keep the other behavior but update the way the draw is being processed. Is there a good way for me to do this, or is would it be possible to have this added as an option in the future?

Thanks!


Re: PdfInkAnnotation draw with a Bezier curve

Post by Alex »

Hi Mike,

You need to override the appearance generator of PdfInkAnnotation class if you want to solve your task with current version of SDK.

We will add the ability to enable/disable smoothing for contour of PdfInkAnnotation in 1-2 weeks.

Best regards, Alexander


Re: PdfInkAnnotation draw with a Bezier curve

Post by IntegraMike »

That sounds great, thank you!


Re: PdfInkAnnotation draw with a Bezier curve

Post by Alex »

Hi Mike,

In version 9.1.1.1 we have created new methods - PdfInkAnnotationAppearanceGenerator.DrawAppearance and PdfInkAnnotationAppearanceGenerator.CreateAppearancePath, which allow to override the algorithm that renders appearance of PdfInkAnnotation.

Please use methods for overriding the appearance of PdfInkAnnotation class and let me know if you will have any question or problem.

We tried to implement algorithm similar to the smoothing algorithm in Adobe but understood that we need more time for implementation of algorithm.

Best regards, Alexander


Re: PdfInkAnnotation draw with a Bezier curve

Post by Alex »

Hi Mike,

In version 9.1.1.3 we added the ability to use the line smoothing in appearance generator of PdfInkAnnotation class. This functionality is enabled by default.
You can disable the line smoothing in appearance generator of PdfInkAnnotation class using the PdfInkAnnotationAppearanceGenerator.UseSmoothing property:
((PdfInkAnnotationAppearanceGenerator)inkAnnotation.AppearanceGenerator).UseSmoothing = false;
Please use version 9.1.1.3 and let me know if you will have any question or problem.

Best regards, Alexander


Page 1 from 1: 1