You must Sign In to post a response.
Category: .NET
#768274
Hi,
Instead of ITextSharp try to use FreeSpire.PDF from Nuget packages it will help to solve your problem.
It is a free ware and also we have lots of advantages than ItextSharp. No Abode installation required for this Package with Adobe it will work.
Kindly check the below forum for more details.
Thanks,
Mani
Instead of ITextSharp try to use FreeSpire.PDF from Nuget packages it will help to solve your problem.
It is a free ware and also we have lots of advantages than ItextSharp. No Abode installation required for this Package with Adobe it will work.
Kindly check the below forum for more details.
http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-Text-to-PDF-with-C-VB.NET.html
Thanks,
Mani
#768319
Yes, you can use Free Spire.PDF, it supports to get coordinates as well as height and width of the specific text.
You can download its Nuget package from https://www.nuget.org/packages/FreeSpire.PDF/.
Below code for your reference:
'Load the PDF file
Dim doc As New PdfDocument()
doc.LoadFromFile("E:\Program Files\Sample.pdf")
Dim result As PdfTextFind() = Nothing
For Each page As PdfPageBase In doc.Pages
'Find the text
result = page.FindText("PDF").Finds
'Get the coordinate of text
For Each text As PdfTextFind In result
Dim p As PointF = text.Position
Console.WriteLine(p)
Next
Next
You can download its Nuget package from https://www.nuget.org/packages/FreeSpire.PDF/.
Below code for your reference:
'Load the PDF file
Dim doc As New PdfDocument()
doc.LoadFromFile("E:\Program Files\Sample.pdf")
Dim result As PdfTextFind() = Nothing
For Each page As PdfPageBase In doc.Pages
'Find the text
result = page.FindText("PDF").Finds
'Get the coordinate of text
For Each text As PdfTextFind In result
Dim p As PointF = text.Position
Console.WriteLine(p)
Next
Next
Return to Return to Discussion Forum