
正文
vb.net教材pdf vbnet using
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
急求vb.net pdf静默打印问题
你现在的默认打印机是Adobe PDF,修改一下默认打印机为你现在需要的打印机即可。
相关问答
Q1: 谁知道 哪儿有VB.NET好点的教程呀?
到搜搜迅雷或者电骡去搜:
vb2005基础教程.pdf
Visual Basic.NET技术内幕.rar
======
特别是第2个,必看
Q2: vb.net 导出PDF
利用DataWindow.net在 vb.net 下导出PDF格式文件
利用datawindow.net,导出PDF文件,实现前提:
1.安装Acrobat Distiller虚拟打印机,注意要用datawindow.net提供的打印驱动,在c:\program files\sybase\datawindow.net2.0\driver中,在文章最后,我会提供一个静态安装虚拟打印机的批处理文件,方便安装。
2.安装Ghostscript 7.05 ,在网上找,免费的。
3.导出PDF文件前,一要指定虚拟打印机名,其次导出格式为PDF(Export.PDF.Method=Distill!),另外还要指定 PDF.Distill.CustomPostScript=Yes。
具体代码如下:
''' summary
''' 导出文件
''' /summary
''' param name="sender"/param
''' param name="e"/param
''' remarks/remarks
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
Try
Dim strFilename, strPrinter As String
Dim saveDg As New SaveFileDialog
strPrinter = Me.dwPrint.Describe("DataWindow.Print.PrinterName")
saveDg.FileName = Me.dwPrint.Tag.ToString
saveDg.Filter = "Pdf文件|*.pdf|Excel文件|*.xls|所有文件|*.*"
If saveDg.ShowDialog = Windows.Forms.DialogResult.OK Then
strFilename = saveDg.FileName
If strFilename.IndexOf(".pdf") 0 Then
Me.dwPrint.Modify("DataWindow.Print.PrinterName='Acrobat Distiller'")
Me.dwPrint.Modify("DataWindow.Export.PDF.Method=Distill!")
Me.dwPrint.Modify("DataWindow.Export.PDF.Distill.CustomPostScript=Yes")
Me.dwPrint.SaveAs(strFilename, Sybase.DataWindow.FileSaveAsType.Pdf, True)
ElseIf strFilename.IndexOf(".xls") 0 Then
Me.dwPrint.SaveAs(strFilename, Sybase.DataWindow.FileSaveAsType.Excel, True)
End If
Me.dwPrint.Modify("DataWindow.Print.PrinterName='" + strPrinter + "'")
MessageBox.Show("导出成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
4 批处理文件(实现静默安装)
Q3: 在.net下如何提取PDF的文字并检索相关数据
FileStream ReadPdf = new FileStream(@"d:\books\vb.net\test.pdf", FileMode.Open);
long FileSize;
FileSize = ReadPdf.Length;
byte[] Buffer = new byte[(int)FileSize];
ReadPdf.Read(Buffer, 0, (int)ReadPdf.Length);
ReadPdf.Close();
写
FileStream CreatePdf = new FileStream(@"d:\books\vb.net\test1.pdf", FileMode.Create);
CreatePdf.Write(Buffer,0,Buffer.Length);
CreatePdf.Close();
希望能帮带vb.net教材pdf你vb.net教材pdf的忙~告一段落~谢谢~
Q4: 如何在vb中打开一个PDF文件?
利用AcroPDF打开并显示PDF文件。
注意:必须事先安装免费的 Adobe Reader 11.0
(1)创建一个VB6工程。在工具栏中点击鼠标右键,调出右键菜单--部件--Adobe Acrobat 7.0 Control Type Library 1.0--确定
(2)在Form1中布置一个AcroPDF控件
(3)窗体代码
Option Explicit
Private Sub Form_Load()
Me.Caption = "我的PDF阅读器"
' 加载PDF文档并显示
AcroPDF1.LoadFile ("D:\电子书籍\ProgrammingWpf.pdf")
End Sub
Private Sub Form_Resize()
'调整 AcroPDF1大小,占满整个窗口
AcroPDF1.Move 30, 30, ScaleWidth - 60, ScaleHeight - 60
End Sub
(4)运行效果
Q5: vb.net如何将excel指定的sheet生成pdf 我里面有sheet1~5,只想将sheeet2、3转成PDF,并且转完后打开预览?
你可以使用Spire.Xls来实现。Spire.Xls可以让你方便地将excel中指定的sheet导出为pdf文件,并且支持在导出时指定sheet2和sheet3。同样可以使用该框架来快速预览生成的pdf文件。
vb.net教材pdf的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vbnet using、vb.net教材pdf的信息别忘了在本站进行查找喔。







