开发者

VB.NET function that returns PDF?

I'm tr开发者_Python百科ying to create a function that would return a PDF document. Something like this:

Function GetPDF(ByVal DirectoryPath as String) as PDF
   Return DirectoryPath
End Function

Any way to do this? Thanks!


What are you trying to do with it? Manipulate it? Serve it to a client?

Generally speaking you'd return a Stream...

Function GetPDF(ByVal filePath as String) as FileStream

    Return File.OpenRead(filePath);

End Function

or an array of Bytes...

Function GetPDF(ByVal filePath as String) as Byte()

    Return File.ReadAllBytes(filePath);

End Function
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜