All Projects → caj2pdf → Caj2pdf

caj2pdf / Caj2pdf

Licence: other
Convert CAJ (China Academic Journals) files to PDF. 转换中国知网 CAJ 格式文献为 PDF。佛系转换,成功与否,皆是玄学。

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Labels

Projects that are alternatives of or similar to Caj2pdf

Markdown2pdf
A simple library to convert markdown to pdf using Java
Stars: ✭ 41 (-96.14%)
Mutual labels:  pdf
Owasp Masvs
The Mobile Application Security Verification Standard (MASVS) is a standard for mobile app security.
Stars: ✭ 1,030 (-3.1%)
Mutual labels:  pdf
Koreader
An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
Stars: ✭ 9,467 (+790.59%)
Mutual labels:  pdf
Node Prince
Node API for executing PrinceXML via prince(1) CLI
Stars: ✭ 42 (-96.05%)
Mutual labels:  pdf
Html2pdfrenderer
Take any HTML loaded in WKWebView and make PDF out of it.
Stars: ✭ 44 (-95.86%)
Mutual labels:  pdf
Sile
Simon’s Improved Layout Engine
Stars: ✭ 1,032 (-2.92%)
Mutual labels:  pdf
Thinreports
Thinreports is an open source report creation tool for Ruby.
Stars: ✭ 40 (-96.24%)
Mutual labels:  pdf
Stories About Ming Dynasty
明朝那些事儿(全七卷)
Stars: ✭ 52 (-95.11%)
Mutual labels:  pdf
Mybox
Easy tools of document, image, file, network, location, color, and media.
Stars: ✭ 45 (-95.77%)
Mutual labels:  pdf
Pdf Annotate.js
Annotation layer for pdf.js
Stars: ✭ 49 (-95.39%)
Mutual labels:  pdf
Reportbro Lib
PDF and Excel report generation library. Reports can be designed with reportbro-designer, a javascript plugin.
Stars: ✭ 43 (-95.95%)
Mutual labels:  pdf
Elixirbooks
List of Elixir books
Stars: ✭ 1,021 (-3.95%)
Mutual labels:  pdf
Format parser
file metadata parsing, done cheap
Stars: ✭ 46 (-95.67%)
Mutual labels:  pdf
Cv Template
An easy way to create HTML and PDF versions of your resume, and automatically host them on GitHub Pages.
Stars: ✭ 41 (-96.14%)
Mutual labels:  pdf
Pdfgen
HTTP service to generate PDF from Json requests
Stars: ✭ 50 (-95.3%)
Mutual labels:  pdf
Mkdocs With Pdf
Generate a single PDF file from MkDocs repository.
Stars: ✭ 39 (-96.33%)
Mutual labels:  pdf
Pdfsave
Convert websites into readable PDFs
Stars: ✭ 46 (-95.67%)
Mutual labels:  pdf
Docker Texlive
A docker container containing an installation of texlive as well as several useful scripts.
Stars: ✭ 52 (-95.11%)
Mutual labels:  pdf
Thinreports Php
An implementation of the Thinreports Generator in PHP. It provides easy and simple way for generating a PDF on pure PHP.
Stars: ✭ 51 (-95.2%)
Mutual labels:  pdf
Mobius
Scripts to extract data from the COVID-19 Google Community Mobility Reports
Stars: ✭ 47 (-95.58%)
Mutual labels:  pdf

caj2pdf

Why

中国知网的某些文献(多为学位论文)仅提供其专有的 CAJ 格式下载,仅能使用知网提供的软件(如 CAJViewer 等)打开,给文献的阅读和管理带来了不便(尤其是在非 Windows 系统上)。

若要将 CAJ 文件转换为 PDF 文件,可以使用 CAJViewer 的打印功能。但这样得到的 PDF 文件的内容为图片,无法进行文字的选择,且原文献的大纲列表也会丢失。本项目希望可以解决上述两问题。

How far we've come

知网下载到的后缀为 caj 的文件内部结构其实分为两类:CAJ 格式和 HN 格式(受考察样本所限可能还有更多)。目前本项目支持 CAJ 格式文件的转换,HN 格式的转换未完善,并且需要建立两个新的共享库(除了Microsoft Windows:我们提供Microsoft Windows 32-bit/64-bit DLLs),详情如下:

cc -Wall -fPIC --shared -o libjbigdec.so jbigdec.cc JBigDecode.cc
cc -Wall `pkg-config --cflags poppler` -fPIC -shared -o libjbig2codec.so decode_jbig2data.cc `pkg-config --libs poppler`

抑或和libpoppler 相比,还是取决于您是否更喜欢libjbig2dec一点,可以替换libpoppler:

cc -Wall -fPIC --shared -o libjbigdec.so jbigdec.cc JBigDecode.cc
cc -Wall `pkg-config --cflags jbig2dec` -fPIC -shared -o libjbig2codec.so decode_jbig2data_x.cc `pkg-config --libs jbig2dec`

关于两种格式文件结构的分析进展和本项目的实现细节,请查阅项目 Wiki

How to contribute

受测试样本数量所限,即使转换 CAJ 格式的文件也可能(或者说几乎一定)存在 Bug。如遇到这种情况,欢迎在 Issue 中提出,并提供可重现 Bug 的 caj 文件——可以将样本文件上传到网盘等处,也可直接提供知网链接(作者已滚出校园网,提 issue 请提供可下载的 caj 文件)。

如果你对二进制文件分析、图像/文字压缩算法、逆向工程等领域中的一个或几个有所了解,欢迎帮助完善此项目。你可以从阅读项目 Wiki 开始,看看是否有可以发挥你特长的地方。Pull requests are always welcome.

How to use

环境和依赖

除了Microsoft Windows:我们提供Microsoft Windows 32-bit/64-bit DLLs,HN 格式需要

  • C/C++编译器
  • libpoppler开发包,或libjbig2dec开发包

用法

# 打印文件基本信息(文件类型、页面数、大纲项目数)
caj2pdf show [input_file]

# 转换文件
caj2pdf convert [input_file] -o/--output [output_file]

# 从 CAJ 文件中提取大纲信息并添加至 PDF 文件
## 遇到不支持的文件类型或 Bug 时,可用 CAJViewer 打印 PDF 文件,并用这条命令为其添加大纲
caj2pdf outlines [input_file] -o/--output [pdf_file]

caj2pdf show test.caj
caj2pdf convert test.caj -o output.pdf
caj2pdf outlines test.caj -o printed.pdf

异常输出(IMPORTANT!!!)

尽管这个项目目前有不少同学关注到了,但它仍然只支持部分 caj 文件的转换,必须承认这完全不是一个对普通用户足够友好的成熟项目。具体支持哪些不支持哪些,在前文也已经说了,但似乎很多同学并没有注意到。所以如果你遇到以下两种输出,本项目目前无法帮助到你。与此相关的 issue 不再回复。

  • Unknown file type.:未知文件类型;

License

本项目基于 GLWTPL (Good Luck With That Public License) 许可证开源。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].