-
Fototrend

Ú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!
- Mini-ITX
- The Division 2 (PC, XO, PS4)
- sziku69: Fűzzük össze a szavakat :)
- Spórolós topik
- sziku69: Szólánc.
- Samsung Galaxy Z Fold5 - toldozás-foldozás
- Goddess of Victory:Nikke
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Arc Raiders
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- További aktív témák...
- Apple Imac 21,5 Inch, Late 2015! Intel Core I5 + Intel Iris Pro Graphics. 1TB Háttértár!
- ÚJ Dell Multi-Device Wireless Mouse Bolti ár:14k INGYEN FOXPOST
- ÚJ Microsoft Modern Mobile Mouse Bolti ár:20k INGYEN FOXPOST
- Lian Li SP750 750W Gold SFX Moduláris Tápegység
- Lian Li SP850 850W Gold SFX Moduláris Tápegység
- BESZÁMÍTÁS! Sony PlayStation VR2 virtuális valóság szemüveg garanciával hibátlan működéssel
- Xiaomi Mi 10T Pro 256GB, Kártyafüggetlen, 1 Év Garanciával
- BESZÁMÍTÁS! GIGABYTE B250M i5 7400 16GB DDR4 512GB SSD RX Vega 64 8GB DEEPCOOL Tesseract BF 650W
- Samsung Galaxy A53 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- AKCIÓ! 750W Seasonic PRIME TX-750 Titanium tápegység garanciával hibátlan működéssel
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


