[poppler] [KPDF-PATCH] Display some pages
Kristian Høgsberg
krh at bitplanet.net
Thu Mar 31 07:09:07 PST 2005
Albert Astals Cid wrote:
> Will i be able to do something like
>
> // list contains 1, 5 and 6
>
> psFile = new PopplerPSFile("boom.ps");
> for (iterator it = list.begin(); it != list.end(); ++it)
> {
> p = doc->getPage(*it);
> p->renderToPS(psFile);
> delete p;
> }
Yeah, assuming *it evaluates to an integer (I'm not too familiar with
the STL) this is how I imagine you would print a subset of pages.
> ? If that is (will be) possible that is fine for me, but can you print like
> that to a PS file? I mean i think you have to know the number of pages before
> beginning to generate the output, or not?
Uh, maybe... I don't know, actually, but in that case we PSFile
constructor will just have to take the number of pages as an argument.
In that case, before you create the PSFile, you'll have to count your
pages first.
cheers,
Kristian
> Albert
>
> A Dijous 31 Març 2005 09:22, vàreu escriure:
>
>>Albert Astals Cid wrote:
>>
>>>We use that method along with PSOutputDev when the user wants to print
>>>page 1, 5 and 7 for example.
>>
>>Hi Albert,
>>
>>I'm thinking that we won't need this in poppler, it will be easy enough
>>to implement this functionality in the viewer. I imagine the API that
>>we'll provide will be something like this:
>>
>> psFile = new PopplerPSFile("boom.ps");
>> p = doc->getPage(n);
>> p->renderToPS(psFile);
>> delete p;
>>
>>with which the "print odd pages" feature should be easy enough to
>>implement.
>>
>>cheers,
>>Kristian
>
>
>
More information about the poppler
mailing list