Thomas Spahni | 2 Sep 2009 14:20
Picon
Favicon

Save file as text from the command line

Hello

I'm a new subscriber on this list; greetings to everyone.

I have a bash script which at some point should translate a PDF file to 
plain text. Let's say we have foobar.pdf and want to convert it to 
foobar.txt. I can do this from the GUI but I'm unable to figure out what 
the command should be to do the same from the command line.

Yes, I read the docs, manpage, wiki, archives, but still no luck. Yor help 
would be very much appreciated.

Details: PDFedit 0.4.2 from the SuSE-11.1 packman repo.

Best ragards,
Tom

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Alister Hood | 4 Sep 2009 02:45

Re: Save file as text from the command line

Sorry if someone else replied and I missed it.
I don't know how to do this with pdfedit, but you could alternatively
try the pdftotext tool from xpdf, or pdftohtml if that is more suitable
for your purpose.

Alister

-----Original Message-----
From: Thomas Spahni [mailto:tsp@...] 
Sent: Thursday, 3 September 2009 12:21 a.m.
To: pdfedit-support@...
Subject: [Pdfedit-support] Save file as text from the command line

Hello

I'm a new subscriber on this list; greetings to everyone.

I have a bash script which at some point should translate a PDF file to 
plain text. Let's say we have foobar.pdf and want to convert it to 
foobar.txt. I can do this from the GUI but I'm unable to figure out what

the command should be to do the same from the command line.

Yes, I read the docs, manpage, wiki, archives, but still no luck. Yor
help 
would be very much appreciated.

Details: PDFedit 0.4.2 from the SuSE-11.1 packman repo.

Best ragards,
(Continue reading)

Jozef Misutka | 4 Sep 2009 21:52
Picon
Favicon

Re: Save file as text from the command line


hi,

i changed the algorithm of pdftotext a bit but it is far from what i would like it to be. nevertheless, i can
provide you with source code of you tool using our pdfedit library extract text function but you would have
to compile it by your own. will it help?

/jozo

----------------------------------------
> Date: Fri, 4 Sep 2009 11:52:46 +0200
> From: tsp@...
> To: pdfedit-support@...
> Subject: Re: [Pdfedit-support] Save file as text from the command line
>
> On Fri, 4 Sep 2009, Alister Hood wrote:
>
>> Sorry if someone else replied and I missed it.
>> I don't know how to do this with pdfedit, but you could alternatively
>> try the pdftotext tool from xpdf, or pdftohtml if that is more suitable
>> for your purpose.
>>
>> Alister
>
> I am currently using pdftotext in my script. However, it doesn't work
> well. That means, it drops a lot of spaces between words which makes the
> output almost unuseable. This may be a problem with the PDF-input, but
> I have no influence on this. For this reason I tried to use pdfedit and
> found, that it's much better: the output is perfect.
>
(Continue reading)

Thomas Spahni | 5 Sep 2009 13:04
Picon
Favicon

Re: Save file as text from the command line

Hi Jozef

That would certainly help a lot. And I would be happy to compile it 
myself and give it a try.

Thanks in advance.

Thomas

On Fri, 4 Sep 2009, Jozef Misutka wrote:

> hi,
>
> i changed the algorithm of pdftotext a bit but it is far from what i 
> would like it to be. nevertheless, i can provide you with source code of 
> you tool using our pdfedit library extract text function but you would 
> have to compile it by your own. will it help?
>
> /jozo
>
> ----------------------------------------
>> Date: Fri, 4 Sep 2009 11:52:46 +0200
>> From: tsp@...
>> To: pdfedit-support@...
>> Subject: Re: [Pdfedit-support] Save file as text from the command line
>>
>> On Fri, 4 Sep 2009, Alister Hood wrote:
>>
>>> Sorry if someone else replied and I missed it.
>>> I don't know how to do this with pdfedit, but you could alternatively
(Continue reading)

Michal Hocko | 5 Sep 2009 13:10
Picon

Re: Save file as text from the command line

On Fri, Sep 04, 2009 at 07:52:43PM +0000, Jozef Misutka wrote:
> 
> hi,
> 
> i changed the algorithm of pdftotext a bit but it is far from what i
> would like it to be. nevertheless, i can provide you with source code
> of you tool using our pdfedit library extract text function but you
> would have to compile it by your own. will it help?

Isn't this just overkill for something that is already scripted and it
is only matter how to call the script? Martin, could you help with this?

> 
> /jozo
> 
> ----------------------------------------
> > Date: Fri, 4 Sep 2009 11:52:46 +0200
> > From: tsp@...
> > To: pdfedit-support@...
> > Subject: Re: [Pdfedit-support] Save file as text from the command line
> >
> > On Fri, 4 Sep 2009, Alister Hood wrote:
> >
> >> Sorry if someone else replied and I missed it.
> >> I don't know how to do this with pdfedit, but you could alternatively
> >> try the pdftotext tool from xpdf, or pdftohtml if that is more suitable
> >> for your purpose.
> >>
> >> Alister
> >
(Continue reading)

Jozef Misutka | 5 Sep 2009 21:30
Picon
Favicon

Re: Save file as text from the command line



> Date: Sat, 5 Sep 2009 13:10:19 +0200
> From: mstsxfx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> To: pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [Pdfedit-support] Save file as text from the command line
>
> On Fri, Sep 04, 2009 at 07:52:43PM +0000, Jozef Misutka wrote:
> >
> > hi,
> >
> > i changed the algorithm of pdftotext a bit but it is far from what i
> > would like it to be. nevertheless, i can provide you with source code
> > of you tool using our pdfedit library extract text function but you
> > would have to compile it by your own. will it help?
>
> Isn't this just overkill for something that is already scripted and it

no, because it is definitely a useful tool.

will do it on monday as i am away from pc.

/jozo

> is only matter how to call the script? Martin, could you help with this?
>
> >
> > /jozo
> >
> > ----------------------------------------
> > > Date: Fri, 4 Sep 2009 11:52:46 +0200
> > > From: tsp-wsOeruteqgrtRgLqZ5aouw@public.gmane.org
> > > To: pdfedit-support <at> lists.sourceforge.net
> > > Subject: Re: [Pdfedit-support] Save file as text from the command line
> > >
> > > On Fri, 4 Sep 2009, Alister Hood wrote:
> > >
> > >> Sorry if someone else replied and I missed it.
> > >> I don't know how to do this with pdfedit, but you could alternatively
> > >> try the pdftotext tool from xpdf, or pdftohtml if that is more suitable
> > >> for your purpose.
> > >>
> > >> Alister
> > >
> > > I am currently using pdftotext in my script. However, it doesn't work
> > > well. That means, it drops a lot of spaces between words which makes the
> > > output almost unuseable. This may be a problem with the PDF-input, but
> > > I have no influence on this. For this reason I tried to use pdfedit and
> > > found, that it's much better: the output is perfect.
> > >
> > >>From the man page I can see that there is a command line mode. I found the
> > > script savealltext.qs on the wiki. But I can't figure out how to use this
> > > from the command line. I still guess it must be easy, but I have no
> > > success so far. Unfortunately I could not find any examples of how to use
> > > pdfedit in command line mode.
> > >
> > > Thomas
> > >
> > >
> > >> -----Original Message-----
> > >> From: Thomas Spahni [mailto:tsp-wsOeruteqgrtRgLqZ5aouw@public.gmane.org]
> > >> Sent: Thursday, 3 September 2009 12:21 a.m.
> > >> To: pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >> Subject: [Pdfedit-support] Save file as text from the command line
> > >>
> > >> Hello
> > >>
> > >> I'm a new subscriber on this list; greetings to everyone.
> > >>
> > >> I have a bash script which at some point should translate a PDF file to
> > >> plain text. Let's say we have foobar.pdf and want to convert it to
> > >> foobar.txt. I can do this from the GUI but I'm unable to figure out what
> > >>
> > >> the command should be to do the same from the command line.
> > >>
> > >> Yes, I read the docs, manpage, wiki, archives, but still no luck. Yor
> > >> help
> > >> would be very much appreciated.
> > >>
> > >> Details: PDFedit 0.4.2 from the SuSE-11.1 packman repo.
> > >>
> > >> Best ragards,
> > >> Tom
> > >>
> > >> ------------------------------------------------------------------------
> > >> ------
> > >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > >> 30-Day
> > >> trial. Simplify your report design, integration and deployment - and
> > >> focus on
> > >> what you do best, core application coding. Discover what's new with
> > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > >> _______________________________________________
> > >> Pdfedit-support mailing list
> > >> Pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >> https://lists.sourceforge.net/lists/listinfo/pdfedit-support
> > >>
> > >> ------------------------------------------------------------------------------
> > >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > >> trial. Simplify your report design, integration and deployment - and focus on
> > >> what you do best, core application coding. Discover what's new with
> > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > >> _______________________________________________
> > >> Pdfedit-support mailing list
> > >> Pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > >> https://lists.sourceforge.net/lists/listinfo/pdfedit-support
> > >>
> > >
> > > ------------------------------------------------------------------------------
> > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > > trial. Simplify your report design, integration and deployment - and focus on
> > > what you do best, core application coding. Discover what's new with
> > > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > > _______________________________________________
> > > Pdfedit-support mailing list
> > > Pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > https://lists.sourceforge.net/lists/listinfo/pdfedit-support
> >
> > _________________________________________________________________
> > With Windows Live, you can organize, edit, and share your photos.
> > http://www.windowslive.com/Desktop/PhotoGallery
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > trial. Simplify your report design, integration and deployment - and focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Pdfedit-support mailing list
> > Pdfedit-support-5NWGOfrQmncRDUWM+popnw@public.gmane.orgforge.net
> > https://lists.sourceforge.net/lists/listinfo/pdfedit-support
>
> --
> Michal Hocko
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Pdfedit-support mailing list
> Pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Windows Live: Make it easier for your friends to see what you’re up to on Facebook. Find out more.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Thomas Spahni | 6 Sep 2009 16:40
Picon
Favicon

Re: Save file as text from the command line

On Sat, 5 Sep 2009, Jozef Misutka wrote:

> > Date: Sat, 5 Sep 2009 13:10:19 +0200
> > From: mstsxfx@...
> > To: pdfedit-support@...
> > Subject: Re: [Pdfedit-support] Save file as text from the command line
> >
> > On Fri, Sep 04, 2009 at 07:52:43PM +0000, Jozef Misutka wrote:
> > >
> > > hi,
> > >
> > > i changed the algorithm of pdftotext a bit but it is far from what i
> > > would like it to be. nevertheless, i can provide you with source code
> > > of you tool using our pdfedit library extract text function but you
> > > would have to compile it by your own. will it help?
> >
> > Isn't this just overkill for something that is already scripted and it
> 
> no, because it is definitely a useful tool.
> 
> will do it on monday as i am away from pc.
> 
> /jozo

I agree. A better pdftotext would certainly be a benefit, as it could 
improve many existing scripts using it.

Nevertheless I would like to learn how to use pdfedit from the command 
line as well.

Thomas

> > is only matter how to call the script? Martin, could you help with this?
> >
> > >
> > > /jozo
> > >
> > > ----------------------------------------
> > > > Date: Fri, 4 Sep 2009 11:52:46 +0200
> > > > From: tsp@...
> > > > To: pdfedit-support@...
> > > > Subject: Re: [Pdfedit-support] Save file as text from the command line
> > > >
> > > > On Fri, 4 Sep 2009, Alister Hood wrote:
> > > >
> > > >> Sorry if someone else replied and I missed it.
> > > >> I don't know how to do this with pdfedit, but you could alternatively
> > > >> try the pdftotext tool from xpdf, or pdftohtml if that is more
> suitable
> > > >> for your purpose.
> > > >>
> > > >> Alister
> > > >
> > > > I am currently using pdftotext in my script. However, it doesn't work
> > > > well. That means, it drops a lot of spaces between words which makes
> the
> > > > output almost unuseable. This may be a problem with the PDF-input, but
> > > > I have no influence on this. For this reason I tried to use pdfedit
> and
> > > > found, that it's much better: the output is perfect.
> > > >
> > > >>From the man page I can see that there is a command line mode. I found
> the
> > > > script savealltext.qs on the wiki. But I can't figure out how to use
> this
> > > > from the command line. I still guess it must be easy, but I have no
> > > > success so far. Unfortunately I could not find any examples of how to
> use
> > > > pdfedit in command line mode.
> > > >
> > > > Thomas
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: Thomas Spahni [mailto:tsp@...]
> > > >> Sent: Thursday, 3 September 2009 12:21 a.m.
> > > >> To: pdfedit-support@...
> > > >> Subject: [Pdfedit-support] Save file as text from the command line
> > > >>
> > > >> Hello
> > > >>
> > > >> I'm a new subscriber on this list; greetings to everyone.
> > > >>
> > > >> I have a bash script which at some point should translate a PDF file
> to
> > > >> plain text. Let's say we have foobar.pdf and want to convert it to
> > > >> foobar.txt. I can do this from the GUI but I'm unable to figure out
> what
> > > >>
> > > >> the command should be to do the same from the command line.
> > > >>
> > > >> Yes, I read the docs, manpage, wiki, archives, but still no luck. Yor
> > > >> help
> > > >> would be very much appreciated.
> > > >>
> > > >> Details: PDFedit 0.4.2 from the SuSE-11.1 packman repo.
> > > >>
> > > >> Best ragards,
> > > >> Tom

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Asa Nathannael Hunt | 7 Sep 2009 00:17
Favicon

compiling for OS X

Has anyone ever managed to install successfully on OS X 10.5+ (Intel)? 
I'm not finding much in the way of howtos/guidance.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Michal Hocko | 7 Sep 2009 10:46
Picon

Re: compiling for OS X

Hi,

On Sun, Sep 06, 2009 at 03:17:57PM -0700, Asa Nathannael Hunt wrote:
> Has anyone ever managed to install successfully on OS X 10.5+ (Intel)? 
> I'm not finding much in the way of howtos/guidance.

I am not sure about the result, but I have tracked one attempt in our
bug tracking system http://pdfedit.petricek.net/bt/view.php?id=191.

> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Pdfedit-support mailing list
> Pdfedit-support@...
> https://lists.sourceforge.net/lists/listinfo/pdfedit-support

--

-- 
Michal Hocko

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Jozef Misutka | 7 Sep 2009 18:06
Picon
Favicon

Re: Save file as text from the command line


done,

check pdf_to_text.cpp in newest tools package in sourceforge downloads.
(tools-Win32-20090907_1746.zip) or 
http://pdfedit.cvs.sourceforge.net/viewvc/pdfedit/pdfedit/src/tests/tools/pdf_to_text.cc?revision=1.1&view=markup

/jozo

----------------------------------------
> Date: Sun, 6 Sep 2009 16:40:45 +0200
> From: tsp@...
> To: pdfedit-support@...
> Subject: Re: [Pdfedit-support] Save file as text from the command line
>
> On Sat, 5 Sep 2009, Jozef Misutka wrote:
>
>>> Date: Sat, 5 Sep 2009 13:10:19 +0200
>>> From: mstsxfx@...
>>> To: pdfedit-support@...
>>> Subject: Re: [Pdfedit-support] Save file as text from the command line
>>>
>>> On Fri, Sep 04, 2009 at 07:52:43PM +0000, Jozef Misutka wrote:
>>>>
>>>> hi,
>>>>
>>>> i changed the algorithm of pdftotext a bit but it is far from what i
>>>> would like it to be. nevertheless, i can provide you with source code
>>>> of you tool using our pdfedit library extract text function but you
>>>> would have to compile it by your own. will it help?
>>>
>>> Isn't this just overkill for something that is already scripted and it
>>
>> no, because it is definitely a useful tool.
>>
>> will do it on monday as i am away from pc.
>>
>> /jozo
>
> I agree. A better pdftotext would certainly be a benefit, as it could
> improve many existing scripts using it.
>
> Nevertheless I would like to learn how to use pdfedit from the command
> line as well.
>
> Thomas
>
>>> is only matter how to call the script? Martin, could you help with this?
>>>
>>>>
>>>> /jozo
>>>>
>>>> ----------------------------------------
>>>>> Date: Fri, 4 Sep 2009 11:52:46 +0200
>>>>> From: tsp@...
>>>>> To: pdfedit-support@...
>>>>> Subject: Re: [Pdfedit-support] Save file as text from the command line
>>>>>
>>>>> On Fri, 4 Sep 2009, Alister Hood wrote:
>>>>>
>>>>>> Sorry if someone else replied and I missed it.
>>>>>> I don't know how to do this with pdfedit, but you could alternatively
>>>>>> try the pdftotext tool from xpdf, or pdftohtml if that is more
>> suitable
>>>>>> for your purpose.
>>>>>>
>>>>>> Alister
>>>>>
>>>>> I am currently using pdftotext in my script. However, it doesn't work
>>>>> well. That means, it drops a lot of spaces between words which makes
>> the
>>>>> output almost unuseable. This may be a problem with the PDF-input, but
>>>>> I have no influence on this. For this reason I tried to use pdfedit
>> and
>>>>> found, that it's much better: the output is perfect.
>>>>>
>>>>>>From the man page I can see that there is a command line mode. I found
>> the
>>>>> script savealltext.qs on the wiki. But I can't figure out how to use
>> this
>>>>> from the command line. I still guess it must be easy, but I have no
>>>>> success so far. Unfortunately I could not find any examples of how to
>> use
>>>>> pdfedit in command line mode.
>>>>>
>>>>> Thomas
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Thomas Spahni [mailto:tsp@...]
>>>>>> Sent: Thursday, 3 September 2009 12:21 a.m.
>>>>>> To: pdfedit-support@...
>>>>>> Subject: [Pdfedit-support] Save file as text from the command line
>>>>>>
>>>>>> Hello
>>>>>>
>>>>>> I'm a new subscriber on this list; greetings to everyone.
>>>>>>
>>>>>> I have a bash script which at some point should translate a PDF file
>> to
>>>>>> plain text. Let's say we have foobar.pdf and want to convert it to
>>>>>> foobar.txt. I can do this from the GUI but I'm unable to figure out
>> what
>>>>>>
>>>>>> the command should be to do the same from the command line.
>>>>>>
>>>>>> Yes, I read the docs, manpage, wiki, archives, but still no luck. Yor
>>>>>> help
>>>>>> would be very much appreciated.
>>>>>>
>>>>>> Details: PDFedit 0.4.2 from the SuSE-11.1 packman repo.
>>>>>>
>>>>>> Best ragards,
>>>>>> Tom
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Pdfedit-support mailing list
> Pdfedit-support@...
> https://lists.sourceforge.net/lists/listinfo/pdfedit-support

_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Gmane