Improvements for MBS Xojo DynaPDF Plugin
In the current version 20.3 we added support for ClearRectangle and FillPath methods, one of the changes for API 2.0 in Xojo. We set Helvetica 12 in point as default font for every new PDF document. If you change the font, this font reference will be discarded on saving as DynaPDF cleans up the object tree when writing the PDF. But new users may not run into an error, because no font is set.
Earlier in 20.2 we added support for ignoring ClearRect calls in graphics class to be able to draw over an existing PDF page and not fill all the space with white color. With our own DynapdfGraphicsPathMBS class we got even support for drawing paths with the new Xojo methods to do so. In DynaPDFPageMBS class we got properties visible in the debugger, so you can directly inspect the boxes for the page. The SetCellPicture method for DynaPDFTableMBS class takes directly a picture to make this easier for developers to pass pictures. In DynaPDFMBS class we deprecated all the Ansi versions of the functions. Unicode support got better over the years and nobody should need those any more. And when you call SetFont without passing an encoding, we default to unicode.
Changes like the above may help to make use of the plugin more easier. For next version 20.4 we have a few more little changes to improve the plugin. First we have the problem that not everyone implements an Error event to catch problems. We add DynaPDFErrorExceptionMBS class to raise an exception if either the Error event is missing or you return the new constant kErrorEventRaise in the Error event. The error event can be implemented by subclassing DynaPDFMBS class or by using addHandler command. By using exceptions, you will not miss an error. But you may still want to use the Error event to ignore warnings, which could raise an exception otherwise.
Another change we thought about is to add more properties. A first one to add is ActiveFontInfo as DynaPDFFontInfoMBS to the properties. This allows you to see the current font set in the debugger. Let us know if you have ideas for properties we could add to make your live easier.
A DynaPDF Starter license is included in OmegaBundle and can be updated to DynaPDF Lite license at a discounted price.