 |
|
|
 |
|
 |
First of all great solution. I have problem with this code and hebrew (and i think that the same problem is for pdf in Arabic).
The text appear to be mirrored (from left to right instead of from right to left).
Does anybody have a solution?
Thanks in advance
|
| Sign In·View Thread·PermaLink | 4.00/5 (1 vote) |
|
|
|
 |
|
 |
First of all, thank you for posting this article! It's exactly what I needed.
Just wanted to let you know that PDFBox-0.7.3 already has a tool for extracting text (extracttext.exe) and another for extracting images (extractimages.exe). Here's usage information for the former:
C:\PDFBox-0.7.3\bin>extracttext Usage: java org.pdfbox.ExtractText [OPTIONS] <PDF file> [Text File] -password <password> Password to decrypt document -encoding <output encoding> (ISO-8859-1,UTF-16BE,UTF-16LE,...) -console Send text to console instead of file -html Output in HTML format instead of raw text -sort Sort the text before writing -startPage <number> The first page to start extraction(1 based) -endPage <number> The last page to extract(inclusive) <PDF file> The PDF document to use [Text File] The file to write the text to
I don't know if those tools were available when you posted the article. Thank you once again for taking the time to share your findings with the community. 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
When i use this code, i get the following message. Please help System.NullReferenceException: Object reference not set to an instance of an object. at org.pdfbox.pdmodel.PDPageNode.getAllKids(List , COSDictionary , Boolean ) at org.pdfbox.pdmodel.PDPageNode.getAllKids(List result) at org.pdfbox.pdmodel.PDDocumentCatalog.getAllPages() at org.pdfbox.util.PDFTextStripper.writeText(PDDocument doc, Writer outputStream) at org.pdfbox.util.PDFTextStripper.getText(PDDocument doc) at WindowsApplication1.Form1.getpdftext(String filename) in D:\My Documents\Visual Studio 2008\Projects\WindowsApplication3\WindowsApplication3\Form1.vb:line 12
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, I converted a java code to dll by using ikvm. I’m using the dll in .net, but its functions return null value. What’s the problem? (my source code is working truely)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I'm using this simly example but some PDF documents works graet, but some output file are empty, where is the problem ? some Filter ? some structure ?
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
as the subject saying.. ofcourse there is no problem Converting file in english, but how can i converting it in japanese? by the way, the japanese file can be converted but it was not correctly, some word is copied many times! if anyone got ideas please tell me! and thanks a lot!
modified on Friday, August 21, 2009 12:21 AM
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hello,
I tried following statements, it is compiling successfully. No error is occurring but document is not getting loaded at first statement.
PDDocument doc = PDDocument.load(SourceFile); PDFTextStripper stripper = new PDFTextStripper(); return stripper.getText(doc);
I have given valid path, if I give wrong path, it throws error. What can be wrong? The reason I am saying doc object is not getting filled with file is, I am getting "Object reference not set to an instance of an object." error on line 3rd ( return stripper.getText(doc)
~Sanjivani
modified on Tuesday, June 9, 2009 5:59 AM
|
| Sign In·View Thread·PermaLink | 2.00/5 (4 votes) |
|
|
|
 |
|
 |
Hi,
I can read only text in PDF file with PDFBox. but it doesn't allow me to read the Images in PDF file.
how can i read images from PDF file.
Kind Regards, Saurabh
|
| Sign In·View Thread·PermaLink | 1.57/5 (5 votes) |
|
|
|
 |
|
 |
Hi
I have tried to use: PDFTextStripper but it is impossible to parse the text since the table cells are not delimited with any character.
PDFStreamParser but i failed to understand how to navigate through the result . see code bellow:
... page = CType(allPages.get(pindex), PDPage)
contents = page.getContents()
Dim parser As org.pdfbox.pdfparser.PDFStreamParser = New org.pdfbox.pdfparser.PDFStreamParser(contents.getStream())
parser.parse()
Dim tokens As java.util.List = parser.getTokens() For tokenI As Integer = 0 To tokens.size() Console.WriteLine(String.Format(" Token {0}/{1}", tokenI, tokens.size))
Next
1. Is there a way to identify a table in PDF file ? 2. What are the alternatives for extracting tables data only using pdfBox ? 3. How is it possible to step through a table ?
Regards, Hanan
|
| Sign In·View Thread·PermaLink | 1.67/5 (2 votes) |
|
|
|
 |
|
 |
I've followed the code examples, and placed references where they needed to go, but I keep running into this error. Can anyone help?
This is my code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using org.pdfbox.util; using org.pdfbox.pdmodel; using IKVM.GNU.Classpath; using IKVM.Runtime;
namespace PDF_Parse { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private static string parseUsingPDFBox(string filename) { PDDocument doc = PDDocument.load(filename); PDFTextStripper stripper = new PDFTextStripper(); return stripper.getText(doc); }
public static void Main(string[] args) { StreamWriter writer = File.CreateText("output.txt"); writer.WriteLine(parseUsingPDFBox("pod.pdf")); writer.Close(); } }
}
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I want to convert Pdf that is in a URL to text. Is there a way to do that without having to save the PDF file?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Initally I used pdfBox with Vb.Net and it is working smoothly. But when I ported code to C# with this code try catch with WrappedIOException (org.pdfbox.exceptions.WrappedIOException) is required and always WrappedIOException is thrown for any pdf file; and e.getMessage() is "The signature is incorrect."
What could be wrong? same time vb.net code is working without any try catch.
I'm using PDFBox-0.7.3 Visual C# 2008 Express edition & VB.Net 2008 Express edition
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I created another new project in C# only to test pdfbox. It works. But old project still having same problem of exception. How to repair this problem with that specefic c# project?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
With out FontBox-*-dev.dll library you will recieve the same error
So, my working directory is follows: 19.02.2009 14:17 16 384 Pdf2Text.exe 12.10.2006 12:20 4 653 056 PDFBox-0.7.3.dll 10.08.2006 10:17 9 568 256 IKVM.GNU.Classpath.dll 19.02.2009 14:14 1 290 714 sample.pdf 12.10.2006 12:20 86 016 FontBox-0.1.0-dev.dll 10.08.2006 10:14 344 064 IKVM.Runtime.dll
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Why is it you all are able to load a PDFBox-0.7.x.dll into the GAC? Are you compiling your own PDFBox-0.7.x.dll with a .snk? If so, from what PDFBox-0.7.x.dll source? If not, where can I locate, for download, a strongly named PDFBox-0.7.[2 or 3 or whatever].dll?
I've tried PDFBox versions .2 and .3 and my gacutil.exe fails on adding either assembly to the cache.
But you guys appear to have no problem with that. I'm using .NET SDK v2.0.
BTW, is anybody even using the GAC? Or are you allowed to just drop these DLLs directly into a directory path and start compiling the PDF sample?
Thanks for any replies.
modified on Friday, December 26, 2008 8:10 PM
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
hello when i converting pdf file to text that display in othere font type
Amitkumar Prajapati Anjar(Kutch)/Baroda
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |