導航:首頁 > 編程語言 > 代碼列印pdf

代碼列印pdf

發布時間:2024-04-20 00:21:11

⑴ php涓鎴戠敤浜唗hinkPHP 鐒跺悗鎴戣佹墦鍗皃df鎶ヨ〃 鐢ㄤ簡fpdf 浣嗘槸鐜板湪涓嶇煡閬撳湪action涓鎬庝箞璋冪敤fpdf涓鐨勫唴瀹廣

ThinkPHP涓璋冪敤鏂囦歡鐨勬柟寮忔瘮杈冨氾紝絎涓夋柟鎻掍歡鎴栨槸鑷宸辨墜鍐欑殑鍒嗙被錛屾垜涔犳儻浣跨敤鐨勬柟娉曟槸錛
1銆佹妸鏂囦歡鏀懼湪Lib/ORG涓錛屽懡鍚嶄負fpdf.class.php錛岀劧鍚庡湪Action鏂囦歡涓浣跨敤import("@.ORG.fpdf")璋冪敤灝卞彲浠ヤ簡銆
2銆佺浜岀嶆柟娉曞氨鏄鑷宸卞緩絝嬫枃浠跺す錛岀『瀹氱浉瀵逛簬鍏ュ彛鏂囦歡鐨勫湴鍧錛岀劧鍚庡湪Action鏂囦歡涓鍖呭惈榪涘幓銆
require_once("鐩稿逛簬鍏ュ彛鏂囦歡鐨勮礬寰");
鎴栨槸
include_once("鐩稿逛簬鍏ュ彛鏂囦歡鐨勮礬寰");

鎴戜笉澶娓呮欶PDF鐨勪嬌鐢ㄦ柟娉曪紝鍒氭墠鍘繪煡鐪嬶紝鍙鎯滄垜鎵撲笉寮緗戦〉錛屽傛灉鍙鏄涓涓鏂囦歡鐨勫姞杞藉氨鍙浠ヨВ鍐抽棶棰橈紝鎴戝緩璁浣犱嬌鐢ㄧ涓縐嶆柟娉曪紝鏇存柟渚誇竴浜涖
濡傛灉鏄涓涓瀹屾暣鐨勪唬鐮侀」鐩鐨勮瘽錛屾垜瑙夊緱浣犱嬌鐢ㄧ浜岀嶆柟娉曟洿鍚堥備竴浜涳紝鑷宸卞緩涓涓鎻掍歡鏂囦歡澶癸紝鎶婂叾涓鏂囦歡鍖呭惈榪涘幓灝卞彲浠ヤ簡銆

PS: 鍙浠ヤ嬌鐢ㄨ存槑璋冪敤宸茬粡鎴愬姛浜嗐備篃灝辨槸璇翠綘棰樼洰鐨勯棶棰樿В鍐充簡銆
涔辯爜鐨勬渶澶у師鍥犲氨鏄緙栫爜鐨勬柟寮忎笉瀵癸紝浣犲瓨鍌ㄧ殑鏃跺欑敤鐨勬槸浠涔堟牱鐨勭紪鐮侊紝閭d箞鍐欏叆鐨勬椂鍊欏氨闇瑕佺敤鍚屾牱鐨勭紪鐮侊紝鏌ョ湅涓涓嬩綘鏄浠庡摢璇誨彇鐨勬暟鎹錛屽啀鐪嬬湅鏁版嵁鏄浠涔堢紪鐮佹牸寮忥紝鎴戜笉鐔熸倝FPDF錛屾墍浠ヨ兘緇欑殑寤鴻涓嶅氾紝浣嗘垜璁板緱璋冪敤鐨勬椂鍊欐槸鍙浠ヤ紶涓涓緙栫爜鍙傛暟鐨勶紝鎶婅繖涓鍙傛暟鍐欎笂錛岀湅鐪嬭繕鏄鍚︽湁榪欐牱鐨勬儏鍐點

⑵ vba如何使用CAcroAVDoc列印pdf文件

方法/步驟

⑶ html5中canvas畫的圖形如何列印以及導出pdf

  1. JScript codevar canvas = document.getElementById("mycanvas");
    var img = canvas.toDataURL("image/png");

    document.write('<img src="'+img+'"/>');

  2. 列印是瀏覽器的事。用JS調用也是調用瀏覽器的功能,這種情況直接按專CTRL+P去處理。

  3. 至於PDF,裝屬軟體,只要能列印的都可以通過軟體生成PDF。

  4. 若想在HTML5里用純代碼實現導出PDF是實現不了的。

⑷ 如何用.NET將DWG文件列印為PDF

執行步驟:打開一個dwg文件,用netload載入下面代碼所在的.dll文件,再輸入命令plottest,就得到輸出結果(一個.pdf文件)。

要用到的參考:

AcDbMgd.dll;AcMgd.dll;AutoCAD 2010 Type Library;System.Windows.Forms; AutoCAD/ObjectDBX Common 18.0 Type Library.

VB.NET:

Imports System

Imports Autodesk.AutoCAD.Runtime

Imports Autodesk.AutoCAD.Interop

Imports Autodesk.AutoCAD.Interop.Common

Imports Autodesk.AutoCAD.ApplicationServices

Imports Autodesk.AutoCAD.DatabaseServices

Imports Autodesk.AutoCAD.EditorInput

<Autodesk.AutoCAD.Runtime.CommandMethod("Plottest")> _

Public Sub PlotToPDF()

Dim activeDoc As Document = Application.DocumentManager.MdiActiveDocument

Dim ThisDrawing As AcadDocument = CType(activeDoc.AcadDocument, AcadDocument)

Dim layout As AcadLayout = ThisDrawing.ActiveLayout

Dim MediaName As String = layout.CanonicalMediaName

If MediaName.Equals("") Then

activeDoc.Editor.WriteMessage("There is no media set for the active layout.")

Return

Else

activeDoc.Editor.WriteMessage(("The media for the active layout is: " + MediaName))

End If

Try

Dim oplot As AcadPlotConfiguration = ThisDrawing.PlotConfigurations.Add("PDF", layout.ModelType)

oplot.PaperUnits = AcPlotPaperUnits.acMillimeters

oplot.StyleSheet = "monochrome.ctb"

oplot.PlotWithPlotStyles = True

oplot.ConfigName = "DWG To PDF.pc3"

oplot.UseStandardScale = True

oplot.StandardScale = AcPlotScale.acScaleToFit

oplot.PlotType = AcPlotType.acExtents

oplot.CenterPlot = True

Dim oMediaNames As Object = layout.GetCanonicalMediaNames

Dim mediaNames As ArrayList = New ArrayList(CType(oMediaNames, String()))

For Each sName As String In mediaNames

If sName.Contains(MediaName) Then

oplot.CanonicalMediaName = sName

layout.CopyFrom(oplot)

layout.PlotRotation = AcPlotRotation.ac0degrees

layout.RefreshPlotDeviceInfo()

ThisDrawing.SetVariable("BACKGROUNDPLOT", 0)

ThisDrawing.Plot.QuietErrorMode = True

ThisDrawing.Plot.PlotToFile("c:/temp/d1.pdf", "DWG To PDF.pc3")

oplot.Delete()

oplot = Nothing

Return

End If

Next

Catch es As System.Exception

System.Windows.Forms.MessageBox.Show(es.ToString)

End Try

End Sub

閱讀全文

與代碼列印pdf相關的資料

熱點內容
好壓IMG壓縮文件轉換成光碟 瀏覽:588
前端json格式如何排序 瀏覽:821
ocx實現選擇保存文件 瀏覽:986
office2007教程免費下載 瀏覽:489
pop編程是什麼 瀏覽:760
三星升級系統聯接失敗 瀏覽:929
微信忘記獨立密碼 瀏覽:555
spike如何編程 瀏覽:503
javajlabel位置 瀏覽:728
如何用大數據做企業 瀏覽:656
復合編程用什麼軟體最好 瀏覽:505
txt轉換word 瀏覽:797
java字面值的存儲 瀏覽:261
nodejs創建文件夾錯誤 瀏覽:484
c語言編程為什麼關閉了 瀏覽:245
相冊的數據清理了怎麼恢復 瀏覽:775
微信文件管理換路徑了以前聊天記錄沒有 瀏覽:310
java字元串截取最後兩位 瀏覽:377
少兒編程和無人機編程哪個好 瀏覽:383
ensp配置文件怎麼導出 瀏覽:939

友情鏈接