question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example using a textLayer

See original GitHub issue

I have the basic pdf.js API working to render onto the canvas but I can’t get it to work with the textLayer. The only examples I can find are very old and no longer work.

The typescript definition shows that I have to pass:

interface PDFRenderTextLayer {
    beginLayout(): void;
    endLayout(): void;
    appendText(): void;
}

… but the text layer code from the viewer doesn’t actually seem to use this pattern.

There needs to be more complete examples as the ones we have now are very basic.

I appreciate that there’s an amazing viewer app but it requires reverse engineering to actually determine how to do this. I can submit a PR for more examples if someone points me in the right direction.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
TomaIvanovTomovcommented, Aug 9, 2020

These example are not even close to udnerstandable of what we have to do enable search on page…

1reaction
burtonatorcommented, Oct 7, 2019

@zagoa how did you get those imports to work from pdfjs?

I’m using @types/pdfjs-dist for my types… is there a better typescript definition set I should use.?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextLayer Example - deck.gl
Data set from Twitter showing hashtags with geolocation. Data source:Twitter. No. of Tweets67.9K. Dynamic Cluster. Dynamic Cluster: true.
Read more >
Working With Text Layers - Aspose Documentation
Here is another example that demonstrates how a developer can get the text formatting of different text portions from TextLayer using Aspose.PSD for...
Read more >
Control Text Layer With A Different Text Layer - After Effects ...
Control Text Layer With A Different Text Layer - After Effects Tutorial Today I've got a simple expression for you which can be...
Read more >
TextLayer — pydeck 0.8.0b4 documentation - Read the Docs
TextLayer ======== Names of various public transit stops within San Francisco, plotted at the location of that stop """ import pydeck as pdk...
Read more >
Creating and editing text layers in After Effects - Adobe Support
You can read the baseline (x,y) locations for a text layer using ... Todd Kopriva provides an example script on the Adobe website...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found