Question T6485
Visible to All Users

How to identify if a pdf brick is for description / answer?

created 4 years ago (modified 4 years ago)

Hello

When SurveyPDF is rendering the PDF, each question will be split into several bricks, then render them. and in the end we will get a question rendered on the PDF.

I'd like to know how to identify a description / answer brick programmatically.

lets take the following as an example.

This is a single input question, it contains 4 bricks

Clipboard-File-1.png

on the pdf it look like this

Clipboard-File-2.png

the first bricks is easy, it's always the title brick

for the rest of the bricks, how can I know if it's a brick for description or answer?

PS: I am using ck editor as the property editor for description. so description bricks are always HTMLBrick

Answers approved by surveyjs Support

created 4 years ago

Hello,

At this moment, you can only creator some heuristic. For example in your case:

  1. Skip all bricks with TextBoldBrick type
  2. Mark all HTMLBrick bricks

Something like above should work. Just test it

Thanks, Alex
SurveyJS Team

    Show previous comments (1)

      Hello,

      As I already said in another ticket SurveyPDF Adorners mechanism uses our internal representation, methods, properties and structure. There is no special API to separate bricks to sense groups at this moment. Probably we enhance adorners mechanism API in the future, but now we are mostly working on new SurveyJS Creator v2

      Thanks, Alex
      SurveyJS Team

        No problem.

        Thanks for the clarification.

          You are welcome!