Render pdf items as pre elements to see duplicate whitespaces

This commit is contained in:
Johannes Zillmann 2017-02-11 15:04:00 +01:00
parent f0491af073
commit fc0aafebdd

View File

@ -41,9 +41,6 @@ export default class PdfPageView extends React.Component {
<th> <th>
Height Height
</th> </th>
<th>
Annotation
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -51,10 +48,20 @@ export default class PdfPageView extends React.Component {
color: textItem.annotation.color color: textItem.annotation.color
} : null }> } : null }>
<td> <td>
{ i } <div style={ { textAlign: 'center' } }>
{ i }
</div>
<div style={ { textAlign: 'center' } }>
{ textItem.annotation ? textItem.annotation.category : '' }
</div>
</td> </td>
<td> <td>
{ textItem.text } <pre style={ textItem.annotation ? {
color: textItem.annotation.color,
display: 'inline-block',
} : {
display: 'inline-block'
} }>{ textItem.text }</pre>
</td> </td>
<td> <td>
{ textItem.x } { textItem.x }
@ -68,9 +75,6 @@ export default class PdfPageView extends React.Component {
<td> <td>
{ textItem.height } { textItem.height }
</td> </td>
<td>
{ textItem.annotation ? textItem.annotation.category : '' }
</td>
</tr> </tr>
) } ) }
</tbody> </tbody>