Link to home
Start Free TrialLog in
Avatar of rincewind666
rincewind666

asked on

Changing a ".pdf" file to a ".txt" file (500 points)

I need to change a ".pdf" file into a ".txt" file.

I am using Delph 6. I am awarding the maximum 500 points for this.  Many  thanks for your help.

ASKER CERTIFIED SOLUTION
Avatar of BdLm
BdLm
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
for pfd you also may use ole to access the pdf data, see http://www.delphi3000.com/articles/article_1642.asp?SK=
 
the instruction is similliar as using worl via ole, you need to load the pdf and access the data in the scr widestring
 

TPdf = class(TOleControl) 
  private 
    FIntf: _DPdf; 
    function  GetControlInterface: _DPdf; 
  protected 
    procedure CreateControl; 
    procedure InitControlData; override; 
  public 
    function  LoadFile(const fileName: WideString): WordBool; 
    procedure setShowToolbar(On_: WordBool); 
    procedure gotoFirstPage; 
    procedure gotoLastPage; 
    procedure gotoNextPage; 
    procedure gotoPreviousPage; 
    procedure setCurrentPage(n: Integer); 
    procedure goForwardStack; 
    procedure goBackwardStack; 
    procedure setPageMode(const pageMode: WideString); 
    procedure setLayoutMode(const layoutMode: WideString); 
    procedure setNamedDest(const namedDest: WideString); 
    procedure Print; 
    procedure printWithDialog; 
    procedure setZoom(percent: Single); 
    procedure setZoomScroll(percent: Single; left: Single; top:   
               Single); 
    procedure setView(const viewMode: WideString); 
    procedure setViewScroll(const viewMode: WideString; offset: 
               Single); 
    procedure setViewRect(left: Single; top: Single; width: Single; 
               height: Single); 
    procedure printPages(from: Integer; to_: Integer); 
    procedure printPagesFit(from: Integer; to_: Integer; shrinkToFit: 
               WordBool); 
    procedure printAll; 
    procedure printAllFit(shrinkToFit: WordBool); 
    procedure setShowScrollbars(On_: WordBool); 
    procedure AboutBox; 
    property  ControlInterface: _DPdf read GetControlInterface; 
    property  DefaultInterface: _DPdf read GetControlInterface; 
  published 
    property  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; 
TPdf = class(TOleControl) 
  private 
    FIntf: _DPdf; 
    function  GetControlInterface: _DPdf; 
  protected 
    procedure CreateControl; 
    procedure InitControlData; override; 
  public 
    function  LoadFile(const fileName: WideString): WordBool; 
    procedure setShowToolbar(On_: WordBool); 
    procedure gotoFirstPage; 
    procedure gotoLastPage; 
    procedure gotoNextPage; 
    procedure gotoPreviousPage; 
    procedure setCurrentPage(n: Integer); 
    procedure goForwardStack; 
    procedure goBackwardStack; 
    procedure setPageMode(const pageMode: WideString); 
    procedure setLayoutMode(const layoutMode: WideString); 
    procedure setNamedDest(const namedDest: WideString); 
    procedure Print; 
    procedure printWithDialog; 
    procedure setZoom(percent: Single); 
    procedure setZoomScroll(percent: Single; left: Single; top:   
               Single); 
    procedure setView(const viewMode: WideString); 
    procedure setViewScroll(const viewMode: WideString; offset: 
               Single); 
    procedure setViewRect(left: Single; top: Single; width: Single; 
               height: Single); 
    procedure printPages(from: Integer; to_: Integer); 
    procedure printPagesFit(from: Integer; to_: Integer; shrinkToFit: 
               WordBool); 
    procedure printAll; 
    procedure printAllFit(shrinkToFit: WordBool); 
    procedure setShowScrollbars(On_: WordBool); 
    procedure AboutBox; 
    property  ControlInterface: _DPdf read GetControlInterface; 
    property  DefaultInterface: _DPdf read GetControlInterface; 
  published 
    property  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; 

Open in new window

more info  Source  --> http://delphi.about.com/cs/howto/ht/htpdf.htm   > 
 
to get the text from a pdf I found that solution,
http://www.swissdelphicenter.ch/de/showcode.php?id=2169
 
Avatar of rincewind666
rincewind666

ASKER

Many thanks for your help.