導航:首頁 > 編程語言 > 代碼列印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相關的資料

熱點內容
文件名1688quick 瀏覽:927
del文件是哪個資料庫的 瀏覽:901
java將字元串轉換為整型 瀏覽:175
win7批量修改部分文件名 瀏覽:873
win8需要升級到win10么 瀏覽:85
大數據在海關的運用 瀏覽:38
android使用javamail 瀏覽:3
win10快速訪問共享文件 瀏覽:259
喜馬拉雅電腦文件導出 瀏覽:615
js取商運算 瀏覽:719
幼兒編程貓是什麼 瀏覽:347
dnf哪個網站補丁 瀏覽:646
iphone自動關機能打通 瀏覽:794
怎麼連接伺服器資料庫 瀏覽:907
大數據時代羅輯思維 瀏覽:827
聯想y50pwin10開機速度 瀏覽:236
網路游戲對我們的身體有什麼壞處 瀏覽:950
電腦接觸不良文件 瀏覽:689
星成大海是哪個app可以看 瀏覽:418
施耐德plc編程軟體哪個好用 瀏覽:680

友情鏈接