Re: [poppler] Linking Poppler to Code::Blocks

2013-04-30 Thread Jason Crain
On Thu, Apr 25, 2013 at 01:21:13PM +0200, Christopher Icely wrote:
 Hi Jason,
 
 That makes a bucket load of sense, I've been just linking to a generic
 libpoppler.dll.a file as opposed to the file you described -
 lipoppler-cpp.ddl.a.
 
 However the problem is, is that when I built codeblocks poppler project, it
 only created the libpoppler.dll.a and libpoppler-qt4.dll.a files. And
 while there is a cpp folder in the build directory it is only populated
 with folders that have to do with Cmake (CMakeFiles, cmake_install,
 CTestTestfile etc...).
 
 Do you have any idea why this might be the case? Is it for example that the
 C++ front end needs particular dependencies and if Cmake doesn't find them
 it doesn't build the C++ front end? If so do you know what the dependencies
 are for the C++ front end?
 
 Thank you for any help you can provide me.
 
 Kind regards
 Chris

Sorry for the delay.  I have been without internet access for a few
days.  Also, please send your replies to the mailing list.

I don't know why it didn't build libpoppler-cpp.dll for you.  I just
tried with CMake and CodeBlocks on Windows and it built the library.

Yes, if the dependencies are not available, or if ENABLE_CPP is
disabled, it will not build the CPP frontend.  The only dependency I
am aware of is Iconv.  CMake should state whether the 'cpp wrapper' is
being built when you configure it.


 On Mon, Apr 22, 2013 at 4:46 AM, Jason Crain ja...@aquaticape.us wrote:
 
  On Sat, Apr 20, 2013 at 08:20:42PM +0200, Christopher Icely wrote:
   Good Day All,
  
   Firstly, I do apologize if this is the incorrect forum in which to ask my
   questions however, I'm really at my wit's end with this problem and I was
   hoping one of you could perhaps help me.
  
   Basically I wish to write code that will allow me to extract annotations
   from PDFs. However, I'm yet to write any code as I've spent an inordinate
   amount of time in just getting Poppler built. These are the steps I've
   followed so far:
  
   {System specs: Windows 7, MinGW, CodeBlocks}
  
   1) I have a folder structure like so:
   C:\Users\Chris\Documents\Poppler\build\
   -poppler-0.22.2
   -poppler-0.22.2_Build
  
   The file poppler-0.22.2 is the unzipped source files while the
   poppler-0.22.2_Build file was made by the Cmake GUI with Cairo, JPEG,
  QT4
   and TIFF included. Furthermore, Cmake was instructed to generate a
   CodeBlocks - MinGW Makefiles.
  
   2) After the CodeBlocks project was generated by Cmake, the project was
   built in CodeBlocks and I was left with the following:
  
   C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2_Build\
   --CMakeFiles
   --cpp
   --poppler
   --qt4
   --test
   --utils
   --cmake_install.cmake
   --CMakeCache
   --config.h
   --CTestfile.cmake
   --libpoppler.dll
   --libpoppler.dll.a
   --Makefile
   --poppler.cbp
   --poppler.layout
  
   3) Now i need to link the poppler library to my project. Therefore in
   CodeBlocks I did the following:
  
   a)Settings-Compiler-Linker settings: Link libraries
   and I set the path to:
  
  C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2_Build\libpoppler.dll.a
  
   b)Then in  Settings-Compiler-Search directories-Linker
   I set the path to:
   C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2_Build\
  
   c)Then I set up the linking for my project:
   Project-Build Options-Linker settings
   and set the path to
  
  C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2_Build\libpoppler.dll.a
  
   d)And finally:
   Project-Build Options-Search directories-Linker
   and add the path:
   C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2_Build\
  
   4) I have now written the following code in my main.cpp just to see if
   everything works:
  
   1 : #include iostream
   2 : #include
  
  C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2\cpp\poppler-global.h
   3 : #include
  
  C:\Users\Chris\Documents\Poppler\build\poppler-0.22.2\cpp\poppler-document.h
   4 :
   5 : using namespace std;
   6 :
   7 : int main()
   8 : {
   9 :
   10:
   11:   const string dir =
   C:\\Users\\Chris\\Documents\\WorkForDad\\2013\\Pdf Automation\\Anotation
   Extraction\\Remuneration Report.pdf;
   12:
   13:poppler::document *doc = poppler::document::load_from_file(dir);
   14:
   15:return 0;
   16: }
  
   However, I get the following error in myBuild messages when I build the
   code:
  
  
   C:\Users\Chris\Documents\WorkForDad\2013\Pdf
   

[poppler] Java version of poppler

2013-04-30 Thread Thomas Freitag

Hi all!

Due to several requests here with no really response I know that there 
is no really need here, but nevertheless, I want to announce, that I 
successfully completed and regtested the porting of that part of poppler 
I need for my purpose to Java last weekend.


My cms-images.jar is not an executable but a library which contains methods
- to extract metadata
- modify metadata
- extract thumbnails
- repair structures
- extract PDF pages
In other words, pdfinfo, pdffont and pdfseparate can be done in pure 
Java. For this I ported over 80 % of poppler core code to Java. What is 
missing are the pure image streams like DCT and JPEG2000, font handling 
and some of the annotation stuff. And I ported only one output device, 
PlateScannerOutputDev, which is an extension to PreScanOutputDev, so 
that I can also extract informations about used plate names and 
colorants and if overprint is used, which is rarely used but very 
important in prepress area.


Here an example of the output of a small dump tool written using this 
library:


Dump ./010_ReadMe_Ghent_Output_Patch.pdf
dc:creator : Andy Psarianos
dc:description : Ghent Output Patches
dc:format : application/pdf
dc:rights : Copyright © 2007, Ghent PDF Workgroup (http://www.gwg.org). 
You are encouraged to use the test files as described in the associated 
documentation. However, these files remain the property of and are 
copyrighted by the Ghent PDF Workgroup. You are not allowed to change 
this file (including its name, content and metadata) in any way.
dc:subject : GWG,Ghent PDF Workgroup,Ghent Ouput 
Patches,Documentation,Patch 1.0

dc:title : Patch 1.0 — CMYK Overprint Test Documentation
img:CropBox : [0.00, 0.00, 595.28 792.00],[0.00, 0.00, 595.28 
792.00],[0.00, 0.00, 595.28 792.00],[0.00, 0.00, 595.28 792.00]
img:MediaBox : [0.00, 0.00, 595.28 792.00],[0.00, 0.00, 595.28 
792.00],[0.00, 0.00, 595.28 792.00],[0.00, 0.00, 595.28 792.00]
pdf:Keywords : GWG; Ghent PDF Workgroup; Ghent Ouput Patches; 
Documentation; Patch 1.0

pdf:PDFVersion : 1.6
pdf:Producer : Adobe PDF Library 7.0
pdf:Trapped : false
pdfx:GTS_PDFXConformance : PDF/X-3:2002
pdfx:GTS_PDFXVersion : PDF/X-3:2002
photoshop:CaptionWriter : Andy Psarianos, a...@feburman.co.uk
photoshop:ColorMode : CMYK
xmp:CreateDate : 2005-10-10T17:26:10.000Z
xmp:CreatorTool : Adobe InDesign CS2 (4.0.4)
xmp:MetadataDate : 2007-01-18T18:12:51Z
xmp:ModifyDate : 2007-01-18T18:12:51.000Z
xmpMM:DocumentID : adobe:docid:indd:d4032c63-670f-11da-8e2e-82fceca79e51
xmpMM:InstanceID : uuid:b2114939-23fd-f342-9e5c-c48aa66e67b4
xmpMM:RenditionClass : proof:pdf
xmpRights:Marked : true
xmpRights:WebStatement : http://www.gwg.org
xmpTPg:Colorants : 'PANTONE 2405 C' - CMYK(34.00, 100.00, 0.00, 0.00)
xmpTPg:Fonts : (MyriadPro-Semibold / Myriad Pro Light / Bold / Type 1C / 
null / false),(MyriadPro-Regular / Myriad Pro / Regular / Type 1C / null 
/ false),(Verdana / Verdana / Regular / Type 1C / null / 
false),(MyriadPro-SemiboldCond / Myriad Pro Light Cond / Bold Condensed 
/ Type 1C / null / false),(Verdana-Bold / Verdana / Bold / Type 1C / 
null / false)

xmpTPg:HasVisibleOverprint : true
xmpTPg:HasVisibleTransparency : false
xmpTPg:MaxPageSize : 595.28 x 792.00 point
xmpTPg:NPages : 4
xmpTPg:PlateNames : Cyan,Magenta,Yellow,Black,PANTONE 2405 C
done!

The name of the properties are XMP compliant, and the library also 
contains the XMP scheme which is parsable by the included XMPReader and 
writable by the XMPWriter, even if the scheme itself isn't used, the 
implementation was done with JAXB.
The cms-images.jar does not only support PDF (this was my last but not 
least supported format) but also JPG, TIFF and PNG in the moment. But 
because it is completely undocumented at the moment, I don't want to 
publish it as yet, but I plan to do it sometime this year. If anyone 
here about anybody who is interested in it in the meantime: he can 
contact me and I'll provide him the source code or anything else he need.


Cheers,
Thomas

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