Re: [poppler] [Help] How can I compile poppler on win32 platform!

2009-11-26 Thread Shen Liang
http://lists.freedesktop.org/archives/poppler/2009-October/005187.html
It's said poppler can be compiled on mingw+cygwin. But I didn't try.
I've tried use mingw+sys on windows and mingw on ubuntu, but both failed.

2009/11/26 杨小勇 

> 公司要将产品迁移到win32平台上,所以才做这个事情, 刚开始编译了好几个产品, 现在卡在这个上面了, 我换vs2008试试
>
>
> 谢谢了
>
>
> On Thu, Nov 26, 2009 at 3:38 PM, Shen Liang  wrote:
>
>> 这个我就不清楚了,我最近也一直在linux下。
>> 原来我用VS2005成功编译过xpdf,应该和poppler基本一致。我试过用免费版的VS2003编译工具编译xpdf,没成功,好像少lib吧。
>>
>>
>> 2009/11/26 杨小勇 
>>
>>> When I try to compile the code , and I got this error
>>> --
>>> C:\cmp\poppler-0.12.0>nmake -f makefile.vc target=dbg
>>>
>>> Microsoft (R) 程序维护实用工具 7.10.3077 版
>>> 版权所有 (C) Microsoft Corporation。保留所有权利。
>>>
>>> NMAKE : fatal error U1073: 不知道如何生成“dbg\FixedPoint.obj”
>>> Stop.
>>> --
>>>
>>> I use visual stdio 2003 compiler.I git the poppler-0.12.0
>>>
>>> Am I use the wrong complier ? or lose some make files ?
>>>
>>>   Best Regrads!
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2009/11/26 杨小勇 
>>>
>>>> Thanks very much, I will try it
>>>> ..
>>>> Have a nice day
>>>>
>>>>
>>>>
>>>> On Thu, Nov 26, 2009 at 1:29 PM, Shen Liang wrote:
>>>>
>>>>> Mine is git from poppler-0.12. I attacked the file.
>>>>>
>>>>> 2009/11/26 杨小勇 
>>>>>
>>>>> 是这样的, 我有参考过这篇文档
>>>>>>
>>>>>> http://cgit.freedesktop.org/poppler/poppler/tree/README.windows 
>>>>>> <http://om.web.daili.my/browse.php/3e28f143/afdc9b60/Oi8vY2dp/dC5mcmVl/ZGVza3Rv/cC5vcmcv/cG9wcGxl/ci9wb3Bw/bGVyL3Ry/ZWUvUkVB/RE1FLndp/bmRvd3M_/3D/b1/>
>>>>>>
>>>>>> The msvc makefile is called 'makefile.vc' and you can compile poppler on 
>>>>>> command
>>>>>> line with: 'nmake -f makefile.vc TARGET=rel' (or TARGET=dbg).
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 但是我现在下载的版本是poppler-0.12.2,里面并没有makefile.vc这个文件
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Nov 26, 2009 at 1:07 PM, Shen Liang wrote:
>>>>>>
>>>>>>> I think you have to compile it by yourself. It shouldn't be TOO
>>>>>>> difficult with MS VS. Most people here just focus on *nix.
>>>>>>>
>>>>>>> On Thu, Nov 26, 2009 at 1:03 PM, 杨小勇  wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hi:
>>>>>>>> Any one can give me a link to download binary poppler for
>>>>>>>> windows or advice how to compile poppler for windows, will be a lot 
>>>>>>>> help to
>>>>>>>> me . Tks [?]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [+]---{+}
>>>>>>>> {+}--[+]
>>>>>>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>>>>>>
>>>>>>>> Eric_yang
>>>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>>>>>>
>>>>>>>> ___
>>>>>>>> poppler mailing list
>>>>>>>> poppler@lists.freedesktop.org
>>>>>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Help Si Chuan Students
>>>>>>> 帮助四川灾区学生
>>>>>>> www.sichuanteachers.org
>>>>>>> 四川教师志愿者组织
>>>>>>>
>>>>>>> www.openingsource.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [+]---{+}
>>>>>> {+}--[+]
>>>>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>>>>
>>>>>> Eric_yang
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Help Si Chuan Students
>>>>> 帮助四川灾区学生
>>>>> www.sichuanteachers.org
>>>>> 四川教师志愿者组织
>>>>>
>>>>> www.openingsource.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [+]---{+}
>>>> {+}--[+]
>>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>>
>>>> Eric_yang
>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>>
>>>
>>>
>>>
>>> --
>>> [+]---{+}
>>> {+}--[+]
>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>
>>> Eric_yang
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>
>>
>>
>>
>> --
>> Help Si Chuan Students
>> 帮助四川灾区学生
>> www.sichuanteachers.org
>> 四川教师志愿者组织
>>
>> www.openingsource.com
>>
>
>
>
> --
> [+]---{+}
> {+}--[+]
> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>
> Eric_yang
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织

www.openingsource.com
<<1E3.gif>>___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [Help] How can I compile poppler on win32 platform!

2009-11-25 Thread Shen Liang
这个我就不清楚了,我最近也一直在linux下。
原来我用VS2005成功编译过xpdf,应该和poppler基本一致。我试过用免费版的VS2003编译工具编译xpdf,没成功,好像少lib吧。

2009/11/26 杨小勇 

> When I try to compile the code , and I got this error
> --
> C:\cmp\poppler-0.12.0>nmake -f makefile.vc target=dbg
>
> Microsoft (R) 程序维护实用工具 7.10.3077 版
> 版权所有 (C) Microsoft Corporation。保留所有权利。
>
> NMAKE : fatal error U1073: 不知道如何生成“dbg\FixedPoint.obj”
> Stop.
> --
>
> I use visual stdio 2003 compiler.I git the poppler-0.12.0
>
> Am I use the wrong complier ? or lose some make files ?
>
>   Best Regrads!
>
>
>
>
>
>
> 2009/11/26 杨小勇 
>
>> Thanks very much, I will try it
>> ..
>> Have a nice day
>>
>>
>>
>> On Thu, Nov 26, 2009 at 1:29 PM, Shen Liang  wrote:
>>
>>> Mine is git from poppler-0.12. I attacked the file.
>>>
>>> 2009/11/26 杨小勇 
>>>
>>> 是这样的, 我有参考过这篇文档
>>>>
>>>> http://cgit.freedesktop.org/poppler/poppler/tree/README.windows 
>>>> <http://om.web.daili.my/browse.php/3e28f143/afdc9b60/Oi8vY2dp/dC5mcmVl/ZGVza3Rv/cC5vcmcv/cG9wcGxl/ci9wb3Bw/bGVyL3Ry/ZWUvUkVB/RE1FLndp/bmRvd3M_/3D/b1/>
>>>>
>>>> The msvc makefile is called 'makefile.vc' and you can compile poppler on 
>>>> command
>>>> line with: 'nmake -f makefile.vc TARGET=rel' (or TARGET=dbg).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 但是我现在下载的版本是poppler-0.12.2,里面并没有makefile.vc这个文件
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Nov 26, 2009 at 1:07 PM, Shen Liang wrote:
>>>>
>>>>> I think you have to compile it by yourself. It shouldn't be TOO
>>>>> difficult with MS VS. Most people here just focus on *nix.
>>>>>
>>>>> On Thu, Nov 26, 2009 at 1:03 PM, 杨小勇  wrote:
>>>>>
>>>>>>
>>>>>> Hi:
>>>>>> Any one can give me a link to download binary poppler for windows
>>>>>> or advice how to compile poppler for windows, will be a lot help to me . 
>>>>>> Tks
>>>>>> [?]
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [+]---{+}
>>>>>> {+}--[+]
>>>>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>>>>
>>>>>> Eric_yang
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>>>>
>>>>>> ___
>>>>>> poppler mailing list
>>>>>> poppler@lists.freedesktop.org
>>>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Help Si Chuan Students
>>>>> 帮助四川灾区学生
>>>>> www.sichuanteachers.org
>>>>> 四川教师志愿者组织
>>>>>
>>>>> www.openingsource.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [+]---{+}
>>>> {+}--[+]
>>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>>
>>>> Eric_yang
>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>>
>>>
>>>
>>>
>>> --
>>> Help Si Chuan Students
>>> 帮助四川灾区学生
>>> www.sichuanteachers.org
>>> 四川教师志愿者组织
>>>
>>> www.openingsource.com
>>>
>>
>>
>>
>> --
>> [+]---{+}
>> {+}--[+]
>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>
>> Eric_yang
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>
>
>
>
> --
> [+]---{+}
> {+}--[+]
> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>
> Eric_yang
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织

www.openingsource.com
<<1E3.gif>>___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [Help] How can I compile poppler on win32 platform!

2009-11-25 Thread Shen Liang
Mine is git from poppler-0.12. I attacked the file.

2009/11/26 杨小勇 

> 是这样的, 我有参考过这篇文档
>
> http://cgit.freedesktop.org/poppler/poppler/tree/README.windows 
> <http://om.web.daili.my/browse.php/3e28f143/afdc9b60/Oi8vY2dp/dC5mcmVl/ZGVza3Rv/cC5vcmcv/cG9wcGxl/ci9wb3Bw/bGVyL3Ry/ZWUvUkVB/RE1FLndp/bmRvd3M_/3D/b1/>
>
> The msvc makefile is called 'makefile.vc' and you can compile poppler on 
> command
> line with: 'nmake -f makefile.vc TARGET=rel' (or TARGET=dbg).
>
>
> 但是我现在下载的版本是poppler-0.12.2,里面并没有makefile.vc这个文件
>
>
>
>
>
> On Thu, Nov 26, 2009 at 1:07 PM, Shen Liang  wrote:
>
>> I think you have to compile it by yourself. It shouldn't be TOO difficult
>> with MS VS. Most people here just focus on *nix.
>>
>> On Thu, Nov 26, 2009 at 1:03 PM, 杨小勇  wrote:
>>
>>>
>>> Hi:
>>> Any one can give me a link to download binary poppler for windows or
>>> advice how to compile poppler for windows, will be a lot help to me . Tks
>>> [?]
>>>
>>>
>>>
>>> --
>>> [+]---{+}
>>> {+}--[+]
>>> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>>>
>>> Eric_yang
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>>>
>>> ___
>>> poppler mailing list
>>> poppler@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>
>>>
>>
>>
>> --
>> Help Si Chuan Students
>> 帮助四川灾区学生
>> www.sichuanteachers.org
>> 四川教师志愿者组织
>>
>> www.openingsource.com
>>
>
>
>
> --
> [+]---{+}
> {+}--[+]
> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>
> Eric_yang
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织

www.openingsource.com
<<1E3.gif>>

makefile.vc
Description: Binary data
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [Help] How can I compile poppler on win32 platform!

2009-11-25 Thread Shen Liang
I think you have to compile it by yourself. It shouldn't be TOO difficult
with MS VS. Most people here just focus on *nix.

On Thu, Nov 26, 2009 at 1:03 PM, 杨小勇  wrote:

>
> Hi:
> Any one can give me a link to download binary poppler for windows or
> advice how to compile poppler for windows, will be a lot help to me . Tks
> [?]
>
>
>
> --
> [+]---{+}
> {+}--[+]
> -=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=
>
> Eric_yang
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
>
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>
>


-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织

www.openingsource.com
<<1E3.gif>>___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] experience with poppler and windows (rgb/bgr problem)

2009-10-16 Thread Shen Liang
Hi Glenn,
Is it possible compile poppler with mingw in msys or compile win32 poppler
with mingw in Linux?


On Fri, Oct 16, 2009 at 7:43 PM, Glenn Ganz  wrote:

>  I build poopler with mingw in cygwin.
>
>
>
> Now it looks like there is a rgb / bgr problem there. I converted a pdf
> with pdftoppm and checked the result.
>
>
>
> I compile poppler on OS X and there is no problem (looks everthing fine).
>
>
>
> Please verify the original pdf http://www.myphpshop.net/original.pdf and
> compre the output from pdftoppm (i have converted the output file to png,
> because oft he filesize)
>
>
>
> http://www.myphpshop.net/windows.png
>
>
>
> Is there a bug in poppler or do i need to change some compiler stuff
> (defines, …)
>
>
>
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>
>


-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [PATCH] JPEG support for pdftoppm

2009-10-10 Thread Shen Liang

I got there errors for the last poppler from git

make[2]: *** No rule to make target `goo/ImgWriter.cc', needed by 
`ImgWriter.lo'. Stop.

make[2]: Leaving directory `/mnt/sda8/projects/poppler/poppler/goo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/sda8/projects/poppler/poppler'
make: *** [all] Error 2
s...@shen-laptop:/mnt/sda8/projects/poppler/poppler$ make
make all-recursive
make[1]: Entering directory `/mnt/sda8/projects/poppler/poppler'
Making all in goo
make[2]: Entering directory `/mnt/sda8/projects/poppler/poppler/goo'
make[2]: *** No rule to make target `goo/ImgWriter.cc', needed by 
`ImgWriter.lo'. Stop.

make[2]: Leaving directory `/mnt/sda8/projects/poppler/poppler/goo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/sda8/projects/poppler/poppler'
make: *** [all] Error 2


Leonard Rosenthol wrote:

You need the read the section on linearization in the PDF Reference/ISO
32000-1 as those are the files that have been prepared for use with "http
byte streaming".  You are going ot need to add the necessary code to Poppler
to read/parse/understand that information so that you can more reasonably
fetch the information necessary to quickly display the first chunk of info.

After that, then doing dynamic reads is more in line.  However, be aware
that when dealing with documents that use object streams, the complexity
goes up...

Leonard


On 10/8/09 7:49 PM, "Stefan Thomas"  wrote:

  

Hey,



Commited, fixed a small thing (virtual destructor needed) myself.
  
  

Woohoo! :)




Thanks for contributing! Stay around and code something else ;-)
  
  

I'm planning to add HTTP streaming support to poppler. Similar to the
way Adobe Reader does it. We need this functionality for a project, so I
can't promise my patch will be suitable for mainline poppler. But I'll
definitely post it and we'll see how hard it would be to get it ready
for prime time and whether there is even a demand for it.

My basic plan is to create a new class HttpStream, extending BaseStream,
adding libcurl as an optional dependency and just do partial requests
whenever a substream is created. That should work, but performance would
be dreadful. To improve it I would add a cache of some sort and some way
for higher level functions to request prefetching of larger chunks of
the file in advance.

If you have any thoughts on the matter or if there have been any
previous efforts towards this I'd love to hear it!

Cheers,

Stefan


___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler



  


___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Any one compile poppler with mingw for windows?

2009-09-10 Thread Shen Liang
For latest poppler from git, on Ubuntu, I do
./autogen --host=i586-mingw32msvc. Then I got:
..
checking for FREETYPE... yes
checking for FONTCONFIG... yes
checking for CAIRO... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking for sys/stat.h... (cached) yes
checking for cairo blend modes support... no
checking for POPPLER_GLIB... yes
checking for glib-mkenums... /usr/bin/glib-mkenums
checking for gtkdoc-check... no
checking for gtkdoc-rebase... no
checking for gtkdoc-mkpdf... no
checking whether to build gtk-doc documentation... no
checking for GDK... yes
checking for Qt headers... no
checking for Qt libraries... no
checking for POPPLER_QT4... no
checking for GTK_TEST... yes
checking for ABIWORD... yes
checking for LCMS... no
...

Then after make I got
checking for FREETYPE... yes
checking for FONTCONFIG... yes
checking for CAIRO... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking for sys/stat.h... (cached) yes
checking for cairo blend modes support... no
checking for POPPLER_GLIB... yes
checking for glib-mkenums... /usr/bin/glib-mkenums
checking for gtkdoc-check... no
checking for gtkdoc-rebase... no
checking for gtkdoc-mkpdf... no
checking whether to build gtk-doc documentation... no
checking for GDK... yes
checking for Qt headers... no
checking for Qt libraries... no
checking for POPPLER_QT4... no
checking for GTK_TEST... yes
checking for ABIWORD... yes
checking for LCMS... no
...


On Thu, Sep 10, 2009 at 7:53 PM, Vincent Torri  wrote:

>
>
> On Thu, 10 Sep 2009, Shen Liang wrote:
>
>  For poppler 0.10.5, it said can't find libfreetype.la.
>>
>
> add in LDFLAGS the path where freetype lib is installed
>
>  For latest poppler from git, on Ubuntu, I do ./configure
>> --host=i586-mingw32msvc as you told me.
>> I got
>>
>> ./configure: line 22478: syntax error near unexpected token `FREETYPE,'
>> ./configure: line 22478: `PKG_CHECK_MODULES(FREETYPE, freetype2,'
>> make: *** [config.status] Error 2
>>
>
> add in PKG_CONFIG_PATH the path where the freetype2.pc is and don't forget
> to update the 'prefix' variable in freetype.pc.
>
> Vincent Torri
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Any one compile poppler with mingw for windows?

2009-09-09 Thread Shen Liang
I got

cd . && /bin/sh /h/projects/poppler/poppler/missing --run autoconf
Can't locate object method "path" via package "Autom4te::Request" (perhaps
you forgot to load "Autom4te::Request"?) at /usr/bin/autom4te line 81.
make: *** [configure] Error 1

after autogen.sh and make with mingw+msys on windows.


On Thu, Sep 10, 2009 at 1:07 PM, Vincent Torri  wrote:

>
>
> On Thu, 10 Sep 2009, Shen Liang wrote:
>
>  Is it possible compile poppler with mingw+msys on windows or with mingw on
>> linux?
>> I git the latest source.
>> When I compiled with mingw+msys, I always got error about freetype.
>>
>
> which error ?
>
>  I installed mingw 32 on Ubuntu, and run:
>>
>> export CC=i586-mingw32msvc-gcc
>> export CXX=i586-mingw32msvc-g++
>> export LD=i586-mingw32msvc-ld
>> export AR=i586-mingw32msvc-ar
>> export AS=i586-mingw32msvc-as
>> export NM=i586-mingw32msvc-nm
>> export STRIP=i586-mingw32msvc-strip
>> export RANLIB=i586-mingw32msvc-ranlib
>> export DLLTOOL=i586-mingw32msvc-dlltool
>> export OBJDUMP=i586-mingw32msvc-objdump
>> export RC=i586-mingw32msvc-windres
>>
>> after autogen.sh, ./configure and make, I compiled successfully, but it's
>> still for linux not for windows.
>>
>
> don't export all those vars and run:
>
> ./configure --host=i586-mingw32msvc
>
> Be sure to have the required poppler dependencies for windows (the gnuwin32
> project has some, I think)
>
> Vincent Torri
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Poppler 0.12.0 fails to compile (Gfx.cc) due to undefined type uint

2009-09-09 Thread Shen Liang
I got

cd . && /bin/sh /h/projects/poppler/poppler/missing --run autoconf
Can't locate object method "path" via package "Autom4te::Request" (perhaps
you forgot to load "Autom4te::Request"?) at /usr/bin/autom4te line 81.
make: *** [configure] Error 1

after autogen.sh and make with mingw+msys on windows.



On Thu, Sep 10, 2009 at 5:25 AM, Albert Astals Cid  wrote:

> A Dimecres, 9 de setembre de 2009, BugByteMan va escriure:
> > Hello,
> >
> > Poppler 0.12.0 fails to compile on MinGW/Windows:
> >
> > Gfx.cc:296: error: 'uint' has not been declared
> > Gfx.cc: In function 'GBool isSameGfxColor(const GfxColor&, const
> GfxColor&,
> >  uint, double)': Gfx.cc:297: error: 'uint' was not declared in this scope
> >
> > I changed uint to Guint and now it compiles.
>
> Damn! It'll be on 0.12.1
>
> Albert
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>



-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] Any one compile poppler with mingw for windows?

2009-09-09 Thread Shen Liang
Is it possible compile poppler with mingw+msys on windows or with mingw on
linux?
I git the latest source.
When I compiled with mingw+msys, I always got error about freetype.

I installed mingw 32 on Ubuntu, and run:

export CC=i586-mingw32msvc-gcc
export CXX=i586-mingw32msvc-g++
export LD=i586-mingw32msvc-ld
export AR=i586-mingw32msvc-ar
export AS=i586-mingw32msvc-as
export NM=i586-mingw32msvc-nm
export STRIP=i586-mingw32msvc-strip
export RANLIB=i586-mingw32msvc-ranlib
export DLLTOOL=i586-mingw32msvc-dlltool
export OBJDUMP=i586-mingw32msvc-objdump
export RC=i586-mingw32msvc-windres

after autogen.sh, ./configure and make, I compiled successfully, but it's
still for linux not for windows.

-- 
Help Si Chuan Students
帮助四川灾区学生
www.sichuanteachers.org
四川教师志愿者组织
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] patch for pdftopng

2009-06-14 Thread Shen Liang
I merged pdftopng to pdftoppm. It works as "pdftoppm -png" now. Maybe
it should be something like "pdf2image" in the future and get more
format to support.

On Sun, Jun 7, 2009 at 6:15 AM, Albert Astals Cid wrote:
> A Divendres, 29 de maig de 2009, Shen Liang va escriure:
>> patch for pdftopng
>
> The SplashBitmap::writePNGFile implementation has lots of commented code
> (either remove it if not needed or uncomment it if needed) and also doesn't
> implement nor gives errors case splashModeMono8: and some others.
>
> Also pdftopng.cc is 99.01% similar to pdftoppm.cc it would be a great idea if
> the code was either merged in and splitted into a separate file. Having
> duplicate code is a nightmare when speaking of maintainership.
>
> Albert
>
>>
>> -- Forwarded message --
>> From: Shen Liang 
>> Date: Tue, May 26, 2009 at 12:47 PM
>> Subject: Re: [poppler] Fwd: Donate some codes for poppler
>> To: Albert Astals Cid 
>>
>>
>> I'm sorry I got a mistake on the attach.
>>
>> On Sat, May 23, 2009 at 5:57 PM, Albert Astals Cid  wrote:
>> > A Divendres, 22 de maig de 2009, Shen Liang va escriure:
>> >> I'd like to donate some codes for Poppler. I added pdftopng by
>> >> modifying pdftoppm. The codes were quit dirty now, and I will do more
>> >> later.
>> >
>> > Hi, thanks for contributing to poppler :-)
>> >
>> > Unfortunately the zip you attach is not correct.
>> >
>> > First for pdftopng you are attaching a shell scripts instead of the code.
>> >
>> > Second for already existing files like SplashBitmap.[cc|h] you should
>> > attach a diff file as generated by git diff if you use git or diff -u if
>> > you are working on released tarballs.
>> >
>> > Albert
>> >
>> > ___
>> > poppler mailing list
>> > poppler@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/poppler
>>
>> --
>> Help Si Chuan Students
>> 帮助四川灾区学生
>> https://match.sichuanteachers.org
>> 四川教师志愿者组织
>
>
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>



-- 
Help Si Chuan Students
帮助四川灾区学生
https://match.sichuanteachers.org
四川教师志愿者组织
--- /mnt/sda8/projects/poppler-0.10.0/splash/!SplashBitmap.cc	2008-09-20 22:08:50.0 +0800
+++ /mnt/sda8/projects/poppler-0.10.0/splash/SplashBitmap.cc	2009-06-14 17:19:20.0 +0800
@@ -30,6 +30,7 @@
 #include "SplashErrorCodes.h"
 #include "SplashBitmap.h"
 
+#include 
 //
 // SplashBitmap
 //
@@ -237,3 +238,83 @@
 Guchar SplashBitmap::getAlpha(int x, int y) {
   return alpha[y * width + x];
 }
+
+SplashError SplashBitmap::writePNGFile(char *fileName) {
+  FILE *f;
+  SplashColorPtr row, p;
+  int x, y;
+
+  if (!(f = fopen(fileName, "wb"))) {
+return splashErrOpenFile;
+  }
+  
+  png_byte color_type;
+  png_byte bit_depth;
+  png_byte interlace_type;
+
+  png_structp png_ptr;
+  png_infop info_ptr;
+
+  png_bytep row_pointers[height];
+  /* initialize stuff */
+  png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+  if (!png_ptr)
+  fprintf (stderr, "png_create_write_struct failed");
+
+  info_ptr = png_create_info_struct(png_ptr);
+  if (!info_ptr)
+  fprintf (stderr, "png_create_info_struct failed");
+
+  if (setjmp(png_jmpbuf(png_ptr)))
+  fprintf (stderr, "png_create_info_struct failed");
+
+  png_init_io(png_ptr, f);
+
+  /* write header */
+  if (setjmp(png_jmpbuf(png_ptr)))
+  fprintf (stderr, "Error during writing header");
+
+  bit_depth = 8;
+  color_type = PNG_COLOR_TYPE_RGB;
+  interlace_type = PNG_INTERLACE_ADAM7;//PNG_INTERLACE_NONE 
+
+  png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+  png_write_info(png_ptr, info_ptr);
+
+  switch (mode) {
+
+  case splashModeMono1:
+break;
+
+  case splashModeMono8:
+break;
+
+  case splashModeRGB8:
+row = data;
+
+for (y=0; y--- /mnt/sda8/projects/poppler/utils/pdftoppm.cc	2008-10-30 22:07:20.0 +0800
+++ /mnt/sda8/projects/poppler-0.10.0/utils/pdftoppm.cc	2009-06-14 17:45:15.0 +0800
@@ -47,6 +47,7 @@
 static int sz = 0;
 static GBool mono = gFalse;
 static GBool gray = gFalse;
+static GBool png = gFalse;
 static char enableFreeTypeStr[16] = "";
 static char antialiasStr[16] = &

[poppler] patch for pdftopng

2009-05-28 Thread Shen Liang
patch for pdftopng


-- Forwarded message --
From: Shen Liang 
Date: Tue, May 26, 2009 at 12:47 PM
Subject: Re: [poppler] Fwd: Donate some codes for poppler
To: Albert Astals Cid 


I'm sorry I got a mistake on the attach.

On Sat, May 23, 2009 at 5:57 PM, Albert Astals Cid  wrote:
> A Divendres, 22 de maig de 2009, Shen Liang va escriure:
>> I'd like to donate some codes for Poppler. I added pdftopng by
>> modifying pdftoppm. The codes were quit dirty now, and I will do more
>> later.
>
> Hi, thanks for contributing to poppler :-)
>
> Unfortunately the zip you attach is not correct.
>
> First for pdftopng you are attaching a shell scripts instead of the code.
>
> Second for already existing files like SplashBitmap.[cc|h] you should attach a
> diff file as generated by git diff if you use git or diff -u if you are
> working on released tarballs.
>
> Albert
>
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>



--
Help Si Chuan Students
帮助四川灾区学生
https://match.sichuanteachers.org
四川教师志愿者组织



-- 
Help Si Chuan Students
帮助四川灾区学生
https://match.sichuanteachers.org
四川教师志愿者组织
--- /media/disk-1/projects/poppler-0.10.0/splash/SplashBitmap.cc	2008-09-20 22:08:50.0 +0800
+++ /media/disk-1/projects/poppler-0.10.0/splash/SplashBitmap.cc	2008-11-30 14:48:10.0 +0800
@@ -30,6 +30,7 @@
 #include "SplashErrorCodes.h"
 #include "SplashBitmap.h"
 
+#include 
 //
 // SplashBitmap
 //
@@ -237,3 +238,108 @@
 Guchar SplashBitmap::getAlpha(int x, int y) {
   return alpha[y * width + x];
 }
+
+//To PNG
+SplashError SplashBitmap::writePNGFile(char *fileName) {
+  FILE *f;
+  SplashColorPtr row, p;
+  int x, y;
+
+  if (!(f = fopen(fileName, "wb"))) {
+return splashErrOpenFile;
+  }
+  
+  png_byte color_type;
+  png_byte bit_depth;
+  png_byte interlace_type;
+  
+  png_structp png_ptr;
+  png_infop info_ptr;
+
+  png_bytep row_pointers[height];
+  /* initialize stuff */
+  png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+  if (!png_ptr)
+  fprintf (stderr, "png_create_write_struct failed");
+
+  info_ptr = png_create_info_struct(png_ptr);
+  if (!info_ptr)
+  fprintf (stderr, "png_create_info_struct failed");
+
+  if (setjmp(png_jmpbuf(png_ptr)))
+  fprintf (stderr, "png_create_info_struct failed");
+
+  png_init_io(png_ptr, f);
+
+  /* write header */
+  if (setjmp(png_jmpbuf(png_ptr)))
+  fprintf (stderr, "Error during writing header");
+
+  bit_depth = 8;
+  color_type = PNG_COLOR_TYPE_RGB;
+  interlace_type = PNG_INTERLACE_ADAM7;
+//PNG_INTERLACE_NONE 
+
+  png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+  png_write_info(png_ptr, info_ptr);
+
+  switch (mode) {
+
+  case splashModeMono1:
+break;
+
+  case splashModeMono8:
+break;
+
+  case splashModeRGB8:
+    row = data;
+
+for (y=0; y//
//
// pdftopng.cc
//
// Copyright 2008 SHEN Liang
//
//

//#include 
#include 
#include "parseargs.h"
#include "goo/gmem.h"
#include "goo/GooString.h"
#include "GlobalParams.h"
#include "Object.h"
#include "PDFDoc.h"
#include "splash/SplashBitmap.h"
#include "splash/Splash.h"
#include "SplashOutputDev.h"
#include "config.h"

static int firstPage = 1;
static int lastPage = 0;
static int resolution = 150;
static GBool mono = gFalse;
static GBool gray = gFalse;
static char enableT1libStr[16] = "";
static char enableFreeTypeStr[16] = "";
static char antialiasStr[16] = "";
static char vectorAntialiasStr[16] = "";
static char ownerPassword[33] = "";
static char userPassword[33] = "";
static GBool quiet = gFalse;
static char cfgFileName[256] = "";
static GBool printVersion = gFalse;
static GBool printHelp = gFalse;

static ArgDesc argDesc[] = {
  {"-f",  argInt,  &firstPage, 0,
   "first page to print"},
  {"-l",  argInt,  &lastPage,  0,
   "last page to print"},
  {"-r",  argInt,  &resolution,0,
   "resolution, in DPI (default is 150)"},
  {"-mono",   argFlag, &mono,  0,
   "generate a monochrome PBM file"},
  {"-gray",   argFlag, &gray,  0,
   "generate a grayscale PGM fil