Share via

Infopath - Print Preview Issue

Anonymous
2012-12-12T17:52:22+00:00

Hi,

Form Type: Browser Based

Browser: IE8

I've encountered an issue in Infopath where the text in a multiline textbox is being cut off at the bottom of the box when I Print to paper or Print to PDF using CutePDF printer.

Here is a step by step of what appears to be happening:

I have a text box with automatic height. The Infopath form can correctly calculate what the height should be. When I click the Print Preview icon within the browser based form, the Print view opens and everything looks correct. However, when i then go File->Print Preview, text is being cut off at the end of some text boxes.

Some text boxes are affected and some are not. This depends on the content of that text box as opposed to the settings of the particular textbox control.

I think what's happening here is that the browser is getting the height of the font that is being used in the text box and then calculating the height of the text box accordingly. However, it looks like it's miscalculating the font size and therefore miscalculating the text box height.

So following a suggestion from another forum, I changed the Print View to the Arial font. IE8 then looked to be calculating the height of the text box correctly and the File->Print Preview looked correct! I thought this had fixed it but unfortunately not completely.... It seems that IE could calculate the height of the Arial font correctly but not the width of the font (Or maybe the letter spacing...). This meant that in some cases the following example would occur:

Let's say you have a text box 600px wide and inside that box you have 2 lines of text. The first line adds up to be 595px wide and then you have a line break and the next line is, let's say, 200px wide. Now, this means that the automatic text box height is 2 lines high. However, if IE calulated the width of the first line to be 601px, then this would push the text to the next line, followed by a line break, followed by the last line = 3 lines.

So in the Print Preview, there would be a textbox 2 lines high trying to accomodate for 3 lines of text and this would result in the last line being cut.

To test it further, I tried the Calibri font. This one appears to calculate the width correctly but it doesn't allocate enough of space for the height! i.e. If I had a lot of text in the field then a couple of lines could be cut from the bottom but you wouldn't notice if the field only contained a few lines of content.

Also it's worth noting that I opened a problematic form in Firefox and it looked fine using the Arial font but produced the same problem when I tried Calibri.

Any advice on this? I think it will need a hotfix to repair it but I'm open to suggestions

Thanks in advance!

Ben

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2015-03-12T23:30:41+00:00

    So the following worked for me:

    • If you haven't already, create a separate (dedicated) view for printing. 'Designate' this view  for print previews.
    • Change all text fields to 'Calculated fields' and keep the height to 'auto'. 
    • I still used Arial, but I think other fonts would work too.

    Good Luck!

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-12-19T02:31:26+00:00

    Thanks for the follow-up. Let's see if we can get a Microsoft employee to jump in here.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-12-13T12:34:16+00:00

    I've tested the Print Preview again using a colleagues machine running Windows 7 and IE9 and the exact same issue has occurred.

    We then tried using Google Chrome on her machine and found a different variation of the problem. Instead of cutting off the text, it was wrapping it mid-word i.e. The end of a sentence could look like:

    "... this line is bro"

    "ken..."

    As opposed to what it should be:

    "... this line is"

    "broken..."

    Regards,

    Ben

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-12-13T10:00:01+00:00

    Hi Greg,

    Thank you for your reply. So far, yes, this issue has been reproduced on other machines. Having said that, they would be a similar build (Windows XP + IE8). I will try from my home computer later today or this evening (Windows 7 + IE9) and report back

    Assuming I can reperoduce it in other environments and in case Microsoft are not monitoring these threads, what is the best way to bring this to their attention?

    Thanks again Greg,

    Ben

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2012-12-13T02:46:52+00:00

    Does this also repro on different computers? Different browsers (I know you tried IE8 and FF, but what about others: IE7, IE9, Chorme, Opera, Safari, etc)?

    If it consistently repros across browsers and across computers, then this might require getting in touch with Microsoft to have them repro it and find out what is going on.

    Microsoft might be watching these threads, and if so, I request that they reply directly to this one.

    Was this answer helpful?

    0 comments No comments