Comments (2)
在第一个版本0.0.1
中考虑过这个自动换行
问题:对于PDF中提取出来的空间上的两行,如果当前行理论剩余空间不足以容纳下一行的第一个字符,表明Word中可以自动换行,于是省略这两行之间的换行符(Shift+Enter),也就是你图片中行尾的符号。
然而现实问题是上面计算的理论距离是基于PDF提取的数据,而在Word中渲染后可能是不同的值,导致实际判断换不换行有时正确有时失败。所以,后续版本取消了这个判断,统一用换行符处理。
这样处理达到了“看起来像”的效果,不过语义上确实有割裂,但好在换行符(Shift+Enter)不同于回车(Enter),这两行在Word中仍属于同一个段落。后续如果有文本处理上的需求,可以在提取段落内容后再过滤一遍\n
。
如果有了新的想法,我会继续考虑这个自动换行的问题。
from pdf2docx.
好的,感谢您的耐心回复~
from pdf2docx.
Related Issues (20)
- [WARNING] Ignore Line "<image>" due to overlap HOT 1
- 无法复原pdf文件中表格的框线 HOT 1
- How to save highlight in table after convert pdf to docx HOT 4
- Negative ref_dif in Blocks.py causing paragraph splitting
- 转化后存在页面超出的问题
- ValueError: unsupported colorspace for 'png' HOT 3
- Any support for ANDROID? HOT 1
- 转换时遇到字体名为中文(比如“宋体”)时,发生错误 HOT 3
- language support HOT 2
- pdf2docx.Converter将某些特殊pdf转word时,某个子进程会卡住 HOT 3
- Table is broken when the table is displayed on 2 pages HOT 2
- 关于行高分配的逻辑疑问 HOT 2
- 转换docx表格中文本不全,请问这个可以解决吗 HOT 1
- Resource Han Rounded CN Light rendered as "Resource" HOT 2
- 转word后图片被旋转180° HOT 12
- 表格生成的时候没有处理好浮动形图片 HOT 1
- 含XFA表单域的PDF无法转换为word HOT 1
- 占用内存没有gc
- pdf转word后,表格会溢出边界 HOT 2
- Hyperlinks are not transferred HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf2docx.