- btz: Internet fejlesztés országosan!
- sziku69: Szólánc.
- bitpork: Phautós tali a Balcsinál 2025 Augusztus 2 napján (szombat)
- Gurulunk, WAZE?!
- Argos: Adjátok vissza a netet! - szeretnék elaludni!
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Meggyi001: Anya, tudsz segíteni a matekban?....Nem érek rá kisfiam, majd segít a ChatGPT...
- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: Asszociációs játék. :)
- gban: Ingyen kellene, de tegnapra
Hirdetés
-
LOGOUT
Új hozzászólás Aktív témák
-
amargo
addikt
PDFSharp. Ez egy .NET es library.
GsPDF Ezt is érdemes megnézned.Igaz konzolos:
{$APPTYPE CONSOLE}
uses
Windows,SysUtils,ShellApi,Forms,ComObj,Variants;
var Input,InputNew : string;
FileTest : boolean;
App, AVDoc : Variant;
CoInitFlags : Integer = -1;
VarTest : IDispatch;
test : PVariant;
function RenameFile(const OldName, NewName: string): boolean;
//renames files, taken from
//http://www.dsdt.info/tipps/?id=128&search=RenameFile
var
sh: TSHFileOpStruct;
begin
sh.Wnd := Application.Handle;
sh.wFunc := fo_Rename;
//terminate with null byte to set list ending
sh.pFrom := PChar(OldName + #0);
sh.pTo := PChar(NewName + #0);
sh.fFlags := fof_Silent or fof_MultiDestFiles;
Result:=ShFileOperation(sh)=0;
end; //end function
begin //begin program
Application.Initialize;
//Read given filename
Input:= ParamStr(1);
//InputNew = original filename with ending "-preview" (e.g. test-preview.pdf)
InputNew:= copy(Input,1,Length(Input)-4); //remove ".pdf"
InputNew:= InputNew+'-preview.pdf';
//check if renamed file exists
FileTest:= FileExists(InputNew);
//Create OLE-object for the program Acrobat or Adobe Viewer
App:=CreateOleObject('AcroExch.App');
//test if given file already exists
if FileTest = true then
begin
//close old file
AVDoc:=App.GetActiveDoc; //handle of the active document
VarTest:=AVDoc;
test:= PVariant(VarTest);
if test <> PVariant(0) then //when handle is existing
begin
try
AVDoc.Close(true);
except
Application.Terminate;
end;
end;
//delete old file
DeleteFile(InputNew);
end; //end if FileTest
//rename file
RenameFile(Input,InputNew);
//open renamed file in Acobat or Adobe Viewer
App.Show; //show window
App.Restore(true); //restore window size to make window active
App.Maximize(true); //maximize window
AVDoc:=CreateOleObject('AcroExch.AVDoc'); //create OLE object for file
AVDoc.Open(''+InputNew+'',''); //open file
end. //end program
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Garanciális Gamer Számítógép, PC (GTX 1070 8GB, I7-7700, 16GB RAM, SDD) Beszámítás Posta ok (32)
- iPhone 11 128GB fekete, gyárilag független, újszerű karcmentes állapot, 87% akku, legjobb ár!
- iPhone 12 128GB FEHÉR, gyárilag független, újszerű karcmentes állapot, 94% akku, doboz, legjobb ár!
- iPhone 12 128GB fekete, gyárilag független, karcmentes kijelző szép állapot, 86% akku, legjobb ár!
- Félkonfig Asus z690, i7-12700k, 4x8gb 4400mhz, 1tb Ssd,
- HP EliteBook 830 G8 i5-1135G7 16GB 256GB 1 év garancia
- BESZÁMÍTÁS! ASROCK B550 R5 3600 16GB DDR4 250GB SSD 1TB HDD RX 5700 XT 8GB CM MasterBox MB500 700W
- Lenovo Thunderbolt 3 kábel (4X90U90617)
- DELL Precision 5560 i7-11850H 32GB 1000GB T1200 FHD+ 1 év garancia
- Lenovo LEGION Pro 5 / Pro 7, Lenovo Yoga Pro gépek (RTX 4060 / 4070 / 4080 / 4090)
Állásajánlatok
Cég: FOTC
Város: Budapest