Let's tackle one thing at a time. I'll start with your post's title issue.
Check out the TextStyleAdd function. This will take a little work, but basically you'd locate the start and end position of the text between your formatting tags and replace it with styled text.
Here's a custom function that may help (I haven't tested it).
Thanks for the reply.
Looks like a search and replace ... Ok, I can see that the script language is powerful enough to do some of the things I do in other prgramming languages.
1. do custom functions require a particular version of FMP
2. where would the functions reside ie. like a central location where all users have access without being duplicated
3. do I understand correctly :
- for each field we pull from the DB
- check for the occurrence of html tags
- call function ... tempValue = CustomFunc( fieldValue);
- write tempValue and other strings to pdf
1. Yes, custom functions require FMP Advanced to add or modify them. However, once added to a file, they can be used by standard FMP.
2. Custom functions are available to the file. In a multi-file solution, you'd either add the function to each file as needed, or do your processing in the file that has the function.
Note: the custom function was just by way of example. You don't have to implement this with a custom function, it can all be done with calculations and scripts.
3. Yes, using Text and Text Formatting functions, you can create formatted text from tagged text. You can also calculate the paths to your images and display them in container fields or web viewers.
The PDF is more of a WYSIWYG deal, you don't really "write" to the PDF. You may find you need multiple layouts to create your report, and when you use the Save as PDF script step, you can use the Append to existing PDF option.
I appreciate the feedback. The custom function looks like it should do the trick.
Thanks for the assistance.