What I really need is the equivalent code in pdf for the following postscript
code (example):
newpath
10 10 moveto
10 50 lineto
50 50 lineto
50 10 lineto
Closepath
Clip
I called 'clip' directly without save-restore, this will clip all further
content to this rect.
Result will be a blank page (in original page size) with a rect somewhere where
we can see the content.
CropBox apparently will set the page size to the cropped rect which is not what
I need (my bad).
Furthermore, I do not need that only a part of the stream will be written to
file, it may be as well fully written but with the addition of the above
directive that indicates what part to render.
Is there a way to flush my code some how to podofo file? (some kind of
WriteString())?
Thanks
jonathan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pierre Marchand
Sent: Tuesday, October 23, 2007 8:16 PM
To: [email protected]
Subject: Re: [Podofo-users] Setting a Crop Box
Le Tuesday 23 October 2007 17:30:14 Jonathan Sibony, vous avez écrit :
> Hello,
>
> How do I set a Crop Box? (any painting will take place from that point
> only within the new clipping path).
> I see the PdfPage has a GetCropBox(), but how do I set one myself?
>
> Thanks in advance
> jonathan
extracted from podofoimpose.cpp
==================================================
PdfObject trimbox;
PdfRect trim(extraSpace, extraSpace, destWidth, destHeight);
trim.ToVariant(trimbox);
PdfPage * newpage = targetDoc->CreatePage ( PdfRect ( 0.0, 0.0, pw, ph ) );
newpage->GetObject()->GetDictionary().AddKey( PdfName("TrimBox"), trimbox);
==================================================
Would be the same for any box.
--
Pierre Marchand
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users