I am encountering an issue with the Turkish language in the output file while utilizing pdf2md library. This problem seems to manifest inconsistently across various documents, appearing in some instances but not in others.
The message when i converting example-normal.pdf file :
Warning: fetchStandardFontData: failed to fetch file "FoxitSans.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSans.pfb". Writing to example-normal.md... Done.
The message when i converting the example-withe-error.pdf file :
Warning: fetchStandardFontData: failed to fetch file "FoxitSerifBold.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSerifBold.pfb". Warning: fetchStandardFontData: failed to fetch file "FoxitSerifBoldItalic.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSerifBoldItalic.pfb". Warning: fetchStandardFontData: failed to fetch file "FoxitSerif.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSerif.pfb". Warning: fetchStandardFontData: failed to fetch file "FoxitSansBoldItalic.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSansBoldItalic.pfb". Warning: fetchStandardFontData: failed to fetch file "FoxitSerifItalic.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSerifItalic.pfb". Warning: fetchStandardFontData: failed to fetch file "FoxitSans.pfb" with "UnknownErrorException: Unable to load font data at: C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSans.pfb". Writing to example-withe-error.md... Done.
you can refer to the files illustrating the normal scenario:
Furthermore, you can view the files showcasing the error scenario:
The font path missing a "\", the path should be some
C:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fonts\FoxitSans.pfbinstead ofC:\Users\lorens\Desktop\pdf-md2\node_modules\pdfjs-dist\standard_fontsFoxitSans.pfb.Check whether you can config some options to change the font path.