将 PDF 文件保存到桌面 [VB .NET] [英] Saving PDF files to desktop [VB .NET]

查看:74
本文介绍了将 PDF 文件保存到桌面 [VB .NET]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 PDF 文件保存到我的桌面.这段代码我把它们保存在 bin 文件夹中

I want to save PDF files to my desktop. This code I have saves them in the bin folder

Dim pdf = gvwProyectos.SelectedRows.Count > 0
        Dim pdfDoc As New Document(iTextSharp.text.PageSize.A4)
        Dim pdfWrite As PdfWriter = PdfWriter.GetInstance(pdfDoc, New FileStream("Reporte.pdf", FileMode.Create))

顺便说一句,我正在使用 iTextSharp.

I'm using iTextSharp btw.

推荐答案

好的,我已经知道怎么做了,但我会把对我有用的东西留在这儿.

Ok, I already find out how to do it but I'll leave what worked for me in here.

        Dim pdfDoc As New Document(iTextSharp.text.PageSize.A4)
        Dim pdfWrite As PdfWriter = PdfWriter.GetInstance(pdfDoc, New FileStream(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\" + "yourPDFdesiredName.pdf", FileMode.Create))

这篇关于将 PDF 文件保存到桌面 [VB .NET]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆