Hallo zusammen!
Ich habe ein Tool gefunden, um PDF Dateien bearbeiten zu können.
Die Kostenlose Lite Version ist eine ActiveX komponente.
Sie ist wie unten beschrieben Installiert worden.
Mit einem Entsprechenden Delphi-Code hab ich die benötigen Funktionen auch zum laufen bekommen.
Wenn ich das Prog auf einem anderen Rechner testen möchte, klappt die Logischerweise nicht. Leider kann ich an dem Rechner auch nichts installieren, da mir die Admin Rechte fehlen.
Gibt es eine möglichkeit, dies im mein Programm mit einzubinden?
Eigentlich benötige ich nur die Funktion, einen Text an eine bestimmte stelle in einer PDF Datei einzusetzen.
Oder hat noch jemand ein anders Tool, was das kann?
Hier die Installationsanleitung der
QuickPDF Lite Libary:
Installation
After running the installer the QuickPDFAX0721.dll file will be placed into the ActiveX
folder, inside the main installation folder you chose during installation.
The default installation folder is C:\Program Files\Quick PDF Library\ActiveX\
Registering the ActiveX DLL
Use the regsvr32 command to register Quick PDF Library ActiveX Edition. On XP, click
Start | Run and enter the command:
regsvr32 "C:\Program Files\Quick PDF Library\ActiveX\QuickPDFAX0721.dll"
Replace the path in the above command with the folder you chose during installation.
On Vista you need to open a command prompt with administrator priviledges in order to
run the command.
Class name
The class name of this release of Quick PDF Library ActiveX Edition is:
QuickPDFAX0721.PDFLibrary
Instantiating the class
Use the CreateObject or equivalent function in your development environment to create
the QuickPDFLibrary object.
The first function you should call is the UnlockKey function, passing it your license key.
Here is a Visual Basic example:
Private Sub CommandButton1_Click()
Dim PDFLibrary As QuickPDFAX0721.PDFLibrary
Set PDFLibrary = CreateObject("QuickPDFAX0721.PDFLibrary")
If PDFLibrary.UnlockKey("your license key here") = 1 Then
Call PDFLibrary.DrawText(100, 500, "Hello from Visual Basic")
Call PDFLibrary.SaveToFile("C:\Docs\HelloFromVB.pdf")
End If
Set PDFLibrary = Nothing
End Sub
Hier der Ausschnitt aus dem Delphi-Code, mit dem es auf meinem Rechner klappt:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| procedure TForm1.Button1Click(Sender: TObject); var QP: Variant; begin QP := CreateOleObject('QuickPDFLite0719.PDFLibrary'); qp.LoadFromFile('C:\AlteDatei.pdf'); QP.DrawText(100, 500, 'Hello World!'); QP.SaveToFile('c:\NeueDatei.pdf'); QP := Unassigned; end; |