Hello All,
Small question regarding the way things are being written to
file in PdfDocument.
For now the way I put images into my document is pretty much as
follows:
PdfDocument document;
document.SetPdfVersion(ePdfVersion_1_6);
...
PdfPage* pPage = document.CreatePage(rSize);
PdfPainter painter;
painter.SetPage( pPage );
while(i < ...)
{
Image imgChunk = GetNextChunk();
PdfMemoryInputStream pStream
(imgChunk.GetBuffer(),imgChunk.GetSizeInBytes());
PdfImage pImage(&document);
pImage.SetImageData (imgChunk.width, imgChunk.height, 8,
&pStream);
painter.DrawImage (0, i, &pImage, 1.0, 1.0);
i += imgChunk.height;
}
painter.FinishPage();
document.Write (fname);
This work fine, however it means I hold the document in memory
till I call the Write() function to flush it down to file.
This can pose a problem when images chunks are numerous and
quite big.
What I would really like is a way to flush each chunk to file
within the loop, right after DrawImage by the painter i.e. a way to
write the current object without any need to wait till the page is
finished.
Is it possible?
Many Thanks!
Jonathan
-------------------------------------------------------------------------
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