Re: [Podofo-users] Reg: Support Required

2015-08-21 Thread zyx
On Fri, 2015-08-21 at 07:07 +, Sriram Gopalan -ERS, HCL Tech wrote:
 Only the highlighted line take time. Whatever might be the page
 Number, the first use  of GetPage() takes time.

Hi,
did you try to debug what the GetPage() call does? I think it's much
easier than asking anyone else doing that for you.

I do not know, but I suppose (I think), that the first call reads the
page structure and caches it for later use. Kind of lazy reading. But
I neither debugged what the call does, nor read the sources. This is
just my idea.
Bye,
zyx

P.S.: Please pick one list alias and send only to that one. Your
message had been received twice here. Thanks.

-- 
http://www.litePDF.cz i...@litepdf.cz



--
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] PdfStream and PdfFilter documentation fixes

2015-08-21 Thread Matthew Brincke
Hi all,

I have attached a patch with clarifications, formatting
and typo fixes to PdfStream.h and PdfFilter.h (please
review them, if accepted, please apply). I only post this
late because I had problems with my Internet access, I'm sorry.

Best regards, mabriIndex: src/base/PdfStream.h
===
--- src/base/PdfStream.h	(revision 1676)
+++ src/base/PdfStream.h	(working copy)
@@ -81,7 +81,7 @@
 
 /** Set a binary buffer as stream data.
  *
- * Use PdfFilterFactory::CreateFilterList if you want to use the contents
+ * Use PdfFilterFactory::CreateFilterList() if you want to use the contents
  * of the stream dictionary's existing filter key.
  *
  *  \param szBuffer buffer containing the stream data
@@ -91,7 +91,7 @@
 void Set( const char* szBuffer, pdf_long lLen, const TVecFilters  vecFilters );
 
 /** Set a binary buffer as stream data.
- *  All data will be flate encoded.
+ *  All data will be Flate-encoded.
  *
  *  \param szBuffer buffer containing the stream data
  *  \param lLen length of the buffer
@@ -99,7 +99,7 @@
 void Set( const char* szBuffer, pdf_long lLen );
 
 /** Set a binary buffer whose contents are read from a PdfInputStream
- *  All data will be flate encoded.
+ *  All data will be Flate-encoded.
  * 
  *  \param pStream read stream contents from this PdfInputStream
  */
@@ -107,7 +107,7 @@
 
 /** Set a binary buffer whose contents are read from a PdfInputStream
  * 
- * Use PdfFilterFactory::CreateFilterList if you want to use the contents
+ * Use PdfFilterFactory::CreateFilterList() if you want to use the contents
  * of the stream dictionary's existing filter key.
  *
  *  \param pStream read stream contents from this PdfInputStream
@@ -115,21 +115,23 @@
  */
 void Set( PdfInputStream* pStream, const TVecFilters  vecFilters );
 
-/** Set a null-terminated char* buffer  as the streams contents.
+/** Set a null-terminated char* buffer as the stream's contents.
  *
  *  The string will be copied into a newly allocated buffer.
- *  \param pszString a zero terminated string buffer containing only ASCII text data
+ *  \param pszString a zero terminated string buffer containing only
+ * ASCII text data
  */
 inline void Set( const char* pszString );
 
-/** Sets raw data for this filter which is read from an input stream.
+/** Sets raw data for this stream which is read from an input stream.
  *  This method does neither encode nor decode the read data.
- *  The filters of the object are not modified and the data is expected to be
- *  encoded as stated by the /Filters key in the streams object.
+ *  The filters of the object are not modified and the data is expected
+ *  encoded as stated by the /Filters key in the stream's object.
  *
  *  \param pStream read data from this input stream
- *  \param lLenread excactly lLen bytes from the input stream
- * if lLen = -1 read until the end of the input stream was reached.
+ *  \param lLenread exactly lLen bytes from the input stream,
+ * if lLen = -1 read until the end of the input stream
+ * was reached.
  */
 void SetRawData( PdfInputStream* pStream, pdf_long lLen = -1 );
 
@@ -136,10 +138,10 @@
 /** Start appending data to this stream.
  *
  *  This method has to be called before any of the append methods.
- *  All appended data will be flate decoded!
+ *  All appended data will be Flate-encoded.
  *
- *  \param bClearExisting if true any existing stream contents will be
- * cleared.
+ *  \param bClearExisting if true any existing stream contents will
+ * be cleared.
  *
  *  \see Append
  *  \see EndAppend
@@ -149,13 +151,14 @@
 /** Start appending data to this stream.
  *  This method has to be called before any of the append methods.
  *
- * Use PdfFilterFactory::CreateFilterList if you want to use the contents
+ * Use PdfFilterFactory::CreateFilterList() if you want to use the contents
  * of the stream dictionary's existing filter key.
  *
  *  \param vecFilters a list of filters to use when appending data
- *  \param bClearExisting if true any existing stream contents will be cleared.
+ *  \param bClearExisting if true any existing stream contents will
+   be cleared.
  *  \param bDeleteFilters if true existing filter keys are deleted if an
- *empty list of filters is passed (required for SetRawData)
+ * empty list of filters is passed (required for SetRawData())
  *
  *  \see Append
  *  \see EndAppend
@@ -164,7 +167,7 @@
 
 /** Append a binary buffer to the current stream contents.
  *
- *  Make sure BeginAppend 

[Podofo-users] Reg: Support Required

2015-08-21 Thread Sriram Gopalan -ERS, HCL Tech
Hi,

We are using Podofo for inserting images into a PDF file.
It works as expected for most files but for some files we are facing issue:

The problem is when we use PdfDocument-getPage() after initializing an image, 
it takes huge time.
It takes time only for reading the first page after image initialization.

Please find the code snippet below:

PdfMemDocument *doc = new PdfMemDocument();
doc-Load(PDF_FILE);


PdfImage image(doc);
image.LoadFromJpeg(C:\\Users\\Public\\Pictures\\Sample Pictures\\desert.jpg);
page = doc-GetPage(1);
page = doc-GetPage(10);


Only the highlighted line take time. Whatever might be the page Number, the 
first use  of GetPage() takes time.

Request to share your support on the same.

Thanks  Rgds
Sriram K G




::DISCLAIMER::


The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.


--
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users