Autor Beitrag
diego
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Do 25.09.03 09:19 
hi,
gibts ne möglichkeit eine pdf datei mit delphi zu öffnen ohne das der acrobat reader installiert sein muss???

mfg diego
Licki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Do 25.09.03 09:26 
Von Karlsruher zu Karlsruher, dürfte gehen, jau. ;)

Anstelle von TOleContainer (wie das normal so üblich ist, sie Microsoft Word. :D)wird das OCX-Control vom Acrobat Reader eingesetzt. Damit wird der Inhalt der ausgewählten PDF-Datei im eigenen Formular angezeigt. Das Symbol des Acrobat Readers ist während der Programmlaufzeit in der Taskbar sichtbar - das OCX-Control hat keine Active-Eigenschaft, um dieses Verhalten zu ändern. Du musst also das OCX- Control in Delphi importieren. Die OCX heißt pdf41.ocx.

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
Unit AcrobatContainerFrm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtnrs, ComCtrls, OleCtrls, PdfLib_TLB, ExtCtrls;

type
  TForm1 = class(TForm)
    StatusBar1: TStatusBar;
    Panel1: TPanel;
    OpenDialog1: TOpenDialog;
    Panel2: TPanel;
    Pdf1: TPdf;
    BtnOpenOCX: TButton;
    BtnCloseOCX: TButton;
    procedure BtnOpenOCXClick(Sender: TObject);
    procedure BtnCloseOCXClick(Sender: TObject);
  private
    { Private-Deklarationen}
  public
    { Public-Deklarationen}
  end;  var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.BtnOpenOCXClick(Sender: TObject);
begin
  with OpenDialog1 do
    if Execute then
      Pdf1.src := Filename;
end;

procedure TForm1.BtnCloseOCXClick(Sender: TObject);
begin
  Pdf1.src := '';
end;

end.
diego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Do 25.09.03 09:42 
danke mal, und wie kann als alternative die datei noch durch den acrobat reader öffne lassen???

karlsruhe rockt!
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 25.09.03 09:45 
oder du schreibst eine einge funktion um PDF dateien zu öffnen. Mit TFileStream ist das einfach *G*

_________________
MFG
Michael Springwald, "kann kein englisch...."
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 25.09.03 10:05 
Ja mimi. Mittlerweil dürfte das halbe Forum mitbekommen haben, dass du alles per FileStream löst. :roll:
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 25.09.03 11:27 
und was ist daran schlimm ?
TFileStream ist doch ein moderner zugrieft auf dateien oder etwa nicht ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 25.09.03 11:40 
Und was will ich mit der PDF Datei in dem Filestream? Selber parsen oder was?
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 25.09.03 12:31 
genau. Warum nicht ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Mi 01.10.03 12:24 
also mimi ich weiß nicht wie es dir geht aber:
ich hab besseres zu tun als die gesamte pdf referenz zu zerlegen und anschließen das ganze auch noch programtechnisch umzusetzten (abgesehen davon das das schon mehr als kompliziert ist, es handelt sich dabei ja nicht grad um ne HTML-Datei).
und sobald adobe ne neue funktion integriert siehst du wieder alt aus.

da ist mehr als umständlich!

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Mi 01.10.03 16:00 
Aber das war doch Dein Wunsch! Du wolltest eine pdf-Datei verarbeiten ohne einen Reader zu benutzen. Für alle Vorschläge - mit Ausnahme der Vorschläge von mimi - benötigst Du aber einen externen Reader.

barfuesser
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 01.10.03 16:24 
barfuesser hat folgendes geschrieben:
Aber das war doch Dein Wunsch!barfuesser

diego <> patrick. Oder ist das sein Zweitname?
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Mi 01.10.03 16:38 
patrick hat folgendes geschrieben:
ich hab besseres zu tun als die gesamte pdf referenz zu zerlegen ...

Ich habe nicht so auf die Namen geachtet und aus dem angegebenen Text geschlossen, daß er der Poster wäre. :oops: Sorry für die Verwechslung!

barfuesser
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Do 02.10.03 09:21 
MathiasSimmack hat folgendes geschrieben:
barfuesser hat folgendes geschrieben:
Aber das war doch Dein Wunsch!barfuesser

diego <> patrick. Oder ist das sein Zweitname?

ich hab eine gespaltene persönlichkeit :shock:

@thekenhänder ähh barfuesser :tongue:
alles vergessen und verziehen

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
traudl
Hält's aus hier
Beiträge: 10

Win 2000, Win XP
Delphi 7 Enterprise
BeitragVerfasst: Di 12.10.04 14:12 
Hallo,

habe das Beispiel von Licki probiert habe aber das Problem, daß es nur mit installiertem Reader läuft. Ich weis nicht wie ich das Modul mit eincompilieren kann.

Kann mir jemand helfen ?? :?:
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 12.10.04 14:37 
Das Modul wird so oder so den installieren Adobe Acrobate Reader benötigen.
traudl
Hält's aus hier
Beiträge: 10

Win 2000, Win XP
Delphi 7 Enterprise
BeitragVerfasst: Di 12.10.04 15:58 
Also ohne den Reader geht es nicht. Hab ich wohl missverstanden. Aber bin ich auf diese Art " Versionsfrei? ". Würde mir sehr viel Mühe sparen

Gruß Udo


:roll:
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 12.10.04 16:04 
Ich benutze das OCX auch. Und hier im Haus ist es offensichtlich egal, welche Version vom Reader am Arbeitsplatz installiert ist. Getestet von Version 5.0 bis 6.0.
SchelmVomElm
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 154

W2K Pro
D5 Pro
BeitragVerfasst: Di 12.10.04 16:06 
Wo ist denn die Datei PdfLib_TLB her??
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 12.10.04 16:07 
PdfLib.dll oder PdfLib.ocx (weiß ich grad nicht...) importiert. Die _TLB Datei wird automatisch erstellt.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 12.10.04 16:08 
Wird meines Wissens beim Einbinden des OCX in Delphi automatisch erzeugt. Bitte korrigiert mich, wenn das falsch ist.