playground/assets/dflip/js/dflip.js
/**
         * Renders the text layer.
         * @param {number} timeout (optional) if specified, the rendering waits
         *   for specified amount of ms.
         */
Renders the text layer.
@param {number} timeout (optional) if specified, the rendering waits
for specified amount of ms.
Renders the text layer . @param { number } timeout ( optional ) if specified the rendering waits for specified amount of ms .
function TextLayerBuilder_render(timeout) {
            if (!this.divContentDone || this.renderingDone) {
                return;
            }
            if (this.textLayerRenderTask) {
                this.textLayerRenderTask.cancel();
                this.textLayerRenderTask = null;
            }
            this.textDivs = [];
            var textLayerFrag = document.createDocumentFragment();
            this.textLayerRenderTask = PDFJS.renderTextLayer({
                textContent: this.textContent,
                container: textLayerFrag,
                viewport: this.viewport,
                textDivs: this.textDivs,
                timeout: timeout,
                enhanceTextSelection: this.enhanceTextSelection,
            });
            this.textLayerRenderTask.promise.then(function () {
                this.textLayerDiv.appendChild(textLayerFrag);
                this._finishRendering();
                this.updateMatches();
            }.bind(this), function (reason) {
            });
        }
function TextLayerBuilder_render ( timeout ) { if ( ! this . divContentDone || this . renderingDone ) { return ; } if ( this . textLayerRenderTask ) { this . textLayerRenderTask . cancel ( ) ; this . textLayerRenderTask = null ; } this . textDivs = [ ] ; var textLayerFrag = document . createDocumentFragment ( ) ; this . textLayerRenderTask = PDFJS . renderTextLayer ( { textContent : this . textContent , container : textLayerFrag , viewport : this . viewport , textDivs : this . textDivs , timeout : timeout , enhanceTextSelection : this . enhanceTextSelection , } ) ; this . textLayerRenderTask . promise . then ( function ( ) { this . textLayerDiv . appendChild ( textLayerFrag ) ; this . _finishRendering ( ) ; this . updateMatches ( ) ; } . bind ( this ) , function ( reason ) { } ) ; }
Renders the text layer.
Renders the text layer .
// canceled or failed to render text layer -- skipping errors
