Substrings can be extracted from Embedded Block values.
^^ is used to get a string at the beginning of the text
$$ is used to get a string at the end of the text
Follow ^^ or $$ by the number of characters.
Use the following syntax to get a substring from the value of an Embedded Block:
{BlockName^^1} Get the first character of the value of the Block named ‘BlockName’
{BlockName^^3} Get the first three characters of the value of the Block named ‘BlockName’
{BlockName$$1} Get the last character of the value of the Block named ‘BlockName’
Note:
- If :: syntax is used then it should come first, as in {BlockName::1^^1}
- All PDFLib coding will be stripped; care should be taken especially when changing font name or size inside the block value. An intermediate block might be required to change the coding.
A third separator is also allowed after ^^ or $$. The separator here is dash (-).
{BlockName^^2-3} Get three characters from the beginning starting from the second character
{BlockName$$5-3} Get three characters starting from the fifth character from the end
Changing shape is also allowed by adding another dash followed by caps (or c) or small (or s)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article