|
-
September 24th, 2011, 01:43 AM
#1
How to write in PDF File ?
Dear Sir,
I do not know how to write data in PDF file. I want generate report in PDF Format but I do not
know so How to possible help me.. I am using VS 2010.
-
September 24th, 2011, 06:23 AM
#2
Re: How to write in PDF File ?
I don't know if there is a tool in VS to do this or not. I use an export filter to create pdf from my reports but I am not using the report tools from VS.
Another option could be a pdf print driver, basically you would just send your report to the printer but choose the pdf driver and pass it a filename.
Try a google search and see what you find.
Always use [code][/code] tags when posting code.
-
September 24th, 2011, 08:21 AM
#3
Re: How to write in PDF File ?
-
September 25th, 2011, 12:29 PM
#4
Re: How to write in PDF File ?
Adobe will license the format to you, but you won't be able to sell it or tell anyone else about it.
-
October 17th, 2011, 02:45 PM
#5
Re: How to write in PDF File ?
Hi,
If you have MS Word installed you can create a report in Word using the Office Interop and save the report as a pdf file.
Code:
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Word.WdExportFormat
Public Class Form1
Dim myWord As Microsoft.Office.Interop.Word.Application
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
myWord = New Word.Application
myWord.Visible = True
myWord.Documents.Add()
myWord.Selection.TypeText(Text:=Trim("This is a pdf file"))
myWord.Documents(1).Activate()
myWord.ActiveDocument.ExportAsFixedFormat(OutputFileName:="C:\temp\pdffile.pdf", _
ExportFormat:=wdExportFormatPDF)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
Curt
-
October 18th, 2011, 08:50 AM
#6
Re: How to write in PDF File ?
Your best bet is to use some kind of pdf print driver such as CutePDF... The down side of this is that the free ones often won't let you print silently/programmatically but require user's inputs. The paid ones cost a lot but will comes with sdk that allows you to print to pdf with just a few lines of codes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|