- Hobby elektronika
- Milyen házat vegyek?
- Nvidia GPU-k jövője - amit tudni vélünk
- Soundbar, soundplate, hangprojektor
- Az év legnagyobb kalandjára hív az új AMD Software
- TCL LCD és LED TV-k
- AMD vs. INTEL vs. NVIDIA
- Philips LCD és LED TV-k
- CPU léghűtés kibeszélő
- NVIDIA GeForce RTX 4080 /4080S / 4090 (AD103 / 102)
-
PROHARDVER!

Ú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!
- ELADÓ KOMOLY KONFIG nem sürgős, nem alkudozós játszótér
- Gamer pc + aoc gamer monitor 144hz 32" ívelt.
- GAMER PC // ASUS TUF B650M-PLUS / R9 7900X / 64GB DDR5 / SAPPHIRE Radeon RX 7800 XT / 1TB M.2 SSD
- Intel Core i7-13700KF + ASUS Prime Z790-P WIFI + Kingston FURY Beast 32GB DDR5 6000MHz
- OH! Dell Latitude 7340 Üzleti Profi Fémházas Ultrabook Laptop 13,3" -65% i7-1365U 16/512 FHD IRIS Xe
- Motorola Edge 50 Neo 256GB,Újszerű,Dobozaval,12 hónap garanciával
- Microsoft Surface Laptop 5 i5-1245U 16 GB RAM 2256X1504 érintőkijelző Garancia
- LG 39GX90SA-W - 39" Ívelt Smart OLED/ WQHD 2K / 240Hz & 0.03ms / 1300 Nits / G-Sync & FreeSync
- Samsung Odyssey G5 LS27CG510 27 QHD Gamer Monitor 6 hó garancia Házhozszállítás
- ÁRGARANCIA!Épített KomPhone i7 14700KF 32/64GB RAM RTX 5090 32GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest



