[poppler] Creating PDF with poppler ?

Thomas Freitag Thomas.Freitag at kabelmail.de
Mon Dec 20 07:15:24 PST 2010


Hi all!

How I promised long time ago, here now a patch for the poppler writing 
routines and some new helper function, together with two small sample 
programs using them.

In merging the writer routines I encountered, that some of the problems 
I found are solved in the meantime. So, where they are solved, I left 
the code as it is, but manually merging could always cause new problems.

The main changes beside solving some smaller problems are that I make 
the most writer routines static, and that I add a new parameter 
numoffset. The reason for this is the small sample program pdfmerge, 
which merges several PDF to one bigger PDF, so there I have no PDFDoc 
object for the resulting PDF, and I have to change the num values of 
each single PDF.

The other small sample program I add is to do the other way round: 
Extract one or more pages from a multi page PDF to several one page PDFs.

I'm not an expert in configure, so I just attach the single main cc's. 
Building the programs is simular topdftotext, they need parseargs and 
the poppler library. So I would appreciate any help on this.

I think the patch together with the samples could make it easier to file 
samples for bugs, i.e. extracting only the page or pages which causes a 
regression, or merge several sample PDFs which causing regressions.

What are You thinking about it? Helpful or not?

Best regards,
Thomas

Am 28.10.2010 15:49, schrieb Jennings Jay:
>
> Hi poppler folks,
>
> I am looking for a C++ example that creates PDF files using the 
> poppler library.  I have poppler compiled (Windows XP / Visual Studio 
> 2008) and I have working examples that **read** a PDF, but I don't see 
> anything in the poppler codebase, documentation, or mailing-list 
> archives to show how to **create** a PDF.  My real goal is to create a 
> Geospatial PDF, but any kind of simple PDF creation example would 
> probably help a lot.   Thanks for the pointer.
>
> .........................................................**
>
> *Jay Jennings***
>
> Senior Software Engineer
>
> www.geoeye.com <http://www.geoeye.com>
>
> 703.480.4614
>
> jennings.jay at geoeye.com
>
> 21700 Atlantic Blvd. Dulles, VA 20166
>
> cid:image001.png at 01C9DE0A.57705A70 <http://www.geoeye.com/CorpSite>
>
> */Trusted Imagery Experts/*
>
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101220/9cf0adaf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 3626 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101220/9cf0adaf/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: writer.patch
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101220/9cf0adaf/attachment-0001.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pdfextract.cc
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101220/9cf0adaf/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pdfmerge.cc
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101220/9cf0adaf/attachment-0002.asc>


More information about the poppler mailing list