2,498
社区成员
发帖
与我相关
我的任务
分享
var
wdo,wdoc,wdocs : OleVariant;
begin
wdo := CreateOleObject('Word.Application');
wdocs := wdo.Documents;
wdo.ActivePrinter := 'Acrobat PDFWriter';
wdoc := wdocs.Open('e:\test.doc');
wdoc.PrintOut(0, 0, 0,'e:\test.pdf');
end;
Adobe Acrobat 5.0.1 or
Adobe PageMaker 7
Then open your WORD, select print, select Distiller to print the file that you want to convert, the system will ask you to Save As......, type a name you want, then you get it.
You could also use GhostScript, it is a free softwere.(It can download everywhere on Internet)
试试
var
msword,msdoc : OleVariant;
begin
msword:=createoleobject('word.application');
msdoc := msword.Documents;
msdoc.ActivePrinter := 'Adobe PDF';
msdoc.documents.open('c:\test.doc');
msdoc.PrintOut(0, 0, 0,'e:\test.pdf');
end;
WordApplication1.PrintOut(emptyparam,emptyparam,emptyparam,emptyparam,emptyparam
,emptyparam,emptyparam,copies,pages,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam);