将图像转换为PDF格式 [英] convert image to pdf
本文介绍了将图像转换为PDF格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道如何将许多图像转换为1 pdf。我已设法将位图转换为pdf,但我想将一些图像转换为1 pdf。
我使用以下代码:
Anyone know how to convert many images into 1 pdf. I've managed to transform bitmaps into pdf but I want to make some images into 1 pdf.
I use the following code:
sendPath = Path.GetDirectoryName(fileName) & "\" & Path.GetFileNameWithoutExtension(filename) & ".pdf"
Try
Dim doc As New PdfDocument()
doc.Pages.Add(New PdfPage())
Dim xgr As XGraphics = XGraphics.FromPdfPage(doc.Pages(0))
Dim img As XImage = XImage.FromFile(fileName)
xgr.DrawImage(img, 0, 0)
doc.Save(savefile)
doc.Close()
success = True
Catch ex As Exception
End Try
推荐答案
看看这个链接:
http://www.e-iceblue.com/Knowledgebase/Spire.PDF/Program-Guide/如何转换图像到PDF-with-C- / VB.NET.html [ ^ ]
http://stackoverflow.com / questions / 1642280 / jpg-to-pdf-convertor-in-c-sharp [ ^ ]
Look At this links:
http://www.e-iceblue.com/Knowledgebase/Spire.PDF/Program-Guide/How-to-Convert-Image-to-PDF-with-C-/VB.NET.html[^]
http://stackoverflow.com/questions/1642280/jpg-to-pdf-convertor-in-c-sharp[^]
Hi
i使用我自己的另一个函数来执行此操作,就像我在上一个问题中所说的那样。
i use pdf creator
http://www.softpedia.com/dyn-postdownload.php?p=31035&t=0&i=1 [ ^ ]
程序将文档发送到pdf通过打印它们并将此程序用作目标而不是打印机以及在c#中打印文档,您可以查看:
HTTP:// webcache.googleusercontent.com/search?q=cache:WlXuJAJOy4MJ:msdn.microsoft.com/en-us/library/aa287530(v%3Dvs.71).aspx+&cd=1&hl=en&ct=clnk [ ^ ]
i希望这个帮助
:Doostl
Hi i use myself another function to do this as i said in the last question.
i use pdf creator
http://www.softpedia.com/dyn-postdownload.php?p=31035&t=0&i=1[^]
program to make documents to pdf by printing them and use this program as a target instead of a printer and about printing a document in c# you can check this:
http://webcache.googleusercontent.com/search?q=cache:WlXuJAJOy4MJ:msdn.microsoft.com/en-us/library/aa287530(v%3Dvs.71).aspx+&cd=1&hl=en&ct=clnk[^]
i hope this help
:Doostl
访问这里。
将图像文件转换为PDF [ ^ ]
这篇关于将图像转换为PDF格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文