Question T6930
Visible to All Users

Potential wrong extra space when render table to HTML via image render

created 4 years ago (modified 4 years ago)

[Ticket cloned from T6800: a few issues with ck editor pdf rendering in 1.8.42 in Angular]

as for the wrong space under tables, I am just not able to reproduce it anywhere.

Do you have some hints on what may go wrong to cause this, so that I can either figure out the cause of the issue or create a sample of the issue?

Thanks

Show previous comments (1)

    OK.

    1. this is the ckeditor in surveyJS I am using
      Clipboard-File-1.png

    as you can see, everything looks alright here. there is no huge padding or margin at the bottom

    1. when I select the table. these are the styles I got
      Clipboard-File-2.png
      it looks alright to me.

    2. I have tried to add many console.logs in survey.pdf.js to check the css for cn and other stuff, but I just don't see anything wrong. Could you suggest me where to add some console.logs to see what may go wrong? (either the built survey.pdf.js or the source code on github are fine, I can build it myself if needed.)

    Thanks

      1 more hint

      this is the pdf structure for ckeditor with a table in its answer (I used edit object selector to select this object in adobe acrobat)

      Clipboard-File-1.png

      at least the margin in the pdf looks alright.

      but it may be the padding or something else is wrong?

        Hello,

        The htmlToImage method converts some string with HTML value to image before draw it in PDF document. You can debug here. For example look at div element created before div.remove(); line. Find that element in markup of your page, unset its top and left styles and check its margins/paddings. Is it OK? Probably we can find issue here

        Thanks, Alex
        SurveyJS Team