Article Preview
Buy Now
FEATURE
Things you can do with DynaPDF
The MBS DynaPDF Plugin is more powerful than you think
Issue: 19.6 (November/December 2021)
Author: Stefanie Juchmes
Author Bio: Stefanie studied computer science at the university in Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at Monkeybread Software.
Article Description: No description available.
Article Length (in bytes): 18,559
Starting Page Number: 12
Article Number: 19602
Resource File(s):
project19602.zip Updated: 2021-10-31 22:33:43
Related Link(s): None
Excerpt of article text...
Are you curious about what's possible with the MBS DynaPDF plugin for Xojo? Here's a selection of just some of the possibilities. If you don't wish to read the entire article, just look through the following topics to find the features that interest you.
Create a New PDF
If we want to work with DynaPDF we first need to decide how to handle errors. We can make a class that has the class
DynaPDFMBS
as superclass. Here we can, for example, define different outputs for theerror
event. To make it easier you can copy theMyDynaPDFMBS
class from an example project and adjust it to your needs.Alternatively, you can just use DynaPDF and the plugin raises an exception of class
DynaPDFErrorExceptionMBS
, so you don't miss an exception.In the methods or events in which you want to work with DynaPDF, you have to create an instance of this class for a new PDF environment. With the method
CreateNewPDF
we create a new PDF document. We add a new empty page with the methodAppend
. While this page is open, we can draw some content on it. This may involve setting color with theSetFillColor
orSetStrokeColor
methods and calling drawing methods likeMoveTo
andLineTo
to draw a line. WithRectangle
,DrawArc
,Bezier_1_2_3
, and our other drawing methods, you may build complex vector graphics.To write text you can use
WriteText
for simple text. Or you use a method likeWriteStyledTextEx
to fill in some styled text from Xojo directly into a rectangle on the page.
...End of Excerpt. Please purchase the magazine to read the full article.