无法从pdf复制确切的印地文内容 [英] Unable to copy exact hindi content from pdf

查看:63
本文介绍了无法从pdf复制确切的印地文内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法从pdf文件复制印地文内容. 当我尝试复制/粘贴该内容时,它会更改为不同的印地文字符.

I am not able to copy hindi content from pdf file. When I am trying to copy/paste that content it changes to different hindi characters.

示例-

原始图片-

粘贴后-

它像这样显示.

任何人都可以帮助我获得确切的印地文字符.

Anybody can help me to get the exact hindi characters.

推荐答案

此问题类似于此答案中讨论的问题,而此处的示例文档的外观也提醒我们此处的文档:

This issue is similar to the one discussed in this answer, and the appearance of the sample document there does also remind of the document here:

您的文档本身提供的信息例如标题中的字形单词"表示文本单词".您应该向文档的来源询问字体信息不会引起误解的文档版本.如果那不可能,那么您应该去OCR.

Your document itself provides the information that e.g. the glyphs "निर्वाचक" in the head line represent the text "ननरररचक". You should ask the source of your document for a document version in which the font informations are not misleading. If that is not possible, you should go for OCR.

首页的第一行是通过页面内容流中的以下操作生成的:

The top line of the first page is generated by the following operations in the page content stream:

/9 239 Tf
( !"#$%&) Tj 

第一行选择大小为 239 的名为 9 的字体(页面开头的操作会按比例缩小所有内容).第二行使字形被打印.这些字形是使用该字体的自定义编码在括号之间引用的.

The first line selects the font named 9 at a size of 239 (an operation at the beginning of the page scales everything down). The second line causes glyphs to be printed. These glyphs are referenced inbetween the brackets using the custom encoding of that font.

PDF主页上的字体 9 包含一个 ToUnicode 映射.这张地图尤其是地图

The font 9 on the first page of your PDF contains a ToUnicode map. This map especially maps

<20> <20> <0928>
<21> <21> <0928>
<22> <22> <0930>
<23> <23> <0930>
<24> <24> <0930> 

即代码0x20('')和0x21('!')都映射到Unicode代码点0x0928('न')以及代码0x22(''),0x23('#')和0x24('$' )全部移到Unicode代码点0x0930('र').

i.e. the codes 0x20 (' ') and 0x21 ('!') both map to the Unicode code point 0x0928 ('न') and the codes 0x22 ('"'), 0x23 ('#'), and 0x24 ('$') all to the Unicode code point 0x0930 ('र').

因此,完全正确(根据文档中的信息)显示的( !"#$%&)的内容完全正确显示(根据文档中的信息)

Thus, the contents of ( !"#$%&), displayed as "निर्वाचक", completely correctly (according to the information in the document) are extracted / copy&pasted as "ननरररचक".

这篇关于无法从pdf复制确切的印地文内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆