Question T5161
Visible to All Users

How to change font size in pdf for specific questions

created 4 years ago

Hi,

I'm struggling to adjust the font size only for specific questions (e.g. given by question name).
I understand that I have to hook into the onRenderQuestion event. But when I change the fontsize there, it takes effect only for the rest of the document after the rendered question. Unfortunately, the documentation of the API is rather sparse at this point.

So:

  • What do I have to do change the font size for a question with name 'foo'
  • And set it back to its original value for everything but 'foo'

Thanks!

Answers approved by surveyjs Support

created 4 years ago

Hello,

Here is ticket with similar task. Plunker provided too. I'll add this task to SurveyPDF adorners mechanism example on our site and write back to this thread immediately

Thanks, Alex
SurveyJS Team

    Show previous comments (3)

      Hello,

      We can't reproduce the issue. The size of text inside input field is also increased (both in display and interactive modes). Here is live sample plunker
      Clipboard-File-1.png

      At the same time if you can want to increase only the size of input field without changing size of title then you can investigate ticket and plunker which I posted above. Exactly same problem with dropdowns is solved there

      Thanks, Alex
      SurveyJS Team

      DS DS
      Daniel Stephan 4 years ago

        OK, thanks. I confirm that your plunker works as expected. So it looks like something else at our side is causing this problem. I'll investigate. Once again: Thanks for your fast and very good support!

          Fine! Feel free to contact us in case of any further questions