منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
تحويل النصوص الى PDF - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : تحويل النصوص الى PDF (/showthread.php?tid=25897)



تحويل النصوص الى PDF - معاذ العامري - 28-07-18

السلام عليكم 
هل توجد طريقه حقا لتحويل النصوص الى PDF
 بالفيجوال بيسك
ارجو منكم المساعدة


RE: تحويل النصوص الى PDF - YousefOkasha - 28-07-18

و عليكم السلام اخي ..

لا شئ مستحيل في البرمجة ..

يمكنك مراجعة هذا الموضوع https://stackoverflow.com/questions/25202557/text-to-pdf-in-vb-net

او مشاهدة هذا الفيديو





و قم بالبحث قبل وضع سؤالك او موضوعك ..

تحياتي لك وتمنياتي لك بالتوفيق Blush



RE: تحويل النصوص الى PDF - aljzazy - 28-07-18

بالبداية انت بحاجة الى اضافة reference  الى مشروعك حمله من النت PDFsharp Assemblies
وهذا مثال بسيط بعد ان يتم استدعاء النيم سبيس الخاصة
PHP كود :
Imports System.IO
Imports PdfSharp
Imports PdfSharp
.Drawing
Imports PdfSharp
.Pdf

Public Class Form1

    Private Sub Button1_Click
(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click

        Try
            Dim line 
As String
            Dim readFile 
As System.IO.TextReader = New StreamReader("Text.txt")
 
           Dim yPoint As Integer 0

            Dim pdf 
As PdfDocument = New PdfDocument
            pdf
.Info.Title "Text File to PDF"
 
           Dim pdfPage As PdfPage pdf.AddPage
            Dim graph 
As XGraphics XGraphics.FromPdfPage(pdfPage)
 
           Dim font As XFont = New XFont("Verdana"20XFontStyle.Regular)


 
           While True
                line 
readFile.ReadLine()
 
               If line Is Nothing Then
                    Exit 
While
 
               Else
                    graph
.DrawString(linefontXBrushes.Black_
                    New XRect
(40yPointpdfPage.Width.PointpdfPage.Height.Point), XStringFormats.TopLeft)
 
                   yPoint yPoint 40
                End 
If
 
           End While


 
           Dim pdfFilename As String "txttopdf.pdf"
 
           pdf.Save(pdfFilename)
 
           readFile.Close()
 
           readFile Nothing
            Process
.Start(pdfFilename)
 
       Catch ex As Exception
            MsgBox
(ex.ToString)
 
       End Try
 
   End Sub
End 
Class 



RE: تحويل النصوص الى PDF - GameOver - 29-07-18

هذا الموضوع موجود بالمنتدى ويستخدم المكتبة المشهورة iTextSharp
تصدير البيانات الى PDF باستخدام ITextSharp لايدعم اللغة العربية


RE: تحويل النصوص الى PDF - DOX.1 - 30-07-18

أنت تحتاج إلى معرفة ocr