16,004,647 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by NeerajGSoft (Top 22 by date)
NeerajGSoft
28-Jan-14 2:58am
View
i gone through to this link but this one also not helpful to me..
NeerajGSoft
28-Jan-14 1:32am
View
yup i included..
NeerajGSoft
11-Jul-13 5:55am
View
your welcome..:-)
NeerajGSoft
10-Jul-13 11:13am
View
go with solution 1. you will get idea for how to validate xml with dtd
NeerajGSoft
8-Jul-13 9:21am
View
thank u for your response... i got the solution by myself... actually its related to webbrowser control...
NeerajGSoft
4-Jul-13 4:29am
View
what type of validation u want to do on xml file???? can u specify more...
NeerajGSoft
4-Jul-13 3:59am
View
you have to first download file from URL and then copy that file from your current directory to another directory.....
NeerajGSoft
4-Jul-13 3:49am
View
the sourcePath is a URL or a Directory Path??????????
because this method 'System.IO.File.Copy(sourceFile, destFile, true);' copy file from one folder to another...
NeerajGSoft
1-Jul-13 1:54am
View
Thank you sir for your suggestion....:-)
NeerajGSoft
15-Jun-13 2:14am
View
can u give an example????
NeerajGSoft
15-Jun-13 2:01am
View
no its not....
Actually when i am writing pdf text, the path of my pdf file with name is inserted instead of previous link...
this is my entire code...
PdfDictionary PageDictionary = default(PdfDictionary);
PdfArray Annots = default(PdfArray);
PdfReader reader = new PdfReader(pdfFilePath);
//Loop through each page
for (int i = 1; i <= reader.NumberOfPages; i++)
{
//Get the current page
PageDictionary = reader.GetPageN(i);
//Get all of the annotations for the current page
Annots = PageDictionary.GetAsArray(PdfName.ANNOTS);
//Make sure we have something
if ((Annots == null) || (Annots.Length == 0))
{
continue;
}
//Loop through each annotation
foreach (PdfObject A in Annots.ArrayList)
{
//Convert the itext-specific object as a generic PDF object
PdfDictionary AnnotationDictionary = (PdfDictionary)PdfReader.GetPdfObject(A);
//Make sure this annotation has a link
if (!AnnotationDictionary.Get(PdfName.SUBTYPE).Equals(PdfName.LINK))
{
continue;
}
//Make sure this annotation has an ACTION
if (AnnotationDictionary.Get(PdfName.A) == null)
{
continue;
}
//Get the ACTION for the current annotation
PdfDictionary AnnotationAction = (PdfDictionary)AnnotationDictionary.GetAsDict(PdfName.A);
if (AnnotationAction.Get(PdfName.S).Equals(PdfName.URI))
{
//Removing Link
AnnotationAction.Remove(PdfName.URI);
}
}
}
using (FileStream FS = new FileStream(OutputFile, FileMode.Create, FileAccess.Write, FileShare.None))
{
using (Document Doc = new Document())
{
using (PdfCopy writer = new PdfCopy(Doc, FS))
{
Doc.Open();
for (int j = 1; j <= reader.NumberOfPages; j++)
{
writer.AddPage(writer.GetImportedPage(reader, j));
}
Doc.Close();
}
}
}
NeerajGSoft
15-Jun-13 1:41am
View
ok sir, and after removing hyperlinks how to write text again as a pdf???
NeerajGSoft
14-Jun-13 2:28am
View
ok thanks for that...:-)
NeerajGSoft
13-Jun-13 7:51am
View
Deleted
This is a function where i'm reading pdf file..............
Public Function ReadPdfFile(ByVal fileName As String)
Dim text As New StringBuilder
If My.Computer.FileSystem.FileExists(fileName) Then
Dim pdfReader As New iTextSharp.text.pdf.PdfReader(fileName)
' Dim page As Integer
For page = 1 To pdfReader.NumberOfPages
Dim strategy As New SimpleTextExtractionStrategy()
Dim currentText As String = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy)
currentText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(currentText)))
text.Append(currentText)
Next
pdfReader.Close()
End If
Return text.ToString()
End Function
NeerajGSoft
13-Jun-13 7:20am
View
I want to remove hyperlink but when i am reading pdf file, getting the text but not hyperlink of that text...
NeerajGSoft
5-Mar-13 3:52am
View
sir, can u give an small example where a webpage properly render in android...
NeerajGSoft
6-Feb-13 23:25pm
View
thank u....
NeerajGSoft
5-Feb-13 22:19pm
View
url="http://links.casemakerlegal.com/states/MS/books/Case_Law/results?search[Cite]=77 So.3d 1094"
Uri urlCheck = new Uri(url);
WebClient wc = new WebClient();
wc.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
Stream data = wc.OpenRead(urlCheck);
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();
This Is My Code To Make A Request To Server........
NeerajGSoft
5-Feb-13 10:32am
View
because i worked with httpwebrequest and httpwebresponse classes and it giving me runtime exception "Internal Server Error" at the time of response of url....
NeerajGSoft
5-Feb-13 10:30am
View
I tried with webrequest but i'm getting "internal server error" @webresponse object....
NeerajGSoft
1-Feb-13 22:25pm
View
request = WebRequest.Create(urlCheck);
request.Timeout = 100000;
response = request.GetResponse();
strmRead = new StreamReader(response.GetResponseStream(),System.Text.Encoding.UTF8);
result = strmRead.ReadToEnd();
NeerajGSoft
1-Feb-13 0:48am
View
Even I Used WebClient Class too........
Show More