Hirdetés
- Gurulunk, WAZE?!
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- gban: Ingyen kellene, de tegnapra
- Mr Dini: Mindent a StreamSharkról!
- bkercso: Tápszűrő-5 SMPS-hez
- Sapphi: StremHU | Source – Self-hostolható Stremio addon magyar trackerekhez
- Luck Dragon: MárkaLánc
- sziku69: Szólánc.
- Hieronymus: Az igaz barátság kezdete
-
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!
- HP ProBook 450 G5 I5-8250U 8 GB 256 GB NVMe 15,6" FullHD IPS laptop
- MSI Pulse 15 B13VFK i7 / RTX 4060 140W / QHD 165Hz 16GB DDR5 1 TB SSD
- DELL OptiPlex 3050 SFF / i5-7500 - i7-7700 / NVME M.2 / DDR4 / DVD-RW / USB 3.1 / HDMI / több db
- Lenovo ThinkPad T14 Gen 2 Ryzen 7 / 32GB RAM / 512 SSD Garancia
- Apple iPhone SE 2022 64GB, Kártyafüggetlen, 1 Év Garanciával
- iPhone 13 128GB Red-1 ÉV GARANCIA - Kártyafüggetlen, MS4593, 100% Akkumulátor
- iPhone 16 pro 128GB Sivatagi Titán - 27% ÁFA (0395)
- 27% - NZXT Kraken 240 vízhűtés!
- HP üzleti laptopok Elitebook, Probook 4-11. gen gar.
- BESZÁMÍTÁS! Lenovo LOQ 15AHP10 FHD GAMER notebook - Ryzen7 250 16GB DDR5 1TB SSD RTX 5060 8GB
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

