Tomáš Pulkrábek | 8 May 2008 15:44
Picon

image replacement

Hello,
I have pdf with two layers. First is a text and over it is an image.
I need a tool to extract an image from second layer, compress it and insert it
back and I need to do that in a batch mode.
Is this somehow possible with PDFedit? 
And if it is possible could you give me some advice or example how to do
that?

Thanks,
Tomas Pulkrabek

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Jozef Misutka | 9 May 2008 10:25
Picon
Favicon

Re: image replacement

hey tomas,

these are your options i can think of:

1) using original document and images

2) using pdfedit scripting language - it could be done using our scripting language but it would be too hardcoded for general purpose so you have to do it by yourself. see http://pdfedit.petricek.net/wiki/ScriptingAddNewScript

3) manually using gui - as we do not support direct image insertion you have to use another pdf editor

jozo


> From: 139908-IGZnsrowxP9fmBTHTHKXmQ@public.gmane.org
> To: pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Date: Thu, 8 May 2008 15:44:48 +0200
> Subject: [Pdfedit-support] image replacement
>
> Hello,
> I have pdf with two layers. First is a text and over it is an image.
> I need a tool to extract an image from second layer, compress it and insert it
> back and I need to do that in a batch mode.
> Is this somehow possible with PDFedit?
> And if it is possible could you give me some advice or example how to do
> that?
>
>
> Thanks,
> Tomas Pulkrabek
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Pdfedit-support mailing list
> Pdfedit-support <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Make Windows Vista more reliable and secure with Windows Vista Service Pack 1. Learn more.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
anonymous anonymous | 16 May 2008 05:32
Picon
Favicon

problems with man page, fonts, and Qt


I've successfully built PDFedit 0.4.1 from source on my LFS system (with freetype 2.3.5, fontconfig
2.5.0, XFree86 4.7, boost 1_35_0, t1lib 5.1.2, cppunit 1.12.1, qt 3.3.8), but a few problems are found :

1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).

2. When PDFedit is invoked from xterm, some errors are shown :
  > Error: No display font for 'Courier'
  > Error: No display font for 'Courier-Bold'
  > Error: No display font for 'Courier-BoldOblique'
  > Error: No display font for 'Courier-Oblique'
  > Error: No display font for 'Helvetica'
  > Error: No display font for 'Helvetica-Bold'
  > Error: No display font for 'Helvetica-BoldOblique'
  > Error: No display font for 'Helvetica-Oblique'
  > Error: No display font for 'Symbol'
  > Error: No display font for 'Times-Bold'
  > Error: No display font for 'Times-BoldItalic'
  > Error: No display font for 'Times-Italic'
  > Error: No display font for 'Times-Roman'
  > Error: No display font for 'ZapfDingbats'
  It seems that my system does not have the required fonts. The only fonts on my system are those come with
XFree86 (under /usr/X11/lib/X11/fonts/*) and "Trebuchet MS" (for use with WindowMaker, under
/usr/share/fonts/*). Where can I get the fonts for use with PDFedit ?

3. In a PDFedit session, I toggle the "Highlighting text" button and then click on some text in the document,
the selected text become black boxes, and the xterm console shows :
  > QString::arg(): Argument missing: highlightingSelectedText(), 0
  > QString::arg(): Argument missing: highlightingSelectedText(), 0
  > QString::arg(): Argument missing: highlightingSelectedText(), 0
  > QString::arg(): Argument missing: highlightingSelectedText(), 0
  > QString::arg(): Argument missing: highlightingSelectedText(), 449
  > QString::arg(): Argument missing: highlightingSelectedText(), 459
   I don't understand these errors.

A problem report similar to question 2 is found in the mailing-list archive, but it does not help for my case.
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Jozef Misutka | 16 May 2008 07:49
Picon
Favicon

Re: problems with man page, fonts, and Qt

hey,
 
see my comment below.

> From: anctop-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
> To: pdfedit-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Date: Fri, 16 May 2008 11:32:35 +0800
> Subject: [Pdfedit-support] problems with man page, fonts, and Qt
>
>
> I've successfully built PDFedit 0.4.1 from source on my LFS system (with freetype 2.3.5, fontconfig 2.5.0, XFree86 4.7, boost 1_35_0, t1lib 5.1.2, cppunit 1.12.1, qt 3.3.8), but a few problems are found :
>
> 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).
>
> 2. When PDFedit is invoked from xterm, some errors are shown :
> > Error: No display font for 'Courier'
> > Error: No display font for 'Courier-Bold'
> > Error: No display font for 'Courier-BoldOblique'
> > Error: No display font for 'Courier-Oblique'
> > Error: No display font for 'Helvetica'
> > Error: No display font for 'Helvetica-Bold'
> > Error: No display font for 'Helvetica-BoldOblique'
> > Error: No display font for 'Helvetica-Oblique'
> > Error: No display font for 'Symbol'
> > Error: No display font for 'Times-Bold'
> > Error: No display font for 'Times-BoldItalic'
> > Error: No display font for 'Times-Italic'
> > Error: No display font for 'Times-Roman'
> > Error: No display font for 'ZapfDingbats'
> It seems that my system does not have the required fonts. The only fonts on my system are those come with XFree86 (under /usr/X11/lib/X11/fonts/*) and "Trebuchet MS" (for use with WindowMaker, under /usr/share/fonts/*). Where can I get the fonts for use with PDFedit ?
 
 
xpdf tries to look for fonts in these directories.
 
  "/usr/share/ghostscript/fonts",
  "/usr/local/share/ghostscript/fonts",
  "/usr/share/fonts/default/Type1",
  "/usr/share/fonts/default/ghostscript",
  "/usr/share/fonts/type1/gsfonts",

try to copy your fonts into one of them. please, inform us if it helped. thx.
 
jozo
 

>
> 3. In a PDFedit session, I toggle the "Highlighting text" button and then click on some text in the document, the selected text become black boxes, and the xterm console shows :
> > QString::arg(): Argument missing: highlightingSelectedText(), 0
> > QString::arg(): Argument missing: highlightingSelectedText(), 0
> > QString::arg(): Argument missing: highlightingSelectedText(), 0
> > QString::arg(): Argument missing: highlightingSelectedText(), 0
> > QString::arg(): Argument missing: highlightingSelectedText(), 449
> > QString::arg(): Argument missing: highlightingSelectedText(), 459
> I don't understand these errors.
>
> A problem report similar to question 2 is found in the mailing-list archive, but it does not help for my case.
> _________________________________________________________________
> Explore the seven wonders of the world
> http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
>


Stay in touch when you're away with Windows Live Messenger. IM anytime you're online.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Michal Hocko | 16 May 2008 09:14
Picon

Re: problems with man page, fonts, and Qt

On Fri, May 16, 2008 at 11:32:35AM +0800, anonymous anonymous wrote:
> 
> I've successfully built PDFedit 0.4.1 from source on my LFS system (with freetype 2.3.5, fontconfig
2.5.0, XFree86 4.7, boost 1_35_0, t1lib 5.1.2, cppunit 1.12.1, qt 3.3.8), but a few problems are found :
> 
> 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).

Are you trying to run from fresh compiled source tree or you have done
make install and run it from system dir?

Can you send me config.{status,log}, Makefile.flags.

> 
> 2. When PDFedit is invoked from xterm, some errors are shown :
[...]
> 
> 3. In a PDFedit session, I toggle the "Highlighting text" button and then click on some text in the
document, the selected text become black boxes, and the xterm console shows :
>   > QString::arg(): Argument missing: highlightingSelectedText(), 0
>   > QString::arg(): Argument missing: highlightingSelectedText(), 0
>   > QString::arg(): Argument missing: highlightingSelectedText(), 0
>   > QString::arg(): Argument missing: highlightingSelectedText(), 0
>   > QString::arg(): Argument missing: highlightingSelectedText(), 449
>   > QString::arg(): Argument missing: highlightingSelectedText(), 459
>    I don't understand these errors.

Seems like problem in the highlighting script. I have filed it as bug
248 (see http://pdfedit.petricek.net/bt/view.php?id=248).

Thanks for reporting
--

-- 
Michal Hocko

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
anonymous anonymous | 16 May 2008 17:06
Picon
Favicon

Re: problems with man page, fonts, and Qt


>      Re: [Pdfedit-support] problems with man page, fonts, and Qt
>      From: Jozef Misutka  - 2008-05-16 05:49
>
>      hey,
>
>      see my comment below.
>
>      xpdf tries to look for fonts in these directories.
>
>      "/usr/share/ghostscript/fonts", "/usr/local/share/ghostscript/fonts",
"/usr/share/fonts/default/Type1",>"/usr/share/fonts/default/ghostscript", "/usr/share/fonts/type1/gsfonts",
>      try to copy your fonts into one of them. please, inform us if it helped. thx.
>
>      jozo

Indeed I have ghostscript installed, but in a non-standard location. Following your instructions, I
linked the gs-fonts under /usr/share/ghostscript/fonts, then it works !
Since I'm using a LFS system, I'd like to ask if there's any way to specify a different fonts search path for
xpdf ?

>      Re: [Pdfedit-support] problems with man page, fonts, and Qt
>      From: Michal Hocko  - 2008-05-16 07:14
>
>   > 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).
>
>      Are you trying to run from fresh compiled source tree or you have done
>      make install and run it from system dir?
>
>      Can you send me config.{status,log}, Makefile.flags.

I have done "make install" and run $PREFIX/bin/pdfedit.
Attached please find the config.* and Makefile.flags files generated by running "sh ./configure --enable-kernel-tests".

>   > 3. In a PDFedit session,  ......
>
>      Seems like problem in the highlighting script. I have filed it as bug
>      248 (see http://pdfedit.petricek.net/bt/view.php?id=248).

Thanks for your information.

_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
Attachment (config.log): application/octet-stream, 36 KiB
Attachment (config.status): application/octet-stream, 26 KiB
Attachment (Makefile.flags): application/octet-stream, 5768 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Michal Hocko | 18 May 2008 12:15
Picon

Re: problems with man page, fonts, and Qt

On Fri, May 16, 2008 at 11:06:24PM +0800, anonymous anonymous wrote:
[...]
> >      Re: [Pdfedit-support] problems with man page, fonts, and Qt
> >      From: Michal Hocko  - 2008-05-16 07:14
> >
> >   > 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).
> >
> >      Are you trying to run from fresh compiled source tree or you have done
> >      make install and run it from system dir?
> >
> >      Can you send me config.{status,log}, Makefile.flags.
> 
> I have done "make install" and run $PREFIX/bin/pdfedit.
> Attached please find the config.* and Makefile.flags files generated by running "sh ./configure --enable-kernel-tests".

I have checked log files and everything seems to be ok (at least from
the configure POV). 

The problem seems to be in man page file generation done by
doc/tools/docbook2man.pl. Do you have perl installed on your box?
If you have perl installed could you try:
cd PDFEDIT_SRC_ROOT/doc && make doc_man
and send me the output.

Thanks and best regards
--

-- 
Michal Hocko

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
anonymous anonymous | 19 May 2008 02:49
Picon
Favicon

Re: problems with man page, fonts, and Qt


> Re: [Pdfedit-support] problems with man page, fonts, and Qt
> From: Michal Hocko  - 2008-05-18 10:15
> On Fri, May 16, 2008 at 11:06:24PM +0800, anonymous anonymous wrote:
> [...]
>>> Re: [Pdfedit-support] problems with man page, fonts, and Qt
>>> From: Michal Hocko - 2008-05-16 07:14
>>>
>>>> 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).
>>>
>>> Are you trying to run from fresh compiled source tree or you have done
>>> make install and run it from system dir?
>>>
>>> Can you send me config.{status,log}, Makefile.flags.
>>
>> I have done "make install" and run $PREFIX/bin/pdfedit.
>> Attached please find the config.* and Makefile.flags files generated by running "sh ./configure --enable-kernel-tests".
> 
> I have checked log files and everything seems to be ok (at least from
> the configure POV).
> 
> The problem seems to be in man page file generation done by
> doc/tools/docbook2man.pl. Do you have perl installed on your box?
> If you have perl installed could you try:
> cd PDFEDIT_SRC_ROOT/doc && make doc_man
> and send me the output.
> 
> Thanks and best regards
> -- 
> Michal Hocko

Thank you for your hint. Since my perl is not installed as "usr/bin/perl", this causes the failure. I've
made the appropriate link and it produces the correct man page.

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Michal Hocko | 19 May 2008 08:57
Picon

Re: problems with man page, fonts, and Qt

On Mon, May 19, 2008 at 2:49 AM, anonymous anonymous
<anctop@...> wrote:
>
>> Re: [Pdfedit-support] problems with man page, fonts, and Qt
>> From: Michal Hocko  - 2008-05-18 10:15
>> On Fri, May 16, 2008 at 11:06:24PM +0800, anonymous anonymous wrote:
>> [...]
>>>> Re: [Pdfedit-support] problems with man page, fonts, and Qt
>>>> From: Michal Hocko - 2008-05-16 07:14
>>>>
>>>>> 1. The man page installed $MANDIR/man1/pdfedit.1 is empty (zero size).
>>>>
>>>> Are you trying to run from fresh compiled source tree or you have done
>>>> make install and run it from system dir?
>>>>
>>>> Can you send me config.{status,log}, Makefile.flags.
>>>
>>> I have done "make install" and run $PREFIX/bin/pdfedit.
>>> Attached please find the config.* and Makefile.flags files generated by running "sh ./configure --enable-kernel-tests".
>>
>> I have checked log files and everything seems to be ok (at least from
>> the configure POV).
>>
>> The problem seems to be in man page file generation done by
>> doc/tools/docbook2man.pl. Do you have perl installed on your box?
>> If you have perl installed could you try:
>> cd PDFEDIT_SRC_ROOT/doc && make doc_man
>> and send me the output.
>>
>> Thanks and best regards
>
> Thank you for your hint. Since my perl is not installed as "usr/bin/perl", this causes the failure. I've
made the appropriate link and it produces the correct man page.

Ok. I have posted a patch (to our devel mailing list) which moves man
page generation to the distribution tarball creation time.
It is definitely a good idea to have building time dependency on perl
IMO.

Thanks again for testing and reporting
Best regards
--

-- 
Michal Hocko

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Lin Jian | 25 May 2008 10:43
Picon

Maybe a bug between PDFedit and Foxit Reader.

I slightly modified a PDF file with PDFedit 0.4.1 in Linux.
I can read it correctly with Adobe Reader in Windows, but if I open it
with Foxit Reader 2.3, I see the old version before modified.
I thought it is a cached version in Foxit Reader, but when I open it
with Foxit Reader on another computer, it also shows the unmodified
version.
I think it is a bug of PDFedit or Foxit Reader.
Thanks.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane