现有PDF文件,全部为文字和表格,没有图片。
想读取里面的内容,就像读文本文件用read或者readln一样,把里面的文本读出来
文字主要在表格里,
请有经验的朋友给出思路,不求源码。

解决方案 »

  1.   

    你的pdf控件中不提供这些方法吗
      

  2.   

    http://www.seodb.cn/html/1/1-830.html
      

  3.   

    我没有PDF控件,不知道哪个能实现我的需求,
    我看了一下,大多只能打开、显示、缩放、查找等,像这样的读没见他介绍。
      

  4.   

    2楼,没见到有类似read的方法呀
    TPdf = class(TOleControl)privateFIntf: _DPdf;function GetControlInterface: _DPdf;protectedprocedure CreateControl;procedure InitControlData; override;publicprocedure Print;function LoadFile(const fileName: WideString): WordBool;procedure AboutBox;property ControlInterface: _DPdf read GetControlInterface;property DefaultInterface: _DPdf read GetControlInterface;publishedproperty TabStop;property Align;property DragCursor;property DragMode;property ParentShowHint;property PopupMenu;property ShowHint;property TabOrder;property Visible;property OnDragDrop;property OnDragOver;property OnEndDrag;property OnEnter;property OnExit;property OnStartDrag;property src: WideString index 1 read GetWideStringProp write SetWideStringProp stored False;end;
      

  5.   

    2楼,没见到有类似read的方法呀。
    TPdf = class(TOleControl)privateFIntf: _DPdf;function GetControlInterface: _DPdf;protectedprocedure CreateControl;procedure InitControlData; override;publicprocedure Print;function LoadFile(const fileName: WideString): WordBool;procedure AboutBox;property ControlInterface: _DPdf read GetControlInterface;property DefaultInterface: _DPdf read GetControlInterface;publishedproperty TabStop;property Align;property DragCursor;property DragMode;property ParentShowHint;property PopupMenu;property ShowHint;property TabOrder;property Visible;property OnDragDrop;property OnDragOver;property OnEndDrag;property OnEnter;property OnExit;property OnStartDrag;property src: WideString index 1 read GetWideStringProp write SetWideStringProp stored False;end;
      

  6.   

    procedure TForm1.Button1Click(Sender: TObject);begin       if OpenDialog1.Execute then       pdf1.src := OpenDialog1.FileName;
    end;
      

  7.   

    6楼的只是把PDF文件在PDF控件里显示,并没有读取里面的内容呀
    再顶
      

  8.   

    pdf文件也是用一种脚本语言实现的,并不像文本文件读一行就是所见的一行,它很有可能是不连续的,再通过它自身语言的某种机制将他们连接在一起,你可以用文本文件的方式打开pdf看,绝大部分显示是乱序的,或者你粘贴某一部分数据显示也有可能是乱的,所以直接向读文本那样读取pdf存在一定风险性。