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.

Delphi

Avatar of undefined
Last Comment
rincewind666

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
BdLm

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
BdLm

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

BdLm

more info  Source  --> http://delphi.about.com/cs/howto/ht/htpdf.htm   > 
 
BdLm

to get the text from a pdf I found that solution,
http://www.swissdelphicenter.ch/de/showcode.php?id=2169
 
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
rincewind666

Many thanks for your help.