mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
[api-minor] Remove the normalizeWhitespace
option in the PDFPageProxy.{getTextContent, streamTextContent}
methods (issue 14519, PR 14428 follow-up)
With these changes, we'll now *always* replace all whitespaces with standard spaces (0x20). This behaviour is already, since many years, the default in both the viewer and the browser-tests.
This commit is contained in:
parent
48c8831a79
commit
403baa7bba
8 changed files with 8 additions and 16 deletions
|
@ -438,7 +438,6 @@ class Page {
|
|||
extractTextContent({
|
||||
handler,
|
||||
task,
|
||||
normalizeWhitespace,
|
||||
includeMarkedContent,
|
||||
sink,
|
||||
combineTextItems,
|
||||
|
@ -469,7 +468,6 @@ class Page {
|
|||
stream: contentStream,
|
||||
task,
|
||||
resources: this.resources,
|
||||
normalizeWhitespace,
|
||||
includeMarkedContent,
|
||||
combineTextItems,
|
||||
sink,
|
||||
|
|
|
@ -2163,7 +2163,6 @@ class PartialEvaluator {
|
|||
task,
|
||||
resources,
|
||||
stateManager = null,
|
||||
normalizeWhitespace = false,
|
||||
combineTextItems = false,
|
||||
includeMarkedContent = false,
|
||||
sink,
|
||||
|
@ -2642,7 +2641,7 @@ class PartialEvaluator {
|
|||
textChunk.prevTransform = getCurrentTextTransform();
|
||||
}
|
||||
|
||||
if (glyph.isWhitespace && normalizeWhitespace) {
|
||||
if (glyph.isWhitespace) {
|
||||
// Replaces all whitespaces with standard spaces (0x20), to avoid
|
||||
// alignment issues between the textLayer and the canvas if the text
|
||||
// contains e.g. tabs (fixes issue6612.pdf).
|
||||
|
@ -3023,7 +3022,6 @@ class PartialEvaluator {
|
|||
task,
|
||||
resources: xobj.dict.get("Resources") || resources,
|
||||
stateManager: xObjStateManager,
|
||||
normalizeWhitespace,
|
||||
combineTextItems,
|
||||
includeMarkedContent,
|
||||
sink: sinkWrapper,
|
||||
|
|
|
@ -740,7 +740,6 @@ class WorkerMessageHandler {
|
|||
handler,
|
||||
task,
|
||||
sink,
|
||||
normalizeWhitespace: data.normalizeWhitespace,
|
||||
includeMarkedContent: data.includeMarkedContent,
|
||||
combineTextItems: data.combineTextItems,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue