Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 23

Previous Page 22   Index   Next Page 24

Custom library changes
Page 23 of 750
9. The "Used" flag of non-page resources can be unset at runtime with SetUnUsed(). This will
mark the class as an unused or deleted object. When writing the file, such an object must
be ignored.
10. Never delete an object if you don't know exactly what you are doing. If a destroyed object
is referenced in any other object, the library will crash.
11. If a used page resource is deleted or if the "Used" flag is unset at runtime when it was
already set, the resulting PDF file will be damaged.
12. Make sure that the function FreePDF() can be called at any time without causing memory
leaks or other unwanted side effects.
Requirements to add your own code to DynaPDF
If you want to make your own features permanent, you are welcome to send us your source codes
including a description what kind of feature it enables.
However, we cannot accept any old code; your code must be properly written in C++ and tested
with certain operating systems and compilers. It must not produce warnings of any kind and it
must not use external libraries, except those are already used by DynaPDF (see drv_type.h for a
full list).
Basic C functions such as strcpy, strcat, memcpy and so on, as well as templates from the STL are
NOT allowed to use. Take a look into drv_base_func.h, drv_templ.h, or pdf_utils.h before using
an external function or template. The implementations used by DynaPDF are faster and work on
all operating systems in the same way.
Windows GDI functions are normally not permitted too. However, under certain circumstances
GDI functions are permitted. DynaPDF uses already a few GDI functions to convert WMF files to
EMF or to raster EMF files. Windows specific code must be encapsulated into a #ifdef
_WINDOWS section.
If your code handles strings, it must NOT use an external string class which is available in any
standard C++ library. Use the DynaPDF class CString or CPDFString() instead. These classes
support many PDF specific functions.
Your code should be tested with Microsoft Visual C++ 6.0 AND Visual Studio 2005 or higher. If
possible, you should test your code also with GCC 4.0 or higher under Linux or Mac OS X.

Previous topic: General design requirements

Next topic: Differences between DynaPDF interfaces