Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export TextLayerRenderTask type #15016

Closed
jerry1100 opened this issue Jun 9, 2022 · 1 comment · Fixed by #15018
Closed

Export TextLayerRenderTask type #15016

jerry1100 opened this issue Jun 9, 2022 · 1 comment · Fixed by #15018
Labels

Comments

@jerry1100
Copy link
Contributor

jerry1100 commented Jun 9, 2022

Attach (recommended) or Link to PDF file here: not relevant

Configuration:

  • Web browser and its version: not relevant
  • Operating system and its version: not relevant
  • PDF.js version: 2.14.305
  • Is a browser extension: no

Steps to reproduce the problem:

  1. In a webpack project, try to import TextLayerRenderTask from pdfjs-dist

What is the expected behavior? (add screenshot)
TextLayerRenderTask be exported

What went wrong? (add screenshot)
image

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): n/a

We need TextLayerRenderTask to be exported for our TypeScript project. Currently, we're just polyfilling the type but it'd be great if this could be officially exported.
image

@jerry1100
Copy link
Contributor Author

jerry1100 commented Jun 9, 2022

I tried to submit a PR, but couldn't figure out how to actually export the type. Here's what I tried:

  1. Export TextLayerRenderTask from text_layer.js

image

  1. Run gulp types to build the types

However, pdf.d.ts still doesn't have TextLayerRenderTask.

I'm happy to submit a PR if someone could help me figure out how to export the type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants