帮助C / C ++阅读.DOC& PDF文件 [英] help in C/C++ to read .DOC & PDF files

查看:93
本文介绍了帮助C / C ++阅读.DOC& PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i我正在写一个C程序,可以读取TEXT,PDF,.DOC文件

程序是:

算上单词数量,

行,

文件中的短语数,并在EXCEL中输出

这个程序对TXT(文本)文件工作得很好

但是

i需要一些帮助::如何运行这个程序来阅读PDF &安培; .DOC

文件

i无法将源代码粘贴为太大

所以请给我一个示例C程序,它可以读取DOC文件或者

a PDF文件和

// *

在EXCEL中打印相同的文本作为输出* //


这样我就可以在我的程序中实现它

任何建议都会有很大的帮助

提前帮助

>

hi
i am writing a C program which can read TEXT , PDF,.DOC files
the program is to :
count the number of words,
lines,
characters and the frequency of each word and the phrases count in the
file and gives the output in EXCEL
THIS program is working very fine for TXT ( text ) files
but
i need some help :: how to RUN this program to read PDF & .DOC
files
i cant paste the source code as its too big
so please give me a sample C program which can read a DOC file or
a PDF file and
//*
print the same text in EXCEL as the output*//

so that i can implement it in my program
any suggestions would be of great help
thanx in advance for the help

推荐答案

steve写道:
hi
我正在编写一个可以读取TEXT,PDF,.DOC文件的C程序
程序是:
计算单词的数量,
行,
字符和每个单词的频率以及
文件中的短语计数,并给出EXCEL输出
这个程序对TXT(文本)文件工作得很好
但是我需要一些帮助::如何运行这个程序来阅读PDF和& .DOC
文件
为什么所有的喊叫?

i不能将源代码粘贴得太大
所以请给我一个示例C程序,它可以读取DOC文件或
PDF文件和
hi
i am writing a C program which can read TEXT , PDF,.DOC files
the program is to :
count the number of words,
lines,
characters and the frequency of each word and the phrases count in the
file and gives the output in EXCEL
THIS program is working very fine for TXT ( text ) files
but
i need some help :: how to RUN this program to read PDF & .DOC
files Why all the shouting?
i cant paste the source code as its too big
so please give me a sample C program which can read a DOC file or
a PDF file and




简单?你会很幸运的。


看看xpdf或openoffice来源看看为什么。


-

Ian Collins。



Simple? You''ll be lucky.

Have a look at the xpdf or openoffice source to see why.

--
Ian Collins.


" steve"写道:

"steve" writes:

我正在写一个C程序,可以读取TEXT,PDF,.DOC文件
程序是:
计算数字单词,
行,
字符和每个单词的频率以及
文件中的短语计数,并在EXCEL中输出
这个程序对TXT工作得非常好(文件)
但是我需要一些帮助::如何运行这个程序来阅读PDF& .DOC
文件
我不能粘贴源代码太大
所以请给我一个示例C程序,它可以读取DOC文件或
PDF文件和
// *
在EXCEL中打印相同的文本作为输出* //

以便我可以在我的程序中实现它
任何建议都会有很大的帮助
thanx提前帮助
i am writing a C program which can read TEXT , PDF,.DOC files
the program is to :
count the number of words,
lines,
characters and the frequency of each word and the phrases count in the
file and gives the output in EXCEL
THIS program is working very fine for TXT ( text ) files
but
i need some help :: how to RUN this program to read PDF & .DOC
files
i cant paste the source code as its too big
so please give me a sample C program which can read a DOC file or
a PDF file and
//*
print the same text in EXCEL as the output*//

so that i can implement it in my program
any suggestions would be of great help
thanx in advance for the help




最简单,最高级的手动方式是将.doc文件导出为文本文件

,然后对该文件进行操作。我不确定,但似乎你可能能够用.pdf

文件做类似的事情。可能有第三方 - 我不是要排除免费软件或

共享软件 - 转换程序。



This could really eat up the time if you insist it be highly automated. The
easiest, and highly manual, way is to export the .doc file as a text file
and then operate on that file. I don''t know for sure, but it seems
reasonable that you might be able to do something similar with the .pdf
file. There may be third party - I don''t mean to exclude freeware or
shareware - conversion programs.


文章< 4e * ************@individual.net> ;, Ian Collins

< ia ****** @ hotmail.com>写道:
In article <4e*************@individual.net>, Ian Collins
<ia******@hotmail.com> wrote:
steve写道:

我正在编写一个可以读取TEXT,PDF,.DOC文件的C程序
该程序是:
计算单词的数量,
行,
字符和每个单词的频率以及
文件中的短语计数,并在EXCEL中输出<这个程序对于TXT(文本)文件工作得非常好
但是我需要一些帮助::如何运行这个程序来阅读PDF和& .DOC
文件
hi
i am writing a C program which can read TEXT , PDF,.DOC files
the program is to :
count the number of words,
lines,
characters and the frequency of each word and the phrases count in the
file and gives the output in EXCEL
THIS program is working very fine for TXT ( text ) files
but
i need some help :: how to RUN this program to read PDF & .DOC
files


为什么所有的喊叫?


Why all the shouting?

我不能粘贴源代码太大了
所以请给我一个示例C程序,可以读取DOC文件或
PDF文件和
i cant paste the source code as its too big
so please give me a sample C program which can read a DOC file or
a PDF file and



简单?你会很幸运的。

看看xpdf或openoffice来源看看为什么。



Simple? You''ll be lucky.

Have a look at the xpdf or openoffice source to see why.




史蒂夫,


在我看来,pdf的内部格式真的很复杂。即使

你是一个出色的程序员,但仍然有很多关于

的箍,所以我认为这需要很多工作。 pdf'的格式规格

超过1000页。如上所述,xpdf有一个名为pdf2text的命令行

实用程序,它以pdf作为输入并输出

纯文本并且单独工作并且不会不需要所有的GUI东西

围绕它。我建议你掌握pdf2text,它是在xpdf中的

源免费提供并使用它。对于.doc格式

我不知道。



steve,

the internal format of pdf is *really* complex in my opinion. even if
you''re a brilliant programmer there''s still an awful lot of hoops to
just through so i think would require a lot of work. pdf''s format spec
is over 1000 pages long. xpdf, as mentioned above, has a command line
utility in it called pdf2text, which takes a pdf as input and outputs
plain text and works on its own and doesn''t require all the GUI stuff
round it. i suggest you get hold of pdf2text which is in xpdf whose
source is available for free and make use of that. for the .doc format
i don''t know.


这篇关于帮助C / C ++阅读.DOC&amp; PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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