New issue
Advanced search Search tips

Issue 592763 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue 656648

Blocking:
issue 62400


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Pdf XFA: Render issue, missing text

Project Member Reported by aval...@chromium.org, Mar 7 2016

Issue description

Version: 7c1c27414ff9e29a88fec8f717b4c157363bfae6

What steps will reproduce the problem?
(1) View the form at http://www.cic.gc.ca/english/pdf/kits/forms/IMM5257E.pdf or attached
(2) Look at the page count in the top right of the rendered page


What is the expected output? What do you see instead?
I expect to see "PAGE 1 OF 5" in the top right corner.
I see "PAGE 1 OF" instead.

See attached screenshots.


Please use labels and text to provide additional information.

 
IMM5257E.pdf
424 KB Download
pdf-with-count.png
135 KB View Download
missing-count.png
70.7 KB View Download
The correct-looking screenshot was taken with some version of Adobe Reader 11 for Mac.
Cc: thestig@chromium.org dsinclair@chromium.org tsepez@chromium.org
Blockedon: 656648
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
I believe this is fixed, but the blocking bug causes a crash when rendering the file. Reverting V8 to prior to the crash shows the page numbers appearing.

I'm leaving this open until we can verify on ToT but it looks fixed.
Blocking: 62400
Owner: rharrison@chromium.org
Just checked, it's still there, showing "PAGE 1 OF".
The piece of XML in question is:

<value>
   <exData contentType="text/html" maxLength="0">
      <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
         <p style="letter-spacing:0in">
            PAGE
            <span style="xfa-spacerun:yes">Â </span>
            <span xfa:embedType="uri" xfa:embedMode="raw" xfa:embed="#floatingField000041" />
            OF
            <span style="xfa-spacerun:yes">Â </span>
            <span xfa:embedType="uri" xfa:embedMode="raw" xfa:embed="#floatingField018467" />
         </p>
      </body>
   </exData>
</value>

"floatingField018467" is defined here:

<field h="7.5mm" name="PageCount" presence="hidden" w="55mm" x="136.958mm" y="12.809mm" access="readOnly" id="floatingField018467">
   <ui>
      <numericEdit>
         <border>
            <edge stroke="lowered" />
         </border>
         <margin />
      </numericEdit>
   </ui>
   <font typeface="Myriad Pro" size="7pt" />
   <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm" />
   <para vAlign="middle" />
   <caption reserve="20mm">
      <para vAlign="middle" />
      <value>
         <text>Text Field</text>
      </value>
   </caption>
   <calculate override="error" />
   <event name="event__layout_ready" activity="ready" ref="$layout">
      <script contentType="application/x-javascript">this.rawValue = xfa.layout.pageCount();</script>
   </event>
   <?templateDesigner floatingFieldPlaceholder ##?>
   <bind match="none" />
</field>

CJX_LayoutPseudoModel::pageCount() returns a CJS_Return with HasError()=false, HasReturn()=true and value 5, so that part is working.
Ryan pointed out it's being cropped. Reducing the font size in the PDF shows this to be the case, see screenshot.
Screenshot from 2018-07-19 16-59-46.png
327 KB View Download
Owner: hnakashima@chromium.org
The font is Myriad Pro, and it's not embedded. It's being replaced by Arial, which is a bit wider, causing the text span is cropped by the margin.

I talked to npm@ and one idea is to scale characters in the availale font (Arial) to take the same width as the font substituted out (Myriad Pro). This should fix a lot of the other jank we see in this document, for example the "* Yes" string wrapping to two lines.
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment