⑴ 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
JScript codevar canvas = document.getElementById("mycanvas");
var img = canvas.toDataURL("image/png");
document.write('<img src="'+img+'"/>');
打印是浏览器的事。用JS调用也是调用浏览器的功能,这种情况直接按专CTRL+P去处理。
至于PDF,装属软件,只要能打印的都可以通过软件生成PDF。
若想在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