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