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

Could not find the referenced CMap #299

Closed
christopher5106 opened this issue Feb 22, 2021 · 1 comment
Closed

Could not find the referenced CMap #299

christopher5106 opened this issue Feb 22, 2021 · 1 comment

Comments

@christopher5106
Copy link

christopher5106 commented Feb 22, 2021

On this document: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2994119/pdf/kjped-53-661.pdf

I get the following error:

System.InvalidOperationException: Could not find the referenced CMap: Adobe-Korea1-3
   at UglyToad.PdfPig.PdfFonts.Parser.CMapParser.ParseExternal(String name) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/CMapParser.cs:line 132
   at UglyToad.PdfPig.PdfFonts.Cmap.CMapCache.Get(String name) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs:line 24
   at UglyToad.PdfPig.PdfFonts.Parser.Handlers.Type0FontHandler.GetUcs2CMap(DictionaryToken dictionary, Boolean isCMapPredefined, ICidFont cidFont) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs:line 213
   at UglyToad.PdfPig.PdfFonts.Parser.Handlers.Type0FontHandler.Generate(DictionaryToken dictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs:line 60
   at UglyToad.PdfPig.PdfFonts.FontFactory.Get(DictionaryToken dictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/FontFactory.cs:line 44
   at UglyToad.PdfPig.Content.ResourceStore.LoadFontDictionary(DictionaryToken fontDictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/ResourceStore.cs:line 155
   at UglyToad.PdfPig.Content.ResourceStore.LoadResourceDictionary(DictionaryToken resourceDictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/ResourceStore.cs:line 46
   at UglyToad.PdfPig.Parser.PageFactory.Create(Int32 number, DictionaryToken dictionary, PageTreeMembers pageTreeMembers, Boolean clipPaths) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Parser/PageFactory.cs:line 66
   at UglyToad.PdfPig.Content.Pages.GetPage(Int32 pageNumber, Boolean clipPaths) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/Pages.cs:line 66
   at UglyToad.PdfPig.PdfDocument.GetPage(Int32 pageNumber) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfDocument.cs:line 160
   at UglyToad.PdfPig.PdfDocument.GetPages()+MoveNext() in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfDocument.cs:line 180
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at PdfToJsonExporter.Application.GetPages(PdfDocument pdfDocument, FileInfo fileInfo) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfPig/Application.cs:line 168
2021-02-22 18:32:10.2542 GetPage failed :- Page : 2, FileName : "21189935.pdf" System.InvalidOperationException: Could not find the referenced CMap: Adobe-Korea1-3
   at UglyToad.PdfPig.PdfFonts.Parser.CMapParser.ParseExternal(String name) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/CMapParser.cs:line 132
   at UglyToad.PdfPig.PdfFonts.Cmap.CMapCache.Get(String name) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapCache.cs:line 24
   at UglyToad.PdfPig.PdfFonts.Parser.Handlers.Type0FontHandler.GetUcs2CMap(DictionaryToken dictionary, Boolean isCMapPredefined, ICidFont cidFont) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs:line 213
   at UglyToad.PdfPig.PdfFonts.Parser.Handlers.Type0FontHandler.Generate(DictionaryToken dictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/Type0FontHandler.cs:line 60
   at UglyToad.PdfPig.PdfFonts.FontFactory.Get(DictionaryToken dictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfFonts/FontFactory.cs:line 44
   at UglyToad.PdfPig.Content.ResourceStore.LoadFontDictionary(DictionaryToken fontDictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/ResourceStore.cs:line 155
   at UglyToad.PdfPig.Content.ResourceStore.LoadResourceDictionary(DictionaryToken resourceDictionary) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/ResourceStore.cs:line 46
   at UglyToad.PdfPig.Parser.PageFactory.Create(Int32 number, DictionaryToken dictionary, PageTreeMembers pageTreeMembers, Boolean clipPaths) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Parser/PageFactory.cs:line 66
   at UglyToad.PdfPig.Content.Pages.GetPage(Int32 pageNumber, Boolean clipPaths) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/Content/Pages.cs:line 66
   at UglyToad.PdfPig.PdfDocument.GetPage(Int32 pageNumber) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfToJsonExporter/Libraries/PdfPig/src/UglyToad.PdfPig/PdfDocument.cs:line 160
   at PdfToJsonExporter.Application.GetPages(PdfDocument pdfDocument, FileInfo fileInfo) in /mnt/c/Users/cbo/apps/document_structure_comprehension_dataset/PdfPig/Application.cs:line 178
@EliotJones
Copy link
Member

Closing this since I think it was fixed, let me know if you encounter any issues.

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

No branches or pull requests

2 participants