Click here to Skip to main content
15,667,281 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to split pdf file into mulitple file like 1.pdf,2.pdf in 2010 my code is as under. i have counted lines of a pdf docs and total bytes of the pdf docs. now how to split it
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim infoReader As System.IO.FileInfo = _
       Label1.Text = infoReader.Length

       Dim data() As String = IO.File.ReadAllLines("C:\Users\nhbg\Desktop\RamNiwas\AccessTutorial.pdf")
       For Each lines As String In data
           Dim splt As String() = lines.Split(" ,")


1 solution

PDF and DOCX files are not text files, to be split using string functions. :-)

To work with PDF, please see this set of referenced to PDF libraries you can use:

To work with .docx, please see:[^],[^],[^].

Open Source from Microsoft Open Technologies:[^].

Now, about reading a Word document:[^].

This CodeProject article can also be useful: Edit Word Documents using OpenXML and C# Without Automation/Interop[^].

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900