Expand my Community achievements bar.

Native PDF: Structured access to bookmap bookmeta/authorinformation/organizationinfo metadata for JavaScript manipulation

Avatar

Level 2

One of our customer requirements is to construct a ‘Contact Information’ block of addresses on the back page.

They don’t want to hardcode this in a table in a topic. We'll have a template with an empty, single row, table and we'd dynamically expand the table based on the required number of address blocks.

They want to store each address block in a bookmeta/authorinformation/organizationinfo block and then to format this content and inject it into a cell per address.

The number of address organizationinfo blocks will vary by publication, and the information in an organizationinfo block will vary.

Because of this variability, using the provided method to create variables from this metadata does not seem to be ideal or efficient. Since the variables are text-only, if we create a variable from the organizationinfo element as a whole we lose all the internal structure.

We were hoping for an HTML structure that retained the internal structure and provided us with something we can manipulate in JavaScript.

Is there another method for including this bookmeta in a more structured format in the HTML that we can manipulate into the back page topic contact information table?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Employee

@Mike-E  you are right that sub-elements are not added to the intermediate HTML as, when picking the metadata by xpath the Native PDF engine currently picks only the inner text.

We have raised a request (GUIDES-20063) to allow sending the prolog information xml with sub-elements - so that any custom rendering can be implemented there on.

Avatar

Administrator

@Mike-E Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni