哪裡有轉出 PDF 的 dll 或元件? |
答題得分者是:t27
|
holydisciple
一般會員 ![]() ![]() 發表:3 回覆:24 積分:10 註冊:2009-11-06 發送簡訊給我 |
各位大大,
我需要從 Delphi 轉出 pdf 的 dll,現在使用 PowerPDF,免費但不支援中文,我只好把中文字連同底圖先轉為點陣圖,再把點陣圖轉為 pdf,但這樣有缺點,一是文字會模糊,二是文字無法複製。 有哪位大大使用過 PDF 轉出功能的元件或 dll,請推薦一下,要錢的也可以,我現在用 Delphi 2006 的 Win32 模式,不能用轉檔元件,例如那種 QuickReport 轉 pdf 的元件。元件必須支援由 Delphi 提供的繪圖和文字函式直接輸出至 pdf 格式,例如呼叫 Canvas.TextOut, FillRect 等函式,因為報表程式輸出的內容都用 Canvas 裡面的函式產生,轉出 pdf 也必須如此。 謝謝
------
有沒有可能,上帝使用程式操作世界? |
P.D.
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:603 回覆:4038 積分:3874 註冊:2006-10-31 發送簡訊給我 |
|
holydisciple
一般會員 ![]() ![]() 發表:3 回覆:24 積分:10 註冊:2009-11-06 發送簡訊給我 |
|
t27
中階會員 ![]() ![]() ![]() 發表:34 回覆:95 積分:90 註冊:2002-06-19 發送簡訊給我 |
可以參考看看
http://www.pdfforge.org/ 相關程式範例參考: procedure TFrmBS00P.ToPDF(cOutFile:string;nProgram:integer = 1); var PDFCreator, PDFOptions, S_Options :Variant; InFname,OutFname,OutDir,PrinterName,DefaultPrinter,DefaultDir,cExt : string; O_Options, O_Creator : OleVariant; procedure SetDefaultPrinter1(NewDefPrinter: string); var ResStr: array[0..255] of Char; begin StrPCopy(ResStr, NewdefPrinter); WriteProfileString('windows', 'device', ResStr); StrCopy(ResStr, 'windows'); SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, Longint(@ResStr)); end; begin PrinterName := 'PDFCreator'; if GetPDFPrinter(PrinterName) then begin InFname := cOutFile; cExt := ExtractFileExt(InFname); OutFname := StringReplace(InFname,cExt,'',[]); OutFname := ExtractFileName(OutFname); OutDir := ExtractFilePath(InFname); PDFCreator := CreateOleObject('PDFCreator.clsPDFCreator'); PDFCreator.cStart('/NoProcessingAtStartup'); PDFCreator.cOption('UseAutosave') := 1; PDFCreator.cOption('UseAutosaveDirectory') := 1; PDFCreator.cOption('AutosaveDirectory') := OutDir; PDFCreator.cOption('AutosaveFilename') := OutFname; PDFCreator.cOption('AutosaveFormat') := 0; //0:PDF PDFCreator.cOption('AutosaveStartStandardProgram') := nProgram;//1; PDFCreator.cOption('ShowAnimation') := 0; PDFCreator.cOption('NoConfirmMessageSwitchingDefaultprinter') := 1; PDFCreator.cVisible := False; PDFCreator.cWindowState := 1; PDFCreator.cClearcache; //2009.02.16 //SetDefaultPrinter1(PrinterName); PDFCreator.cDefaultPrinter := PrinterName; //PDFCreator.cPrintfile(InFname); PDFCreator.cPrinterStop := False; DeleteFile(cOutFile); end else begin ShowMsg(MTInfo,'未裝設 PDFCreator Driver !'); end; end;
編輯記錄
t27 重新編輯於 2009-11-12 14:07:25, 註解 無‧
|
holydisciple
一般會員 ![]() ![]() 發表:3 回覆:24 積分:10 註冊:2009-11-06 發送簡訊給我 |
|
t27
中階會員 ![]() ![]() ![]() 發表:34 回覆:95 積分:90 註冊:2002-06-19 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |