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

CMapCompressionType is not exported in the pdf.js distribution #10148

Closed
cemerick opened this issue Oct 10, 2018 · 2 comments · Fixed by #10167
Closed

CMapCompressionType is not exported in the pdf.js distribution #10148

cemerick opened this issue Oct 10, 2018 · 2 comments · Fixed by #10167
Labels

Comments

@cemerick
Copy link
Contributor

As implemented in #8064 and demonstrated in #8881 (comment), a CMapReaderFactory must resolve a promise with an object containing a compressionType slot, the value of which should be one of the CMapCompressionType enumeration.

Unfortunately, CMapCompressionType is not exported by pdf.js as it is currently built, so implementing CMapReaderFactory requires copy/pasting the enumeration, or maybe hard-coding the value of compressionType (e.g. if all of the cmaps being loaded from disk are known to be compressed).

No PR at this time; I can see at least three reasonable places where CMapCompressionType could be exported, but I'd rather not guess at the maintainers' desired aesthetic. 😄

@timvandermeij
Copy link
Contributor

Good point. I think this should be added to

exports.Util = pdfjsSharedUtil.Util;
since Util is also there and comes from the same file.

@cemerick
Copy link
Contributor Author

Thank you @timvandermeij and @Snuffleupagus 😄

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