- Milyen hagyományos (nem okos-) telefont vegyek?
- Google Pixel topik
- Egyéves Gemini AI Pro a Google-től a magyar egyetemistáknak is
- Szakított a OnePlus és a Hasselblad
- Műholdas AI chippel fedné le a bolygót a Samsung
- iPhone topik
- Poco F6 5G - Turbó Rudi
- Drága bluetooth tagek olcsóbb alternatívái (MiLi MiTag, LiTag, OTAG, stb.)
- Samsung Galaxy S23 Ultra - non plus ultra
- Samsung Galaxy S23 és S23+ - ami belül van, az számít igazán
-
Mobilarena

Ú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!
- Samsung Galaxy A56 Awesome Graphite 120 Hz Super AMOLED, AI-kamera 8/128 GB 2027. 08. 17-ig
- Samsung Galaxy Z Fold 6 Silver Shadow Hajlítható csúcstechnológia, AI extrákkal,2028. 01. 24
- GYÖNYÖRŰ iPhone 11 Pro 64GB Space Grey-1 ÉV GARANCIA - Kártyafüggetlen, MS3668
- Egyedi ékszerdobozka
- Bomba ár! Lenovo ThinkPad L520 - i3-2GEN I 4GB I 160GB I DVDRW I 15,6" HD I Cam I W10 I Garancia!
Állásajánlatok
Cég: NetGo.hu Kft.
Város: Gödöllő
Cég: Promenade Publishing House Kft.
Város: Budapest




