[Podofo-users] RFE: Open a document for an incremental update

2013-05-26 Thread zyx
Hello,
I'd like to Request For an Enhancement, to be able to open a document
for incremental updates - to add a new revision "at the end of the
existing file". The feature is not that complicated, according to PDF
specification, but its implementation can be tricky.

It would be a great feature of PoDoFo, with its initial implementation
for document signing. (That would be a killer feature for signatures,
because the current implementation breaks the signatures when one tries
to sign already signed document, while with signing as an incremental
update there would be no such problem. Some other similar libraries also
suffer of this problem when signing.) Nonetheless, I do not request this
only for signatures, because I believe the incremental updates will find
its usage also elsewhere.

What do PoDoFo developers think of this?

Bye,
Milan


--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Write vertical and gradient

2013-05-27 Thread zyx
On Mon, 2013-05-27 at 09:22 +0200, Juan Francisco González Navarro
wrote:

> IS there any way to write vertical? Now, I'm writing letter by
> letter using DrawText.

Hi,
I suppose from Dominik's response that you do not want a rotated text,
but writing text top-to-bottom, instead of left-to-right. I have an idea
on rotated text only (I'm not helpful here).

> 
> Where can i find an example to fill a rectangle with a gradient?

Try something like this:
-
void drawGradientRect(PdfDocument *document,
  PdfPainter *painter,
  double dx,
  double dy,
  double w,
  double h,
  bool horizontal,
  const PdfColor &colorFrom,
  const PdfColor &colorTo)
{
PdfAxialShadingPattern pattern(
dx,
dy,
horizontal ? dx + w : dx,
horizontal ? dy : dy + h,
colorFrom,
colorTo,
document);

painter->Save();
painter->SetShadingPattern(pattern);
painter->FillRect(dx, dy, w, h);
painter->Restore();
}

-
Bye,
Milan


--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] RFE: Open a document for an incremental update

2013-05-27 Thread zyx
On Mon, 2013-05-27 at 09:35 +0200, Dominik Seichter wrote:
> I fully agree. This would be a killer feature for signing existing
> document (a new podofotool comes to my mind).
> It should be an optional feature though, i.e. with an option to
> PdfMemDocument::Write where you can specify whether to rewrite or
> incremental update. 
> Also a PdfIncrementalUpdateWriter could be an option.

Hi,
nice. I think it's more complicated with respect of general incremental
updates (consider removal of objects/pages/resources/), but as a
starter for signing documents it may work as you suggested it.

> So, I am all in favour for such a new feature.

Will you look on it? :) I'm not that far on PoDoFo internals to try it
myself.
Bye,
Milan


--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] 0.9.2 linking errors

2013-05-31 Thread zyx
On Thu, 2013-05-30 at 20:36 +0300, dharma teja wrote:
> Hi,
> I have created static library of podofo 0.9.2 in 32 bit and when I use
> it in my project it shows me linking errors:
> LNK2001: unresolved external symbol
>  
> It occurs in PdfEncrypt.obj wit probably linking error to OpenSSL I
> have created my own static libraries for OpenSSL and used them during
> creation of podofo's static.

Hi,
just wondering, do you link the OpenSSL library into your own project
too? I would at least try that.
 
> Could anyone give me a clue on what might be the reason behing it, I
> have done several compilations and with failed results.
> The OpenSSL statics I have used are both ssleay.lib and libeay.lib

As far as I can tell, the libeay should be enough.
Bye,
Milan



--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Buffer overrun at PdfTokenizer::ReadString

2013-07-28 Thread zyx

Dne 16.7.2013 21:40, Dominik Seichter napsal(a):

Thanks for pointing this out. Are you able to provide a patch for this?
Is it enough to insert something like:
outLen = PDF_MAX(outLen, 16) ?

Hi,
the attached patch makes it survive (PDF referenec says how to pad and 
enlarge the buffer), but it doesn't fix AES decoder as such. I attached 
some test PDFs, created with PoDoFo. They have set "user" and "owner" 
passwords. The RC4 encrypted passwords are read correctly, at least when 
I check outStr at PdfEncryptRC4::Decrypt, but the same documents 
encrypted with AES show garbage at PdfEncryptAESV2::Decrypt. Acrobar 
Reader opens the files without any issue.

    Hope it helps,
zyx


encrypt-aesv2.pdf
Description: Adobe PDF document


encrypt-aesv3.pdf
Description: Adobe PDF document


encrypt-rc4v1-no-user-pass.pdf
Description: Adobe PDF document


encrypt-rc4v2.pdf
Description: Adobe PDF document
Index: src/podofo/base/PdfString.cpp
===
--- src/podofo/base/PdfString.cpp   (revision 119)
+++ src/podofo/base/PdfString.cpp   (working copy)
@@ -303,20 +303,20 @@ void PdfString::SetHexData( const char* 
 
 if( pEncrypt )
 {
-pdf_long outBufferLen = m_buffer.GetSize()-2 - 
pEncrypt->CalculateStreamOffset();
-PdfRefCountedBuffer outBuffer(outBufferLen);
+pdf_long outBufferLen = m_buffer.GetSize() - 2 - 
pEncrypt->CalculateStreamOffset();
+PdfRefCountedBuffer outBuffer(outBufferLen + 16 - (outBufferLen % 16));
 
 pEncrypt->Decrypt( reinterpret_cast(m_buffer.GetBuffer()),
static_cast(m_buffer.GetSize()-2),
   reinterpret_cast(outBuffer.GetBuffer()),
-  static_cast(outBuffer.GetSize()));
+  static_cast(outBufferLen));
 
 // Replace buffer with decrypted value
 m_buffer = outBuffer;
 }
 
 // Now check for the first two bytes, to see if we got a unicode string
-if( m_buffer.GetSize()-2 > 2 ) 
+if( m_buffer.GetSize() > 4 ) 
 {
m_bUnicode = (m_buffer.GetBuffer()[0] == 
static_cast(0xFE) && m_buffer.GetBuffer()[1] == static_cast(0xFF));

Index: src/podofo/base/PdfTokenizer.cpp
===
--- src/podofo/base/PdfTokenizer.cpp(revision 119)
+++ src/podofo/base/PdfTokenizer.cpp(working copy)
@@ -716,7 +716,7 @@ void PdfTokenizer::ReadString( PdfVarian
 if( pEncrypt )
 {
 pdf_long outLen = m_vecBuffer.size() - 
pEncrypt->CalculateStreamOffset();
-char * outBuffer = new char[outLen];
+char * outBuffer = new char[outLen + 16 - (outLen % 16)];
 pEncrypt->Decrypt( reinterpret_cast(&(m_vecBuffer[0])),
   static_cast(m_vecBuffer.size()),
   reinterpret_cast(outBuffer), 
outLen);
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] How to extract embedded file from pdf?

2013-09-22 Thread zyx
Dne 19.9.2013 10:19, Sebastian Haag napsal(a):
> I managed to embed a file (or file content/string) into a 
> PdfMemDocument. Now I want to extract it again and don´t find a way...
 Hi,
it's tricky, or slightly complicated. I do it through traversing the 
actual object hierarchy (see below, it asks for data of an attachment at 
index 'index').
 Bye, zyx

PdfNamesTree *names = document->GetNamesTree(false);
 if (names) {
 PdfObject *pObj = 
names->GetObject()->GetIndirectKey("EmbeddedFiles");
 if (pObj) {
 const PdfObject *kidsKey = pObj->GetIndirectKey("Kids");
 if (kidsKey) {
 const PdfArray &kids = kidsKey->GetArray();
 PdfArray::const_iterator kit, kend = kids.end();

 for (kit = kids.begin(); kit != kend; kit++) {
 const PdfObject *obj = &(*kit);
 if (obj->IsReference()) {
 obj = 
document->GetObjects()->GetObject(obj->GetReference());
 if (!obj) {
 continue;
 }
 }

 const PdfObject *namesKey = 
obj->GetIndirectKey("Names");
 if (namesKey) {
 const PdfArray &names = namesKey->GetArray();
 // pair of PdfString/PdfObject, thus divide 
by two
 if (names.GetSize() / 2 > index) {
 PdfArray::const_iterator nit, nend = 
names.end();
 for (nit = names.begin(); nit != nend;) {
 if (index == 0) {
 nit++;

 pdf_int64 streamSize = 0;
 const PdfStream *stream = NULL;

 obj = &(*nit);
 if (obj->IsReference()) {
 obj = 
document->GetObjects()->GetObject(obj->GetReference());
 }

 if (obj) {
 const PdfDictionary &dict = 
obj->GetDictionary();
 if (dict.HasKey("Type") &&
  dict.GetKey("Type")->GetName() == PdfName("Filespec") &&
  dict.HasKey("EF") &&
  dict.GetKey("EF")->GetDictionary().HasKey("F")) {
 obj = 
dict.GetKey("EF")->GetDictionary().GetKey("F");
 if (obj && 
obj->IsReference()) {
 obj = 
document->GetObjects()->GetObject(obj->GetReference());
 }
 } else {
 obj = NULL;
 }
 }

 if (obj) {
 const PdfDictionary &dict = 
obj->GetDictionary();
 if (dict.HasKey("Type") &&
  dict.GetKey("Type")->GetName() == PdfName("EmbeddedFile") &&
  dict.HasKey("Params") &&
  dict.GetKey("Params")->GetDictionary().HasKey("Size") &&
  dict.GetKey("Params")->GetDictionary().GetKey("Size")->IsNumber() &&
  obj->HasStream()) {
 // get the stream
 streamSize = 
dict.GetKey("Params")->GetDictionary().GetKey("Size")->GetNumber();
 stream = obj->GetStream();
 }
 }

 if (!obj) {
 // Failed to get embedded 
file object
 return FALSE;
 }

 if (!stream) {
 // Failed to get embedded 
file stream
 return FALSE;
 }

 char *buff = NULL

Re: [Podofo-users] Buffer overrun at PdfTokenizer::ReadString

2013-09-29 Thread zyx
Dne 28.7.2013 19:54, Dominik Seichter napsal(a):
> Thanks for your patch. I committed it to SVN. At least we do not crash
> now anymore.

Hi,
I did some testing and the problem is that PdfEncryptAESV3::Decrypt uses 
m_encryptionKey which contains all zeros, but calling
 if (ok)
GenerateEncryptionKey("");
in PdfEncryptAESV3::Authenticate() is not enough (even it generates the 
same key on a document load), because the decrypt as such fails.
I guess it's due to initialization vectors ('iv' in 
PdfEncryptAESBase::AES()), though I'm not able to properly decrypt the 
data directly in PdfEncryptAESV3::Encrypt().

I admit I have no idea how AES should work in PDF (and in general too).

pzent, could you follow-up on your commit [1], please? Or maybe Dominik?
Thanks and bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1512/

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Bug in PdfPainter::SetLineJoinStyle ?

2013-10-11 Thread zyx
On Thu, 2013-10-10 at 16:06 -0700, Michael Gibson wrote:
> Looks like PdfPainter::SetLineJoinStyle is missing a space so it emits an
> invalid token like 1j instead of 1 j

Hi,
you are right, there's a bug in that function. I made the same change
within commit [1] in a separate branch some time ago.
Bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1534


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] how to create a pdf without flateEncoded(zlib)

2013-10-21 Thread zyx
Dne 9.9.2013 15:58, Kami Young napsal(a):
> How to create a pdf without flateEncoded(zlib)?
>
> In the Creation Test , I find out that all the stream created by
> PdfPainter are encode with FlateEncode automatically.
>
> So I wonder how to write into a PdfPage a normal stream without
> FlateEncode(zlib) through PdfPainter?

Hi,
maybe you found out yourself already, but in case you did not, there is 
no way to do this "from the outside", but you can open PdfStream.cpp 
file and comment all lines (I have two) which contain 
ePdfFilter_FlateDecode. That way the default streams will not be encoded.
Bye,
zyx


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] The CMake created Visual Studio 10 project has link errors

2013-11-20 Thread zyx
On Tue, 2013-11-19 at 17:39 -0500, Shazad Khan wrote:
> I went back to 0.9.1 version of PoDoFo to get rid of libcrypto dependency
> and was able to build it. However the Visual Studio solution file cmake
> generate doesn't build. The problem is it can't find the libraries. In the
> VS2010 project settings, the paths never show references to the library
> paths that are part of cmake file script. I don't know how to carry out
> those lib paths to VS2010?

Hi,
I would try the GUI front end for the CMake, it guides you through all
the missing paths and variables, and finally generates proper
make/project files. I used it with other project couple months ago and
it worked fine.
Bye,
Milan


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] podofo.lib

2014-01-09 Thread zyx

On Mon, 2014-01-06 at 16:50 +, Damien Gallagher wrote:

> Can anyone point me to a version of the podofo library file for
> windows?

Hi,
I'm not sure whether this [1] will be of any help, but the SDK there
provides binaries for windows, both for Microsoft Visual C++ environment
(COFF version) and C++ Builder environment (OMF, compiled under XE2).
The library is not intended for the exact purpose you want it, neither
tested (there is a different API for getting the PdfDocument than
creating it on your own), but it might be easier and quicker to just
download it and give it a try, than to compile PoDoFo with its
dependencies. You can find at [1] also a list of dependencies it was
built with. I hope you'll find it useful.
    Bye,
zyx

[1] http://www.litePDF.cz/download.html

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


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfFilters.h Location?

2014-01-29 Thread zyx
On Wed, 2014-01-29 at 05:47 +0930, Domonic Tom wrote:
> I'm referring to the line in the Podofo documenation at: 
> http://podofo.sourceforge.net/doc/html/PdfFiltersPrivate_8h.html
>
> Would anyone know where PdfFilters.h is?  I can find PdfFilter.h but
> it does not include 
> PdfLZWFilter.h .  The documenation says the below about
> PdfLZWFilter.h..
>
> I'm a little confused.  If PdfFilters.h is not there then you do have
> to include PdfLZWFilter.h in your applications?

Hi,
I'm sorry, but it seems you decided to bug this list about PdfLZWFilter
with questions which you might be able to find on your own.

a) The PdfFilters.h is obviously a typo in the documentation, because
the mentioned factory resides in PdfFilter.h (singular, not plural). You
might easily find it yourself if you look where the respective filters
are created (namely PdfFilterFactory::Create). I never used that
function directly, neither have any other insight on it, it's just a
result of the simplest grep on the sources I did.

b) The PdfLZWFilter doesn't seem to be dependent on the TIFF library, on
a quick look in PdfFilterPrivate.cpp, but it only supports decode, not
encode.

I do not know what you are trying to accomplish, but I hope this answers
your questions. Please do not ask me on any more details, I do not have
them, I only did the code search and read for you, nothing else.
Bye,
zyx


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Last commit

2014-01-29 Thread zyx
On Mon, 2014-01-27 at 05:50 -0400, Palmer Zent wrote:
> I am wondering if some changes are missing from the last commit
> (1580). It definitely can not compile as-is. Some of the issues are
> trivial to fix but one in particular makes me wonder if something is
> missing:
>
> PdfSigIncSignatureField.cpp:182: pPdfImage->LoadFromJpegData(...)
>
> There is no such method in PdfImage.
>
> Could the author be notified (there is no reference of him in the
> mailing lists)?

Hi,
I sent Libor's patch to Dominik, I'll check whether I missed anything in
it and will let Dominik know about my findings. It'll be only during
weekend. I'm sorry for that.
Bye,
zyx



--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfFilters.h Location?

2014-01-29 Thread zyx
On Thu, 2014-01-30 at 13:21 +0930, Domonic Tom wrote:

> Would anyone be able to answer this question.  How do I allocate a
> filter type to PdfFilter?  
>
> I know GetType() is supposed to do this but how?  It doesn't take any
> arguments?

Hmm, GetType() method of which object? Anyway, even I'm not 100% sure of
your question about 'allocate', with my previous reply you might find
out something like:

   #include "base/PdfFilter.h"

   std::auto_ptr getLZWFilter(void)
   {
   return PdfFilterFactory::Create(ePdfFilter_LZWDecode);
   }


I'm really not sure what you are actually trying to achieve, it's hard
to guess from the less of information you gave so far, but the above
"code snippet" might answer the question of "how to create an LZW
filter". Please search the sources for PdfFilterFactory::Create, it
might give you better hints how it's actually used and what is done with
returned object.
Bye,
zyx


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Last commit

2014-01-31 Thread zyx
On Mon, 2014-01-27 at 05:50 -0400, Palmer Zent wrote:
> I am wondering if some changes are missing from the last commit
> (1580). It definitely can not compile as-is. Some of the issues are
> trivial to fix but one in particular makes me wonder if something is
> missing:

Hi,
the build break is fixed with r1581. I'm sorry for inconvenience.
    Bye,
zyx



--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-02-26 Thread zyx
On Tue, 2014-02-25 at 14:25 +0100, Andreas Brzesowsky wrote:
> I have added some code to decode AESV2 InputStream, some fixes for RC4
> decoding and handling of the EncryptMetadata flag for RC4 and AESV2.
> So some more encrypted pdf could be handled by PoDoFo.
> I want to contribute my changes.

Hello,
thanks for looking into this (I'm not a PoDoFo developer, but I'd like
to answer the below questions and thank you for your work).

> Are there any rules like coding rules or additional test cases I
>  should consider before contribution?

I do not think there is any written guide on coding style being used in
the PoDoFo code base, I did not find any at least, but the best would be
to pick some core file, like PdfDocument.c/.h and mimic its coding
style.

With respect of adding test cases, it's always a good thing to have more
tests, to spot regressions, thus they are welcome, but not mandatory.

> And how to contribute the best way?

You can send the patch to this list, thus more people will be able to
test it, or send it directly to Dominik for a review.
Bye,
zyx

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


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-03-06 Thread zyx
On Thu, 2014-03-06 at 09:11 +0100, Dominik Seichter wrote:

> Andreas, thanks for your fixes and updates. @zyx: Could you please
> review them and maybe commit them to the repository? I don't have any
> time right now to follow patches.

Hi,
sure thing, I'll be glad to help.

I applied the patch to current trunk (r1582), which worked like a charm.
Unfortunately, invoking the build fails with below errors. Please see
also warnings from gcc.

Andreas, is it possible any chunks are missing in the patch? I also
tried "make clean" after applying your patch and before building, but it
did not help.

By the way, I have some encrypted PDF documents with forms, where PoDoFo
doesn't seem to decrypt form field values properly, using both RC and
AES encryption (two documents). I'm eager to see whether your patch will
address this as well.
Thanks and bye,
zyx

-

[  7%] Building CXX object 
src/CMakeFiles/podofo_static.dir/base/PdfEncrypt.cpp.o
podofo-trunk/src/base/PdfEncrypt.cpp: In constructor 
‘PoDoFo::PdfAESStream::PdfAESStream(unsigned char*, size_t)’:
podofo-trunk/src/base/PdfEncrypt.cpp:405:7: warning: 
‘PoDoFo::PdfAESStream::bOnlyFinalLeft’ will be initialized after [-Wreorder]
  bool bOnlyFinalLeft;
   ^
podofo-trunk/src/base/PdfEncrypt.cpp:403:15: warning:   ‘const size_t 
PoDoFo::PdfAESStream::keyLen’ [-Wreorder]
  const size_t keyLen;
   ^
podofo-trunk/src/base/PdfEncrypt.cpp:336:5: warning:   when initialized here 
[-Wreorder]
 PdfAESStream( unsigned char* key, const size_t keylen )
 ^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘PoDoFo::pdf_long 
PoDoFo::PdfAESStream::Decrypt(unsigned char*, PoDoFo::pdf_long, 
PoDoFo::pdf_long*)’:
podofo-trunk/src/base/PdfEncrypt.cpp:372:88: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
status = EVP_DecryptUpdate( aes, pBuffer, &lOutLen, pBuffer + keyLen, lLen 
- keyLen );

^
podofo-trunk/src/base/PdfEncrypt.cpp:378:73: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
status = EVP_DecryptUpdate( aes, tempBuffer, &lOutLen, pBuffer, lLen );
 ^
podofo-trunk/src/base/PdfEncrypt.cpp:391:72: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptFinal_ex(EVP_CIPHER_CTX*, unsigned char*, int*)’
 status = EVP_DecryptFinal_ex( aes, pBuffer + lOutLen, &lStepOutLen );
^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘virtual void 
PoDoFo::PdfEncryptMD5Base::CreateObjKey(unsigned char*, int*) const’:
podofo-trunk/src/base/PdfEncrypt.cpp:911:68: error: 
‘ePdfEncryptAlgorithm_AESV3’ was not declared in this scope
  if (m_eAlgorithm == ePdfEncryptAlgorithm_AESV2 || m_eAlgorithm == 
ePdfEncryptAlgorithm_AESV3)
^
podofo-trunk/src/base/PdfEncrypt.cpp: In member function ‘void 
PoDoFo::PdfEncryptAESBase::BaseDecrypt(const unsigned char*, int, const 
unsigned char*, const unsigned char*, PoDoFo::pdf_long, unsigned char*, 
PoDoFo::pdf_long&)’:
podofo-trunk/src/base/PdfEncrypt.cpp:1301:70: error: cannot convert 
‘PoDoFo::pdf_long* {aka long int*}’ to ‘int*’ for argument ‘3’ to ‘int 
EVP_DecryptUpdate(EVP_CIPHER_CTX*, unsigned char*, int*, const unsigned char*, 
int)’
 status = EVP_DecryptUpdate(aes, textout, &outLen, textin, textlen);
  ^
make[2]: *** [src/CMakeFiles/podofo_static.dir/base/PdfEncrypt.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/podofo_static.dir/all] Error 2


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


--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-03-07 Thread zyx
On Fri, 2014-03-07 at 14:05 +0100, Andreas Brzesowsky wrote:
> I think a have fixed them and created a new patch.
> Please send me the errors if you still have some.

Hi,
thanks for the update, it compiles cleanly now. I'll test the
functionality during the weekend, the most at the beginning of the next
week, and let you know.
Bye,
zyx

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


--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-03-09 Thread zyx
On Fri, 2014-03-07 at 15:01 +0100, zyx wrote:
> I'll test the functionality during the weekend, the most at the beginning
> of the next week, and let you know.

Hello,
I created a little test program for the encryption (see the attached
test.cpp), which is testing all encryption algorithms. Your patch works
as you said, it fixes AESv2 decryption and keeps the AESv3 unchanged
(still broken). There is one change in behaviour, it exists with an
exception for AESv3:

PoDoFo encounter an error. Error: 8 ePdfError_InternalLogic
Error Description: An internal error occurred.
Callstack:
#0 Error Source: .../src/base/PdfEncrypt.cpp:1314
Information: Error AES-decryption data final

instead of failing silently, which is better in my opinion.

This doesn't seem to fix decrypt of an AcroForm elements, but that might
not be related to your changes at all (it didn't work even before).

In any case, I committed your patch to trunk as revision 1583:
http://sourceforge.net/p/podofo/code/1583

Thanks and bye,
zyx

-- 
http://www.litePDF.cz i...@litepdf.cz
/* g++ -g -O0 test.cpp -o test -L/data/develop/dila/podofo/build-trunk/src -rdynamic -lpodofo -lfontconfig -lz -lcrypto -ljpeg -lpthread -lfreetype -lpng -lz -lcrypto -ljpeg -lpthread -lfreetype -lpng -lidn -Wl,-rpath,/data/develop/dila/podofo/build-trunk/src -I/data/develop/dila/podofo/build-trunk -I/data/develop/dila/podofo/podofo-trunk -I/data/develop/dila/podofo/podofo-trunk/src -I/usr/include/freetype2-std=c++98 -Wall -Woverloaded-virtual -Wswitch-enum -Wcast-qual -Wwrite-strings -Wredundant-decls -Wreorder -W -fvisibility=hidden -DPODOFO_HAVE_GCC_SYMBOL_VISIBILITY && ./test */

#include 
#include "podofo.h"

using namespace PoDoFo;

static void drawPage(PdfMemDocument *memDocument)
{
	PODOFO_RAISE_LOGIC_IF (!memDocument, "!memDocument");

	PdfFont *pFont;
	PdfPage *pPage;
	PdfPainter painter;

	pPage = memDocument->CreatePage(PdfPage::CreateStandardPageSize(ePdfPageSize_A4));
	PODOFO_RAISE_LOGIC_IF (!pPage, "!pPage");

	painter.SetPage(pPage);

	pFont = memDocument->CreateFont("Helvetica");
	PODOFO_RAISE_LOGIC_IF (!pFont, "!pFont");

	pFont->SetFontSize(18.0);

	painter.SetFont(pFont);

	painter.DrawText(56.69, pPage->GetPageSize().GetHeight() - 56.69, "Hello World! Encrypted");
	painter.FinishPage();
}

static void testEnctyption(PdfEncrypt::EPdfEncryptAlgorithm algo, PdfEncrypt::EPdfKeyLength keyLength, const char *pFileName)
{
	PdfEncrypt *encrypt;

	if (pFileName)
		printf("Testing %s:\n", pFileName);

	encrypt = PdfEncrypt::CreatePdfEncrypt("user", "owner", 0, algo, keyLength);
	PODOFO_RAISE_LOGIC_IF (!encrypt, "!encrypt");

	PdfMemDocument *memDocument = new PdfMemDocument();
	PODOFO_RAISE_LOGIC_IF (!memDocument, "!memDocument");

	memDocument->SetEncrypted(*encrypt);

	delete encrypt;

	PdfInfo *info = memDocument->GetInfo();
	PODOFO_RAISE_LOGIC_IF (!info, "!info");

	info->SetProducer("test");

	drawPage(memDocument);

	PdfRefCountedBuffer *buffer = new PdfRefCountedBuffer();
	PODOFO_RAISE_LOGIC_IF (!buffer, "!buffer");

	PdfOutputDevice outputDevice(buffer);
	memDocument->Write(&outputDevice);

	delete memDocument;

	if (pFileName) {
		FILE *f = fopen(pFileName, "wb");
		PODOFO_RAISE_LOGIC_IF (!f, "!f");

		fwrite(buffer->GetBuffer(), buffer->GetSize(), 1, f);
		fclose(f);
	}

	memDocument = new PdfMemDocument();
	PODOFO_RAISE_LOGIC_IF (!memDocument, "!memDocument (2)");

	PdfRefCountedInputDevice inputDevice(buffer->GetBuffer(), buffer->GetSize());
	try {
		memDocument->Load(inputDevice);
	} catch (const PdfError &error) {
		if (error.GetError() == ePdfError_InvalidPassword) {
			memDocument->SetPassword("user");
		} else {
			throw;
		}
	}

	info = memDocument->GetInfo();
	PODOFO_RAISE_LOGIC_IF (!info, "!info");

	if (info->GetProducer().GetStringUtf8() != "test") {
		fprintf(stderr, "   Producer not set as expected 'test', but '%s' instead\n", info->GetProducer().GetString());
	} else {
		printf("   OK\n");
	}

	delete memDocument;
	delete buffer;
}

int main(void)
{
	PdfError::EnableLogging(false);

	try {
		testEnctyption(PdfEncrypt::ePdfEncryptAlgorithm_RC4V1, PdfEncrypt::ePdfKeyLength_40, "rc4v1.pdf");
		testEnctyption(PdfEncrypt::ePdfEncryptAlgorithm_RC4V2, PdfEncrypt::ePdfKeyLength_128, "rc4v2.pdf");
		testEnctyption(PdfEncrypt::ePdfEncryptAlgorithm_AESV2, PdfEncrypt::ePdfKeyLength_128, "aesv2.pdf");
		testEnctyption(PdfEncrypt::ePdfEncryptAlgorithm_AESV3, PdfEncrypt::ePdfKeyLength_256, "aesv3.pdf");
	} catch (const PdfError &error) {
		

Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-03-11 Thread zyx
On Mon, 2014-03-10 at 17:59 +0100, Andreas Brzesowsky wrote:
> I have now got some AESV2 encrypted PDF, that are created with Acrobat
> X.
> These currently crash in PoDoFo because they have multiple XRef
> streams and XRef streams are never encrypted.
> But in PdfParser::ReadObjectsInternal m_pEncrypt is set for these XRef
> objects.
> I have added a patch to skip all XRef objects in
> PdfParser::ReadObjectsInternal.
> With that AESV2 encryption from Acrobat X should work.

Hi,
thanks, I committed the patch to trunk as revision 1584:
http://sourceforge.net/p/podofo/code/1584

By the way, would you mind to look on AESv3 too? As you mentioned
earlier, with AESv2 being done the AESv3 should not be a big problem,
and you have the code fresh in your mind, thus it might be even easier
for you? Maybe :)
Bye,
zyx

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo fails to build on Mavericks with homebrew (and macports)

2014-03-11 Thread zyx
On Fri, 2014-02-28 at 17:37 +0100, Arno Gramatke wrote:
> I recently tried to install PoDoFo on Mac OS X 10.9 using homebrew. It failed 
> with two errors:
> 1) ios_base includes were missing in PdfInputDevice.h and PdfLocale.h
> 2) FindFREEType.cmake couldn’t find freetype 2.5.2.
> 
> Another bug was found by the homebrew build bot:
> 3) Including CommonCrypto.h fails on Mac OS X Lion. It is not available.

Hi,
I hope Dominik will not mind if I check your patches too (you asked me
in private). I applied them all and I get a build break on a Linux
machine, thus one of your patches removes too much:

[ 41%] Building CXX object 
src/CMakeFiles/podofo_static.dir/doc/PdfFontCID.cpp.o
In file included from podofo-trunk/src/doc/PdfFontCID.cpp:46:0:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: 
No such file or directory
#include 

Could you update the patch, please? (I prefer one patch only,
personally, it's easier to work with and I'd do a single commit anyway).
Bye,
zyx


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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-03-18 Thread zyx
On Mon, 2014-03-17 at 15:33 +0100, Andreas Brzesowsky wrote:
> But before I have an other patch:
> My last patch should handle multiple XRef object for encrypted PDFs.
> But it breaks merged unencryted PDFs with multiple XRef objects.
> So instead of not adding XRef object to m_vecObjects, this patch sets
> the encryption to NULL for these objects.

Hi,
thanks, I committed it as r1585
http://sourceforge.net/p/podofo/code/1585
    Bye,
zyx

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo fails to build on Mavericks with homebrew (and macports)

2014-03-18 Thread zyx
On Tue, 2014-03-11 at 19:57 +0100, zyx wrote:
> On Fri, 2014-02-28 at 17:37 +0100, Arno Gramatke wrote:
> > I recently tried to install PoDoFo on Mac OS X 10.9 using homebrew.
> > It failed with two errors:
> > 1) ios_base includes were missing in PdfInputDevice.h and 
> > PdfLocale.h
> > 2) FindFREEType.cmake couldn’t find freetype 2.5.2.
> > 
> > Another bug was found by the homebrew build bot:
> > 3) Including CommonCrypto.h fails on Mac OS X Lion. It is not
> > available.

Hi,
Arno sent me an updated version of his patch which works for me,
thus I committed it as r1586:
http://sourceforge.net/p/podofo/code/1586

Bye,
zyx

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Patches for compiling podofo 0.9.2 on OS X 10.9 Mavericks

2014-03-30 Thread zyx
On Fri, 2014-03-28 at 16:29 +0100, Uli Zappe wrote:
> The patches are colleted in the file podofo.patch.

Hello,
could you _attach_ the patch as a file, rather than paste it in the
message body, please? Having it attached prevents issues like making it
a garbage (due to white-space replacements, folding and so on) either
during the transmission or on the client side itself.

Thanks for your understanding.
Bye,
    zyx

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


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


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-04-01 Thread zyx
On Mon, 2014-03-31 at 14:05 +0200, Andreas Brzesowsky wrote:
> okay now I have the patch for AESv3 decryption finished:

Hi,
thanks a lot for the follow-up. I applied your patch to trunk and run
the test program I sent earlier [1], which creates some encrypted PDF
files in PoDoFo and then tries to read them, and the AESv3 still fails,
this time with a different error:


Testing aesv3.pdf:
Failed with error:

PoDoFo encounter an error. Error: 8 ePdfError_InternalLogic
Error Description: An internal error occurred.
Callstack:
#0 Error Source: .../src/base/PdfParser.cpp:1028
Information: Error while loading object 2 0 Offset = 59 
Index = 2

#1 Error Source: .../src/base/PdfEncrypt.cpp:1286
Information: Error AES-decryption data length not a 
multiple of the key length

I hope it helps with a diagnose.
Bye,
    zyx

[1] http://sourceforge.net/p/podofo/mailman/message/32079121/

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


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


Re: [Podofo-users] Patches for compiling podofo 0.9.2 on OS X 10.9 Mavericks

2014-04-01 Thread zyx
On Mon, 2014-03-31 at 11:25 +0200, Uli Zappe wrote:
> I attach the patch file to this mail.

Hello,
thanks for the re-send. I see that your changes are quite the same as
those at [r1586]. Could you try with them, please?

That revision does not contain the change in CMakeLists.txt for
PODOFO_VERSION_PATCH, but that's most likely only a typo in the released
tarball. The trunk code has this version already updated to "3".

I also do not quite understand the addition of expat and bzip2
libraries. Is it, because the fontconfig you use requires it? If it's
so, then the right change may come to fontconfig, to extend its own libs
(similar to `pkg-config --libs fontconfig` command, alternatively for
freetype libs). That way it'll start to work for any other project too,
instead of patching each individual project which uses
fontconfig/freetype.

The LUA related changes: I see the lua_open() had been replaced in LUA
5.1, and lua_rawlen() had been introduced in version 5.2. I'd say, to
keep backward compatibility, it'll be good to conditional-compile the
code based on the used LUA version, rather than replace the functions. 

Bye,
zyx

[r1586] http://sourceforge.net/p/podofo/code/1586 

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


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


Re: [Podofo-users] Patch to support PDF XRefStm

2014-04-01 Thread zyx
On Tue, 2014-04-01 at 06:35 -0500, Mark Rogers wrote:
> ...
> The attached patch adds support for XRefStm to
> PdfParser::ReadNextTrailer() by adding code between 
> ...

Hello,
thanks for the patch, I committed it to trunk as r1587:
http://sourceforge.net/p/podofo/code/1587
Bye,
zyx

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


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


Re: [Podofo-users] Patches for hangs and access violations

2014-04-01 Thread zyx
On Tue, 2014-04-01 at 06:59 -0500, Mark Rogers wrote:
> Here are three patches which fix a number of problems seen with PDF
> documents in the wild:

Hello,
thanks for the patches.
 
> 
> PdfPagesTree-1.patch   

I committed it together with the third patch as r1588.


> PdfPagesTree-2.patch   

This had been already committed with basically the same patch from other
user as r1576:
http://sourceforge.net/p/podofo/code/1576 
> 
> PdfPages.patch

I committed it together with the first patch as r1588:
http://sourceforge.net/p/podofo/code/1588

    Bye,
zyx

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


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


Re: [Podofo-users] Patches for compiling podofo 0.9.2 on OS X 10.9 Mavericks

2014-04-01 Thread zyx
On Wed, 2014-04-02 at 05:26 +0200, Uli Zappe wrote:
> Well, part of my patch file is indeed the same as r1586...

Hi,
you accidentally replied only to me, not to the list (for some reason
twice). It would be better to reply to the list, also because I do not
have an OS X system, thus I cannot properly verify the changes.

I'd appreciate, if you give a try to the changes from r1586, because
they did work for someone else, so it should work for you too.

> Expat is only required by fontconfig. Bzip is required by PoDoFo
> itself.

Why is the bzip2 required? I build PoDoFo on Linux, and it is not needed
at all. Can there be anything wrong with your build environment? Similar
to the expat library, though I use fontconfig-2.11.0 here. My
podofo-config.h says:

/* Libraries */
#define PODOFO_HAVE_JPEG_LIB
#define PODOFO_HAVE_PNG_LIB
/* #undef PODOFO_HAVE_TIFF_LIB */
#define PODOFO_HAVE_FONTCONFIG
/* #undef PODOFO_HAVE_LUA */
/* #undef PODOFO_HAVE_BOOST */
/* #undef PODOFO_HAVE_CPPUNIT */
#define PODOFO_HAVE_LIBIDN

thus I do compile with fontconfig and I do not get any errors during
compile and link time.

> That’s certainly true. However, I had very little time when I built
> PoDoFo, and just did a quick and dirty fix for myself. I just wanted
> to inform you about my experience; I didn’t mean to suggest to
> actually commit the very patch file I sent.

Right. Any contribution is definitely appreciated, though I would
personally also like to see "fine-tuned" patches.

By the way, I'm not a PoDofo maintainer, I was only asked by Dominik to
commit some patches from the user's list of PoDoFo, as he is currently
short of time.
Bye,
zyx

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


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


Re: [Podofo-users] what is the status of AES Decrypt/Encrypt

2014-04-06 Thread zyx
On Thu, 2014-04-03 at 11:43 +0200, Andreas Brzesowsky wrote:
> Because if the patch is applied correctly the error message "Error
> AES-decryption data length not a multiple of the key length" does not
> exists anymore
> In the patch are these lines:
> -if( lLen % keyLen != 0 )
> -PODOFO_RAISE_ERROR_INFO( ePdfError_InternalLogic, "Error
> AES-decryption data length not a multiple of the key length" );
> +if( lLen % 16 != 0 )
> +PODOFO_RAISE_ERROR_INFO( ePdfError_InternalLogic, "Error
> AES-decryption data length not a multiple of 16" );
>
> So can you please make sure that the patch is correctly applied.

Hi,
the message you changed was at PdfAESStream::Decrypt(), but that message
I get is from PdfEncryptAESBase::BaseDecrypt(). I changed it the same as
you did above and it works as expected, thus I committed it to trunk as
r1595: http://sourceforge.net/p/podofo/code/1595

Thanks a lot for the help on this.
Bye,
zyx



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


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


Re: [Podofo-users] Clash between PdfXRefStreamParserObject and PdfXRefStream

2014-04-29 Thread zyx
On Tue, 2014-04-29 at 12:09 +0300, Ilan Zisser wrote:
> If tried the first option and it works fine. Would you like me to send
> a patch?

Hi,
I see you sent the same message at the beginning of April. It seems it
got lost in the loop, left without any attention.

If you can provide a patch, then I'll be happy to commit it to sources.
Bye,
zyx

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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Clash between PdfXRefStreamParserObject and PdfXRefStream

2014-05-02 Thread zyx
On Tue, 2014-04-29 at 18:24 +0200, zyx wrote:
> On Tue, 2014-04-29 at 12:09 +0300, Ilan Zisser wrote:
> > If tried the first option and it works fine. Would you like me to send
> > a patch?
> 
> If you can provide a patch, then I'll be happy to commit it to sources.

Hi,
Ilan sent me his change privately and I committed it as r1598:
http://sourceforge.net/p/podofo/code/1598

Thanks Ilan.
Bye,
zyx


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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfWriter as a base class

2014-05-04 Thread zyx
On Sun, 2014-05-04 at 17:00 +0300, Ilan Zisser wrote:
> The modified file is attached.

Hi,
Ilan, please, do not provide whole files, provide only patches with your
changes. Replacing whole files may cause changes lost when using
different versions of the sources. If you've PoDoFo checkout from svn,
then simple 'svn diff >podofo.patch' will produce the patch, or use
'diff -up PdfWriter.h.old PdfWrite.h >podofo.patch' (the -up is useful
to be added to 'diff' from svn too). The PdfWriter.h.old is a backup of
the file before your changes.
Bye,
zyx

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] How to reduce Pdf size

2014-05-05 Thread zyx
On Sun, 2014-05-04 at 14:13 +0200, Christophe Meyer wrote:
> I am developping a simple software. As a first basis, I would like to
> duplicate a pdf file that has been created by my printer (a scanned
> document). It consists of a file of 40 pages. It weights 10 Mb and
> each page of the pdf document is an image of a scanned document’s
> page. 
>
> In my program, I am just copying each page from the original pdf (I
> load it in a PdfMemDocument) and then inserts it in another
> PdfMemDocument with InsertPage.
>
> I just do a Write() at the end. 
>
> The file created at the end weighs more than 500 MB!!

Hi,
check the documentation and comments around the functions you use for
the page insertion. The PoDoFo doesn't merge resources, thus whenever
you add single page to a new document it copies whole document (or
"only" all resources, I dot recall precisely) to the new file, thus
nothing is missing when the inserted page is drawn.

I suggest to copy all pages in the destination document at once, convert
each into an XObject, then delete them all and reorder them as you wish,
by drawing the XObject into the new page (you can even shrink it and so
on). This way you'll not duplicate the resources (by the way, inner
images are also resources, which explains the size increase).
Bye,
zyx

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Dominik, are you ok?

2014-05-11 Thread zyx
On Sun, 2014-05-11 at 16:07 +0200, Alexander Repty wrote:
> I believe zyx has commit privileges, and they have been active recently. 

Hi,
yeah, I was just about to commit some of the pending patches and
generally do a little movement in those pending patches. The problem is
that I do things in my spare time too, while there is not much left
"these days". It means that some patches takes longer to act on. Another
open source project I work on has patches waiting for several months, so
the rush really doesn't help. My interest in PoDoFo is also slightly
limited, same as the testing ability, thus I just commit (partially)
blindly, hoping the change will work for other too (like with builds on
other platforms and so on). 

> I wonder if it would perhaps be better to move the entire project
> (under Dominik's ownership) to Github (or something like Github)
> instead, so people could send pull requests instead of patches on a
> mailing list - less chance of good patches getting lost in a sea of
> mail messages. Thoughts?

My personal opinion is to not do that. Every project needs some sort of
management, if you open it for anyone to commit anything to it, then it
may diverge the project in a direction which will not work "to everyone
interested". But that's only my personal opinion. 
Bye,
zyx

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Podofo, Freetype and MacOS Homebrew

2014-05-11 Thread zyx
On Wed, 2014-05-07 at 08:22 -0500, Kunda Loves Scribus wrote:

> I humbly ask of you to please fix this. it breaks for OSX mountain
> Lion when compiling with Homebrew. There is a patch (4th URL) that can
> be applied but the problem is anyone with Mountain Lion who tries to
> compile podofo on Homebrew reports an error without patch. 

Hi,
Arno, could you test Kunda's changes, please? I do not have a
Mac/Homebrew for testing, thus it would be really helpful to get the
changes in shape with you.

The best, if you could test also Uli's patch [1], because it touches
OS X as well.

Thanks and bye,
zyx

[1] http://sourceforge.net/p/podofo/mailman/message/32166760/

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfWriter as a base class

2014-05-11 Thread zyx
On Mon, 2014-05-05 at 10:20 +0300, Ilan Zisser wrote:
> Attached is a patch file that modifies PdfWriter.h. It makes PdfWriter
> usable as a base class.

Hi,
I applied the patch to the current trunk and there are new warnings
introduced by the change. Those are:

[  1%] Building CXX object 
src/CMakeFiles/podofo_static.dir/base/PdfSigIncWriter.cpp.o
In file included from podofo-trunk/src/base/PdfSigIncWriter.h:37:0,
 from podofo-trunk/src/base/PdfSigIncWriter.cpp:34:
podofo-trunk/src/base/PdfWriter.h:103:18: warning: ‘virtual void 
PoDoFo::PdfWriter::Write(PoDoFo::PdfOutputDevice*)’ was hidden 
[-Woverloaded-virtual]
 virtual void Write( PdfOutputDevice* pDevice );
  ^
In file included from /podofo-trunk/src/base/PdfSigIncWriter.cpp:34:0:
/podofo-trunk/src/base/PdfSigIncWriter.h:50:10: warning:   by ‘void 
PoDoFo::PdfSigIncWriter::Write(PoDoFo::PdfOutputDevice*, PoDoFo::pdf_int64)’ 
[-Woverloaded-virtual]
 void Write( PdfOutputDevice* pDevice, pdf_int64 prevOffset);
  ^

and few more also related to SigInc classes. Would you mind to address
those new warnings, please?
Bye,
        zyx

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] patch to implement form field inheritance (ISO 32000:2008, Section 12.7.3.1, table 220, page #432)

2014-05-11 Thread zyx
On Mon, 2014-04-28 at 15:19 -0500, Dennis Jenkins wrote:
> The following works for me.  I can now access all of the fields on the
> Arizona A1-QRT PDF form.  I humbly submit this minor patch for
> peer-review and hopeful inclusion into PoDoFo.

Hi,
I committed "the patch" as r1599 [1].

Dennis, the next time, please attach the patch rather than paste it into
the email. Even not large, it was painful to "apply" "the patch" by
hand. Thanks for your understanding.
Bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1599

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] Move to github? (was: Re: Dominik, are you ok?)

2014-05-11 Thread zyx
On Sun, 2014-05-11 at 17:53 +0200, Alexander Repty wrote:
> Basically, it would mean less manual labour for Dom and you, since
> patches which come in the form of pull requests would be much easier
> to integrate than they are now.

Hi,
not much difference from my side, you still need to teach them to use
the tool. I also prefer svn over git, but as everything in this thread,
it's only my humble personal opinion. After all, everything you
described can be achieved right now and nothing "prevents" users of
tarball releases.
Bye,
zyx

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


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Compiling PodofoBrowser fails on OSX Mavericks 10.9.2

2014-05-14 Thread zyx
On Tue, 2014-05-13 at 11:51 +0200, Christophe Meyer wrote:
> src/CMakeFiles/podofobrowser.dir/backgroundloader.o
> [My_Directory]/podofobrowser-0.5/src/backgroundloader.cpp:14:72: 
> error: member reference type 'PoDoFo::PdfVecObjects *' is a pointer;
>   maybe you meant to use '->'?
> qDebug("Beginning background load of %i objects",
> doc->GetObjects().GetSize());
> 
> ~^

Hi,
the compiler is right, PoDoFo 0.9.2 (and actual trunk) defines
   inline PdfVecObjects* PdfDocument::GetObjects();
from which I'd guess that the API of PoDoFo changed, but those changes
were not propagated into podofobrowser.

Looking at http://podofo.sourceforge.net/ , the podofobrowser was
released in time of 0.5 version of PoDoFo, which gives gap of several
years of development of PoDoFo.

I suppose the page is up to date. I do not compile podofobrowser myself,
this is what I see in sources and on the page.

That means, to be able to compile podofobrowser, you may need to adapt
the code to PoDoFo API changes first.
Bye,
zyx

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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Podofo, Freetype and MacOS Homebrew

2014-05-14 Thread zyx
On Wed, 2014-05-14 at 08:03 -0500, Kunda Loves Scribus wrote:
> Thanks so much for having the conversation. I'm checking in to see if
> there is any progress in the assessment, tweeking and integration of
> patches which can fix these issues that have cropped up for OSX
> Homebrew Package Manager builds?

Hi,
to be honest, I lost track what is left and what should be checked into
current sources for the Mac build.

I would prefer if you three could get the changes together, thus they
will work for all of you and I'll commit them to sources afterwards. The
best if you could work with current trunk.

It's one of two patches I'm aware of, which are pending of inclusion on
this message list.
Bye,
zyx


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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Building Version 0.9.2 (but the library file says 0.9.1!)

2014-05-14 Thread zyx
On Wed, 2014-05-07 at 15:32 -0700, Rob Jones wrote:
> I’m building PoDoFo 0.9.2 on both OSX and Debian.  In both cases, I
> end up with a shared library file whose version says: 0.9.1, when I
> clearly downloaded 0.9.2.  Any ideas why this would be happening?

Hi,
I believe it's related to a typo in the sources, tarball release, which
had been fixed in current trunk some weeks/months ago. I cannot find
exact link to the list/svn commits right now, I'm sorry, but I recall it
had been discussed on the list in the past. I hope I'm not mistaken.
Bye,
zyx

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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfWriter as a base class

2014-05-14 Thread zyx
On Mon, 2014-05-12 at 15:15 +0300, Ilan Zisser wrote:
> I didn't see this. My revision didn't include PdfSigIncWriter.h. 
> The reason for the  warning is obvious, missing "virtual" before the
> method Write.

Hi,
it's not that simple, unfortunately. The problem isn't "missing"
'virtual' qualifier (you are not required to repeat 'virtual qualifier
on methods which the base class has defined as virtual), the problem is
that the function prototype is different from the parent class' Write.
Using both patches shows only almost-the-same warning:

In file included from podofo-trunk/src/base/PdfSigIncWriter.h:37:0,
 from podofo-trunk/src/base/PdfSigIncWriter.cpp:34:
podofo-trunk/src/base/PdfWriter.h:103:18: warning: ‘virtual void 
PoDoFo::PdfWriter::Write(PoDoFo::PdfOutputDevice*)’ was hidden 
[-Woverloaded-virtual]
 virtual void Write( PdfOutputDevice* pDevice );
  ^
In file included from podofo-trunk/src/base/PdfSigIncWriter.cpp:34:0:
podofo-trunk/src/base/PdfSigIncWriter.h:50:18: warning:   by ‘virtual 
void PoDoFo::PdfSigIncWriter::Write(PoDoFo::PdfOutputDevice*, 
PoDoFo::pdf_int64)’ [-Woverloaded-virtual]
 virtual void Write( PdfOutputDevice* pDevice, pdf_int64 
prevOffset);
  ^

I guess the best option will be to rename the method in the
PdfSigIncWriter.h, thus the names, and the prototypes, will not clash.
This involves much more changes around the code. I cannot think of any
nice name for the rename, thus either IncWrite(...) or
WriteWithOffset(...), whichever sounds better to people.

By the way, please provide patches with full paths (call `svn diff` from
the root directory of the checkout) and merge all the changes into one
patch, not in series of patches - both is easier for maintaining the
changes. Thanks for your understanding.
Bye,
zyx

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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfWriter as a base class

2014-05-15 Thread zyx
On Thu, 2014-05-15 at 11:12 +0300, Ilan Zisser wrote:
> Of course it's possible to rename the method like you suggested.
> However, I feel that this method should indeed override the base
> class' Write.
> After looking at the code for the method, I realized that it
> duplicates some of the code from the base class. I believe that this
> should be avoided.

Hi,
I agree, it is always better to avoid code duplication.

> In addition, it seems like PdfSigIncWriter is writing all the objects
> of the document (I'm not 100% sure of that). This is certainly not
> needed.

To be honest, I didn't check the code and what it does, I know it's for
signing PDF documents in an incremental way, but nothing more of it.

> Bottom line: I can certainly do a rename but I think that it would be
> better to have a bit of a different architecture.

Sure, if you can come with a better solution, then I'm all for it.
Bye,
zyx


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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Podofo, Freetype and MacOS Homebrew

2014-05-18 Thread zyx
Dne 17.5.2014 2:22, Kunda Loves Scribus napsal(a):
> Sorry, forgot to mention that FYI, there is an instruction made here:
> https://github.com/Homebrew/homebrew/pull/26888#issuecomment-43287592
> for Hombrew users that are trying to compile podofo. This is the patch
> that I've been using so far.
>
> I'm mentioning this here for others that are searching for a temp fix.
>
> On Fri, May 16, 2014 at 7:17 PM, Kunda Loves Scribus
>  > Which patch will it be?
>
> Well, my patch seems to comprise all the others, *but* it needs
> Lua 5.2, which Homebrew doesn't seem to offer.

Hello,
if I read it correctly, then PoDoFo has all the homebrew fixes already 
included, the only one is the Lua code update to support also 5.2?

If I'm wrong, would you mind to resend your up-to-date patch, please? 
It'll be easier than to chase list archives.
Thanks in advance,
zyx

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Podofo, Freetype and MacOS Homebrew

2014-05-19 Thread zyx
On Sun, 2014-05-11 at 18:41 +0200, Arno Gramatke wrote:
> I don’t know which would be the best approach to go on with this.
> Uli’s additional patches are certainly a good addition and obviously
> needed when using Lua 5.2. But we should keep compatibility with Lua
> 5.1, too. Otherwise it wouldn’t work on Homebrew as they are still on
> Lua 5.1

Hello,
I was about to provide the LUA related patch update, when I realized it
was already done on trunk with revision 1560:
http://sourceforge.net/p/podofo/code/1560

> I can try to setup a test installation for Lion, but IIRC it didn’t
> work because my hardware was to new to get that VM to run. I can check
> again and let you know, in case I can help with this.

Any sanity checking and providing fixes for current svn trunk before the
release would be more than welcome. Thank you all for the help with
this.
Bye,
zyx

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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Patch for PoDoFo 1598

2014-05-21 Thread zyx
On Wed, 2014-05-21 at 17:45 +0200, Ulrich Arnold wrote:
> I've downloaded PoDoFo trunk rev. 1598 and had to apply some changes
> to get it compiled under WIN7 VS2008. I've asked Dominik to review and
> commit the changes, as we used to, but he is quite busy in the moment.
> So I ask somebody on the list (perhaps zyx) to do this.


Hello,
thanks for the patch. I'll 

thanks for the patch. I'll try to commit it during this weekend, but no
promises. The next week the latest.
Bye,
zyx


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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Patch for PoDoFo 1598

2014-05-24 Thread zyx
On Wed, 2014-05-21 at 17:45 +0200, Ulrich Arnold wrote:
> I've downloaded PoDoFo trunk rev. 1598 and had to apply some changes
> to get it compiled under WIN7 VS2008.

Hello,
I just committed your patch as [r1600], with added the change for the
CMake-generated PODOFO_HAVE_OPENSSL.

I also made a significant (but small) change in PdfEncrypt, for the case
of undefined PODOFO_HAVE_OPENSSL. Instead of returning NULL, PoDoFo
throws an exception, also newly introduced ePdfError_NotCompiled.
I believe it'll be more error prone than returning NULL, which can
eventually cause some NULL pointer dereferences on places which expect
non-NULL pointers being returned (I didn't test whether such situation
could happen) and, more importantly, a hard-to-debug (on the first look)
misbehavior of the PoDoFo library when it was compiled without OpenSSL.

    Bye,
zyx

[r1600] http://sourceforge.net/p/podofo/code/1600


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


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Patch for PoDoFo 1600

2014-05-26 Thread zyx
On Mon, 2014-05-26 at 14:26 +0200, Ulrich Arnold wrote:
> I've just tested rev 1600 without OPENSSL and realized that
> PdfEncryptMD5Base::GetMD5String is called by PdfWriter::CreateFileIdentifier
> even without encryption und thus the exception is raised. The identifier is
> not used for encryption in this case, but is written to the trailer.
> Although that is an optional field without encryption, I've pasted the MD5
> stuff from a former revision into the branch without OPENSSL, to get a
> proper ID in the trailer.

Hi,
OK, I committed the patch as [r1601].
    Thanks and bye,
zyx

[r1601] http://sourceforge.net/p/podofo/code/1601

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


--
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Outputting Arabic (via Harfbuzz) [on Windows]

2014-06-04 Thread zyx
On Wed, 2014-06-04 at 13:57 +0100, Drupal wrote:
> So, I guess my question is: Can PoDoFo take a set of glyph IDs and
> positions/metrics and use that to render Arabic in a PDF with a subset font?

Hello,
it is possible, only note that PoDoFo doesn't render anything, it only
writes rendering instructions to a PDF file, which a reader
(Adobe/evince/..) interprets.

I cannot give you exact code, I do not have it handy, but I can provide
a rough overview (maybe it'll not be accurate):
 - attach your (newly created?) font to the PDF;
 - create a mapping between 'char' codes to glyph IDs, which can be done
   with a PdfEncoding descendant (there can be sometimes involved
   PdfEncodingDifference, but it sounds like it's not what you want);
 - then create a PdfFont with that PdfEncoding descendant used (the
   GetFont() variants have the PdfEncoding * argument);
 - then print the letters according to your mapping.

The hardest part will be to describe the font properly, with its
'letter' widths and so on, but I think the freetype can read that from
the font description and PoDoFo can use that information for you.

Hope it helps,
zyx

P.S.: As you target Windows, it would be interesting to know whether
litePDF can handle it for you. I'm just being curious. :)

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-05 Thread zyx
Hello all,
I'd like to give a heads-up that I'll be merging changes from
zyx_integration branch, which are also changing drawing API - to get
more freedom when drawing. I will skip the change which hid inline
functions from headers, because it was not accepted.

I'd like to include it in the next release. The merge will take some
time, though. I'll announce when it's done (I'll be working on it mostly
during weekends).

I hope we get test results from OS X meanwhile, whether the current
trunk builds properly there. If I'm not mistaken, then that's the last
thing which should be done before the next PoDoFo release. Please
correct me if I'm wrong.
Thanks and bye,
zyx

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-05 Thread zyx
On Thu, 2014-06-05 at 11:28 -0400, Palmer Zent wrote:
> It should be ready by the beginning of next week. Is it okay with you
> if I commit it then or is it going to mess up your merge?

Hi,
I cannot tell for sure, I changed many things, also around fonts. You
can see the changes in the zyx_integration branch and check the files
you touch whether they are changed in a way which would cause trouble.
The branch is available in podofo's svn, under
   podofo/branches/_dev/zyx_integration

By the way, I plan to "merge" the changes commit by commit. It'll make
more sense, also because the PoDoFo trunk changed meanwhile too.
Bye,
zyx
-- 
http://www.litePDF.cz i...@litepdf.cz


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Exception while running in iOS 7

2014-06-05 Thread zyx
On Thu, 2014-06-05 at 16:57 +0530, VED PRAKASH wrote:

>I am using podofo library in my iOS app, it works well in iOS6.0
> where as it crashes when I run on iOS7.0. Its exactly same as this
> issue 
> http://stackoverflow.com/questions/19970782/podofo-library-crash-in-ios-7-but-working-in-ios-6-and-earlier

Hi,
do you have a backtrace for the crash, please? Something to what gdb's
"bt" provides on Linux, with debuginfo available (I do not know iOS, I
suppose there is something similar).

By the way, the link shows a crash in a system library. Did you try to
run PoDoFo compiled on iOS 6 in iOS 7 environment? What if you recompile
PoDoFo on iOS 7, will it still crash? If not, then it may explain that
they changed anything in the system library. But I'm only plain guessing
here.
Bye,
zyx 

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-05 Thread zyx
On Fri, 2014-06-06 at 01:11 +, Leonard Rosenthol wrote:
> Is the set of changes easily reviewable?

Hi,
I guess so. As I said, it's in the branch:
   podofo/branches/_dev/zyx_integration
If it was not understood, then it is in SourceForge's svn. The changes
start at commit 1526 [1]. You can simply checkout that branch [2] and
get it all at once, not interleaved with trunk changes.

The code is currently based on PoDoFo 0.9.2, thus the merge will not be
that simple (but that's my problem) :).
        Bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1526
[2] svn co 
https://svn.code.sf.net/p/podofo/code/podofo/branches/_dev/zyx_integration

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


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo Patch - Count as reference in page tree

2014-06-10 Thread zyx
On Tue, 2014-06-10 at 10:16 +0200, Petr Pytelka wrote:
> There is small patch in the attachment which solves the issue.

Hi,
the patch looks fine, I committed it as r1604:
http://sourceforge.net/p/podofo/code/1604
Bye,
    zyx


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo Patch - Count as reference in page tree

2014-06-11 Thread zyx
On Wed, 2014-06-11 at 22:28 +0200, Petr Pytelka wrote:
> -int GetChildCount( const PdfObject* pNode ) const;
> +static int GetChildCount( const PdfObject* pNode );
>  
> Reasons to change signature of the method:
> 1. GetChildCount does not need any member variables from PdfPagesTree

Hi,
so it is kind-of a utility function, which can explain why it's 
private.

> 2. Method is called from the constructor of PdfPagesTree

That's not problem at all, it can be done.

> 3. Method is private in PdfPagesTree and was used only at one place. 
> Changing signature cannot break any APIs or applications.

Maybe will not break API, still will change it. None of the 3 points 
is a strong argument to make the function static, at least from my 
point of view. If anyone else can rise his/her voice regarding this 
change, then I'll appreciate it.

Otherwise the patch looks fine.
Bye,
zyx



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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-15 Thread zyx
On Thu, 2014-06-05 at 17:17 +0200, zyx wrote:
> I'd like to include it in the next release. The merge will take some
> time, though. I'll announce when it's done (I'll be working on it 
> mostly
 during weekends).


Hi,
the changes from zyx_integration branch are committed to trunk now, it 
ends at revision 1639. The zyx_integration branch is dead now.

I'll give the trunk some testing during the next week, then I'd guess 
it'll be ready for the 0.9.3 release. Any pre-release testing of the 
svn trunk [1] will be appreciated.
Bye,
zyx

[1] A svn command to get latest trunk code of PoDoFo is:
    $ svn co https://svn.code.sf.net/p/podofo/code/podofo/trunk podofo-trunk


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo Patch - Count as reference in page tree

2014-06-15 Thread zyx
On Thu, 2014-06-12 at 07:56 +0200, zyx wrote:
> Otherwise the patch looks fine.

Hi,
I went ahead and committed, slightly changed, Petr's patch
as r1640.
http://sourceforge.net/p/podofo/code/1640
Bye,
    zyx


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] podofo patch (minor spelling error)

2014-06-15 Thread zyx
On Sun, 2014-06-15 at 22:04 -0500, Dennis Jenkins wrote:
>

Hi,
committed as r1641.
http://sourceforge.net/p/podofo/code/1641
Thanks and bye,
    zyx

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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-15 Thread zyx
On Sun, 2014-06-15 at 21:44 -0500, Dennis Jenkins wrote:
> SVN REV 1640 build log:
>  
> Linking CXX executable CreationTest
> CMakeFiles/CreationTest.dir/CreationTest.cpp.o: In function 
> `CreateUnicodeAnnotationFreeText(PoDoFo::PdfPage*, 
> PoDoFo::PdfDocument*)':
> CreationTest.cpp:(.text+0x409): undefined reference to 
> `PoDoFo::PdfDocument::CreateFont(char const*, bool, 

Hi,
it seems to me that you link against old PoDoFo.lib. Please try
"make clean", or even wipe out your 'build' folder and regenerate it
from scratch (I use cmake -G "Unix Makefiles" $PATH_TO_PODOFO_CHECKOUT).

I tested each commit here, also on Linux, and they worked for me.
I installed cppunit later, thus the fixes in r1639 inside test/unit/.

Hope it helps,
zyx
-- 
http://www.litePDF.cz i...@litepdf.cz


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-16 Thread zyx
On Mon, 2014-06-16 at 11:00 -0500, Dennis Jenkins wrote:
> 
/home/djenkins/code/capybara/t1/tools/pdf-dump.cpp:100: undefined 
> reference to `PoDoFo::PdfDocument::CreateFont(char const*, bool, 
> PoDoFo::PdfEncoding const*, 
> PoDoFo::PdfFontCache::EFontCreationFlags, bool)'
> collect2: error: ld 
> returned 1 exit status
> make: *** [output/pdf-dump] Error 1

This one is new to me. The CreateFont API was changed, it contains 
'bIsSymbol' bool now, to be set to 'true' when the font contains 
symbol characters, rather than, well, latin characters (inaccurate 
name, I'm sorry).
> lib/report/ReportBaseClass-pdf.cpp:58:15: error: 'const class 
> PoDoFo::PdfError' has no member named 'what'
> ._txt (err.what());
>^

Hi,
the above is caused by change of the PdfError class, it doesn't 
inherit from std::exception anymore.


> lib/report/state/Generic-SUTA-pdf.cpp: In member function 'double 
> Report_Generic_SUTA::_pdf_rpt_header(PoDoFo::PdfMemDocument*, 
> PoDoFo::PdfPainter&, double) const':
> lib/report/state/Generic-SUTA-pdf.cpp:182:7: error: 'class 
> PoDoFo::PdfPainter' has no member named 'DrawRect'
>   pntr.DrawRect (x1, y, w1, h1, r1, r1);
>^
>  
> lib/pdf/pdf-tools.cpp: In function 'void 
> pdf_setAppearanceStreamCheckBox(PoDoFo::PdfCheckBox*)':
> lib/pdf/pdf-tools.cpp:113:10: error: 'class PoDoFo::PdfPainter' has no member 
> named 'FillRect'
>   painter.FillRect (0, xObjOff.GetPageSize().GetHeight(), 
> xObjOff.GetPageSize().GetWidth(), xObjOff.GetPageSize().GetHeight());
>   ^

Caused by drawing API change.

Bye,
zyx


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Bug in podofo-doc.rc.in from rev 1605

2014-06-17 Thread zyx
On Mon, 2014-06-16 at 10:45 +0200, Petr Pytelka wrote:
> My current solution is to revert back the change.

Hi,
thanks for the heads-up, I fixed it in r1642:
http://sourceforge.net/p/podofo/code/1642
Bye,
    zyx

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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Heads-Up: Drawing API to be changed within the next few weeks

2014-06-17 Thread zyx
On Tue, 2014-06-17 at 16:38 -0500, Dennis Jenkins wrote:
> I found your notes in the SVN commit messages.  "DrawRect()" is now 
> "Rectangle()" followed by "Stroke()" (although in my existing 
> reports, I did not need to call Stroke, I added the call anyway, per 
> your notes.)
>  
> My project now compiles cleanly with podofo rev 1642, and my PDFs 
> appear ok so far.
>  
> I suppose that I was expecting to see some sort of organized release 
> notes giving a brief mention to the API change details, instead of 
> "hey, I changed stuff and merged it into trunk!".  :)  In any event, 
> I wish to thank you for your contributions.  Now that I have read 
> your notes, your rationales make sense.  I was just frustrated that 
> it broke my own project.  But I'm good now.

Hi,
that's correct, I wrote detailed description of changes into commit 
messages only. There are no release notes, simply because there is no 
release of these changes yet. Trunk is not a release, trunk is a 
development version of the code, an unstable codebase which will be 
released once the changes settle. That's also the reason why the 
online doxygen still lists the removed functions, it's still relevant 
for the latest release, PoDoFo 0.9.2.

I mean, once the release will be done, the API changes being done 
should be described in the release notes, just as you/all expect, the 
best with a description how to migrate existing code (in my case copy 
of the commit messages should do it).

I also agree with you, API changes are horrible, sometimes even 
deprecation of functions, though I hope those I did are for good 
reason. The drawing API allows more freedom now - you just define the 
path and then Stroke, Fill or StrokeAndFill (the last it in one call, 
not in two with path redefinition).

Bye,
zyx


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] Proposing release of PoDoFo 0.9.3 to July 7th, 2014

2014-06-22 Thread zyx
Hello,
I did some initial testing of current PoDoFo trunk (ending in r1645 
inclusive) within the litePDF project and it looks good from my side.
I will do few more tests during the next days, but as far as I can 
tell, the trunk is ready for a release, thus I'd like to propose a 
date for the PoDoFo 0.9.3 release to Monday, July 7th, 2014. It's 
still about 14 days away, thus there is still time to integrate some 
more fixes. If you have anything on mind, or in a shelf, then it would 
be good to send it for inclusion.

I'm proposing the date from a semi-user's side, not as a PoDoFo 
developer, which I'm really not. The final decision is to Dominik.
I can help as much as I would be able, though I never did a PoDoFo 
release, thus I'm not 100% sure of the right procedure (page update & 
documentation update & release notes & ...).
Bye,
zyx


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


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Proposing release of PoDoFo 0.9.3 to July 7th, 2014

2014-06-24 Thread zyx
On Mon, 2014-06-23 at 22:23 -0700, plinnell wrote:
> On Sun, 22 Jun 2014 19:04:25 +0200
> zyx  wrote:
>  
> Questions to be answered:

Hi,
that's not a call for me, I'm only proposing to do a release, the 
7/7/2014 looked/looks like a very nice date. :)
 
> Are the docs updated with new features ?

devel-documentation might be created automatically from sources, thus 
I'd say "it's done on its own".

> 

> I can create and gpg sign the tarballs to be uploaded to sourceforge if
> wanted.  Any objections ?
> 


Better ask Dominik here.

> Are there any translations to be done ?
>  

I do not see any translations in the PoDoFo project myself.

Let's wait for Dominik, when he gets time for this.
Bye,
zyx

> 

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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Proposing release of PoDoFo 0.9.3 to July 7th, 2014

2014-06-29 Thread zyx
Dne 27.6.2014 18:26, Dominik Seichter napsal(a):
> A release on 7/7/2014 sounds good to me. I can help or even do the
> release (update webpage, upload tarball). Or, if zyx wants to do the
> release, I can also assist. Whatever you prefer.
>
> Can anyone tag the source on 7/7/2014 (or whenever you think we are
> ready). I could create a tarball from this. It would also be very
> helpful to me, if someone could put release notes together.

Hi,
I prefer if you do the release (it's easier for me, heh) :)

I want to look on Dennis' regression, I only didn't find time to look on 
it yet. I hope I'll be able to today. I'll update the thread once I'd 
have some findings, if no-one else would be quicker.
Bye,
zyx

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] SVN commit 1587 broke ability to parse several PDFs

2014-06-29 Thread zyx
On Sun, 2014-06-22 at 23:26 -0500, Dennis Jenkins wrote:
> Hello All,
> 
> I recently noticed that PoDoFo (svn rev 1642) was unable to 
> parse several older PDFs (all obtained from the USA IRS for tax 
> years 2011 and before).  These PDFs were made with profession Adobe 
> products, so I expect them to be conformant.
> 
> I narrowed down the version of PoDoFo that causes the failure, 
> but I have not analyzes the source code diff yet.  These PDFs parsed 
> without error under PoDoFO svn rev 1586, but failed on rev 1857 
> (2014-04-01, change to PdfParser.cpp).  Attempting to open the 
> document with PoDoFo::PdfMemDocument() throws "ePdfError_NoNumber".
> 
> I have a total of 6 IRS tax forms for various years that all 
> fail to open in PoDoFo (they all throw the same exception [2]), but 
> for now, I'll just focus on one.  This [1] PDF was created with 
> "Adobe LiveCycle Designer ES 8.2" on 2010-11-22. (October 2010 
> revision of the 941 tax form).
> 
> I suspect that PDFs are conformant (unproven hunch) and that 
> PoDoFo 1587+ is buggy.
> 
> Thoughts?  Analysis?
> 
> 
> [1]   http://www.irs.gov/pub/irs-prior/f941--2010.pdf
> 
> [2]  The following stack trace is from PoDoFo rev 1587:
> PoDoFo encounter an error. Error: 14 ePdfError_NoNumber
> Error Description: A number was expected but not found.
> Callstack:
> #0 Error Source: /tmp/podofo/src/src/base/PdfParser.cpp:226
> Information: Unable to load objects from file.
> #1 Error Source: /tmp/podofo/src/src/base/PdfParser.cpp:289
> Information: Unable to skip xref dictionary.
> #2 Error Source: /tmp/podofo/src/src/base/PdfParser.cpp:738
> #3 Error Source: /tmp/podofo/src/src/base/PdfParser.cpp:551
> Information: Unable to load /XRefStm xref stream.
> #4 Error Source: 
> /tmp/podofo/src/src/base/PdfParserObject.cpp:109
> Information: Object and generation number cannot be 
> read.
> #5 Error Source: 
> /tmp/podofo/src/src/base/PdfTokenizer.cpp:365
> Information: xref
> 
> 
> 

Hi Mark,
I tried to investigate the above issue, which is after your fix for 
XRefStm streams read at r1587 ( 
http://sourceforge.net/p/podofo/code/1587 ). The file Dennis gave a 
link to at [1] above seems fine with respect of references to 
/XRefStm, but it seems that one of the streams contains a reference to 
an object which is out of position and instead of pointing to some 
"1234 0 obj" the offset points to 'xref' tag. Here is backtrace from 
gdb:

#0  PoDoFo::PdfTokenizer::GetNextNumber (this=0x7fffd1d0) at 
src/base/PdfTokenizer.cpp:366
#1  0x004af132 in 
PoDoFo::PdfParserObject::ReadObjectNumber (this=0x7fffd180) at 
src/base/PdfParserObject.cpp:105
#2  0x004af459 in 
PoDoFo::PdfParserObject::ParseFile (this=0x7fffd180, pEncrypt=0x0, 
bIsTrailer=false) at src/base/PdfParserObject.cpp:134
#3  
0x004d1da1 in PoDoFo::PdfXRefStreamParserObject::Parse 
(this=0x7fffd180) at src/base/PdfXRefStreamParserObject.cpp:60
#4  
0x004a9597 in PoDoFo::PdfParser::ReadXRefStreamContents 
(this=0x7b19d0, lOffset=203913, bReadOnlyTrailer=false) at 
src/base/PdfParser.cpp:824
#5  0x004a9690 in 
PoDoFo::PdfParser::ReadXRefStreamContents (this=0x7b19d0, 
lOffset=204202, bReadOnlyTrailer=false) at src/base/PdfParser.cpp:840

#6  0x004a84ae in PoDoFo::PdfParser::ReadNextTrailer 
(this=0x7b19d0) at src/base/PdfParser.cpp:549
#7  0x004a8f9a in 
PoDoFo::PdfParser::ReadXRefContents (this=0x7b19d0, lOffset=204376, 
bPositionAtEnd=true) at src/base/PdfParser.cpp:734
#8  
0x004a6ba0 in PoDoFo::PdfParser::ReadDocumentStructure 
(this=0x7b19d0) at src/base/PdfParser.cpp:287
#9  0x004a6853 in 
PoDoFo::PdfParser::ParseFile (this=0x7b19d0, rDevice=..., 
bLoadOnDemand=true) at src/base/PdfParser.cpp:213
#10 
0x004a6604 in PoDoFo::PdfParser::ParseFile (this=0x7b19d0, 
pszFilename=0x531b73 "f941--2010.pdf", bLoadOnDemand=true) at 
src/base/PdfParser.cpp:157
#11 0x004878e6 in 
PoDoFo::PdfMemDocument::Load (this=0x7aa5b0, pszFilename=0x531b73 
"f941--2010.pdf") at src/doc/PdfMemDocument.cpp:186
#12 
0x0047b435 in main () at test.cpp:69


I think of reverting the patch, to support those "probably broken" 
files, but I'd like to hear from you too, whether the file is truly 
broken.

Thanks and bye,
zyx


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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edi

Re: [Podofo-users] SVN commit 1587 broke ability to parse several PDFs

2014-06-30 Thread zyx
On Sun, 2014-06-29 at 18:56 +0200, zyx wrote:
> I think of reverting the patch, to support those "probably broken"
> files, but I'd like to hear from you too, whether the file is truly
> broken.

Hi,
Dennis, could you try with the attached patch, preferably on current 
trunk, please? It seems to survive on the file you gave a link to, but 
I only tried to open it, not to modify in it or read its objects.
Thanks and bye,
zyx


-- 
http://www.litePDF.cz i...@litepdf.cz
Index: src/base/PdfParser.cpp
===
--- src/base/PdfParser.cpp	(revision 1645)
+++ src/base/PdfParser.cpp	(working copy)
@@ -836,8 +836,18 @@ void PdfParser::ReadXRefStreamContents(
 // Check for a previous XRef stream
 if(xrefObject.HasPrevious()) 
 {
-m_nIncrementalUpdates++;
-this->ReadXRefStreamContents( xrefObject.GetPreviousOffset(), bReadOnlyTrailer );
+try {
+m_nIncrementalUpdates++;
+this->ReadXRefStreamContents( xrefObject.GetPreviousOffset(), bReadOnlyTrailer );
+} catch(PdfError &e) {
+/* Be forgiving, the error happens when an entry in XRef stream points
+   to a wrong place (offset) in the PDF file. */
+if( e != ePdfError_NoNumber )
+{
+e.AddToCallstack( __FILE__, __LINE__ );
+throw e;
+}
+}
 }
 }
 
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] SVN commit 1587 broke ability to parse several PDFs

2014-06-30 Thread zyx
On Mon, 2014-06-30 at 14:57 -0500, Dennis Jenkins wrote:
> With your patch applied to a clean checkout of rev 1646, my test 
> suite can now open every PDF that I have (various tax forms from 
> 2009 to current).  I have not attempted to make use of the contents 
> of the files that previously failed to parse, so I do not know if 
> they are fully intact (in PoDoFo's internal model).  My quick+dirty 
> testing tool can count the number of pages in these PDFs though 
> (seems ok).

Hi,
thanks for a quick testing. I committed the patch as r1648 [1]. If 
you'll find time and give it more thorough testing by Friday, then 
it'll be great (you know, just in case it has any side-effects).
        Thanks again and bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1648


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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Proposing release of PoDoFo 0.9.3 to July 7th, 2014

2014-07-04 Thread zyx
On Sun, 2014-06-29 at 14:40 +0200, Dominik Seichter wrote:
> Ok, great. I plan to do the release on July 7th. Hope we can get 
> Dennis' regression fixed till then.
> 

Hi,
I never wrote any release notes before, thus I'm not sure whether it's 
in a good shape or not, but I walked through commits since the 0.9.2 
release (r1514) and I would use something along these lines:

--

* OSX build fixes
* Fixed AES decryption
* Improved load of (broken) PDF files
* Sign PDF file as an incremental update
* Added partial support for Type3 font encoding and metrics
* Drawing API improvements
* Unicode file names for attachments
* Font subset embedding

API changes:
*  GetFont() functions have one more argument, bool bIsSymbolCharset,
   which was added before the encoding, thus adapt your code
   accordingly

* drawing API changed, currently a path to draw is defined first, then
  it can be Stroke, Fill, StrokeAndFill or Clip. Changes on
  PdfPainter/MM which should be done for new API are:
- replace DrawRect() with call of Rectangle(); Stroke();
- replace FillRect() with call of Rectangle(); Fill();
- similarly for other dropped functions

* PdfError doesn't derive from std::exception anymore, catch
  for (PdfError &e) instead

--

I didn't write any credits for all the contributors whom helped to improve 
PoDoFo since 0.9.2, I'm not sure how these use to be (and I feel a shame when I 
miss anyone from the list, if it might be done namely). :)

Dominik, I suppose you'll create the tag just before the release. Am I correct?

Hope it helps,
zyx


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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] GetUnicodeCharCode not found

2014-07-04 Thread zyx
On Fri, 2014-07-04 at 15:12 +0530, VED PRAKASH wrote:
> 
>I am getting an error in PdfDifferenceEncoding.cpp that "No 
> member named GetUnicodeCharCode in Podofo::PdfSimpleEncoding" . See 
> image attached.
> 
>   How to solve this error ? All the includes seems ok for me. And 
> even the method GetUnicodeCharCode is there too, but error doesn't 
> go.
> 


Hi,
It seems to me that your editor has a stale cache of (public) symbols, 
it probably didn't update it after you updated the sources. I'm only 
guessing here. I also see the function there, the same as you. I can 
compile the code under Microsoft, Borland and gcc compilers, that's 
why I guess it's something with with your IDE/Editor.
Bye,
zyx



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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo 0.9.3 released

2014-07-07 Thread zyx
On Mon, 2014-07-07 at 21:39 +0200, Dominik Seichter wrote:
> 
> PoDoFo 0.9.3 has been released today. Please find the new release on 

> http://podofo.sf.net.
> 

Hi,
thanks a lot for the release. I'd like to thank to all the 
contributors too. Good job.
    Bye,
zyx


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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] v0.9.3 fails to build on OSX Lion

2014-07-09 Thread zyx
On Tue, 2014-07-08 at 16:06 -0500, Kunda Loves Scribus wrote:
> On Tue, Jul 8, 2014 at 12:16 PM, plinnell  
> wrote:
> > On Tue, 8 Jul 2014 07:48:14 -0500
> > Kunda Loves Scribus u...@gmail.com>
 wrote:
> > 
> > > Hi all, thanks for the great work on getting this release out.
> > >
> > > So apparently the new release builds fine on ML and Mavericks but
> > > fails on Lion. Here is a log file of an attempt to merge the new
> > > release in to Homebrew repo but fails due to BrewTestBot not 
> > able to
> > > compile on Lion:
> > > 

> > http://bot.brew.sh/job/Homebrew%20Pull%20Requests/12783/version=lion/
testReport/brew-test-bot/lion/install_podofo/
> > >
> > > Here is the snippet:
> > >
> > > [ 42%] Building CXX object
> > > src/CMakeFiles/podofo_shared.dir/doc/PdfFontCache.cpp.o
> > > cd /tmp/podofo-CQtG/podofo-0.9.3/build/src &&
> > > /usr/local/Library/ENV/4.3/clang++   -Dpodofo_shared_EXPORTS 
> > -fPIC
> > > -I/usr/local/include -I/usr/local/opt/libpng/include
> > > -I/tmp/podofo-CQtG/podofo-0.9.3/build 
> > -I/tmp/podofo-CQtG/podofo-0.9.3
> > > -I/tmp/podofo-CQtG/podofo-0.9.3/src -I/usr/X11/include/freetype2
> > > -I/usr/X11/include -I/usr/local/opt/fontconfig/include
> > > -DBUILDING_PODOFO -o
> > > CMakeFiles/podofo_shared.dir/doc/PdfFontCache.cpp.o
> > > -c /tmp/podofo-CQtG/podofo-0.9.3/src/doc/PdfFontCache.cpp 
> > /tmp/podofo-CQtG/podofo-0.9.3/src/doc/PdfFontCID.cpp:51:10:
> > > fatal error: 'ft2build.h' file not found
> > > #include 
> > >  ^
> > > /usr/local/Cellar/cmake/3.0.0/bin/cmake -E cmake_progress_report
> > > /tmp/podofo-CQtG/podofo-0.9.3/build/CMakeFiles
> > > [ 42%] Building CXX object
> > > src/CMakeFiles/podofo_shared.dir/doc/PdfFontConfigWrapper.cpp.o
> > > cd /tmp/podofo-CQtG/podofo-0.9.3/build/src &&
> > > /usr/local/Library/ENV/4.3/clang++   -Dpodofo_shared_EXPORTS 
> > -fPIC
> > > -I/usr/local/include -I/usr/local/opt/libpng/include
> > > -I/tmp/podofo-CQtG/podofo-0.9.3/build 
> > -I/tmp/podofo-CQtG/podofo-0.9.3
> > > -I/tmp/podofo-CQtG/podofo-0.9.3/src -I/usr/X11/include/freetype2
> > > -I/usr/X11/include -I/usr/local/opt/fontconfig/include
> > > -DBUILDING_PODOFO -o
> > > CMakeFiles/podofo_shared.dir/doc/PdfFontConfigWrapper.cpp.o
> > > -c 
> > /tmp/podofo-CQtG/podofo-0.9.3/src/doc/PdfFontConfigWrapper.cpp 1
> > > error generated. make[2]: ***
> > > [src/CMakeFiles/podofo_shared.dir/doc/PdfFontCID.cpp.o] Error 1
> > > make[2]: *** Waiting for unfinished
> > > jobs 
> > /tmp/podofo-CQtG/podofo-0.9.3/src/doc/PdfFontCache.cpp:68:10:
> > > fatal error: 'ft2build.h' file not found #include 
> > >  ^
> > > 1 error generated.
> > > make[2]: *** 
> > [src/CMakeFiles/podofo_shared.dir/doc/PdfFontCache.cpp.o]
> > > Error 1
> > > make[1]: *** [src/CMakeFiles/podofo_shared.dir/all] Error 2
> > > make: *** [all] Error 2
> > >
> > >
> > > ---
> > > Thanks in advance for anyone with the time and capability to 
> > help with
> > > this.
> > > Cheers,
> > > /Kunda
> > 
> > 
> > This means it cannot find the Freetype2 headers. That is where I 
> > would
> > look first to fix the build.
> > 
> > Thanks,
> > Peter
> Thanks Peter :)
> 
> Good news:
> With some assistance, Podofo v0.9.3 now can install on Lion, 
> Mountain Lion and Mavericks (via Homebrew) by adding 2 Cmake args 
> below. Disregard the interpolated strings, they just indicate where 
> the include directory is installed by Homebrew's packaged Freetype2.
> 
> "-DFREETYPE_INCLUDE_DIR_FT2BUILD=#{Formula['freetype'].include}/freetype2",
> "-DFREETYPE_INCLUDE_DIR_FTHEADER=#{Formula['freetype'].include}/freetype2/config/",
> 

Hi,
that's odd. Arno's change from [1] (patch2) was supposed to address 
it. It didn't work for Linux, thus he provided an update which I 
committed as r1586 [2] - the part in cmake/modules/FindFREETYPE.cmake.

I do not have Mac, thus I was not able to test it there.

Could you provide a patch for cmake/modules/FindFREETYPE.cmake, which 
would keep backward (other systems) compatibility and work out of the 
box for Mac too?
Bye,
zyx

[1] http://sourceforge.net/p/podofo/mailman/message/32039124/
[2] http://sourceforge.net/p/podofo/code/1586



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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Compile problems

2014-07-09 Thread zyx
On Tue, 2014-07-08 at 18:39 -0400, David Raabe wrote:
> Howdy there:
> 
> On server Ubuntu with all prereqs installed, using gcc 4.8.2, I get 
> the following output upon attempting to cmake Podofo 0.9.3
> 
> -- The CXX compiler identification is unknown
> -- Could NOT find LIBJPEG (missing:  LIBJPEG_LIBRARY 
> LIBJPEG_INCLUDE_DIR)
> -- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR)
> -- Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
> -- Ensure you cppunit installed version is at least 1.12.0
> -- Could NOT find Lua50 (missing:  LUA_LIBRARIES LUA_INCLUDE_DIR)
> -- Could NOT find Lua (missing:  LUA_LIBRARIES LUA_INCLUDE_DIR)
> -- Configuring incomplete, errors occurred!
> See also "/usr/podofo-build/CMakeFiles/CMakeOutput.log".
> See also "/usr/podofo-build/CMakeFiles/CMakeError.log".
> 
> All of the non-found libraries are "optional" in the documentation 
> (I don't need to do anything with images), so I suspect that the 
> problem is with the compiler identification being unknown.  How can I
> fix this?
> 

Hi,
could you check the content of the two files, please? Those:
   See also "/usr/podofo-build/CMakeFiles/CMakeOutput.log".
   See also 
"/usr/podofo-build/CMakeFiles/CMakeError.log".
That should give a hint.
Bye,
zyx


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


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo and Linearization

2014-07-27 Thread zyx
On Wed, 2014-07-23 at 19:26 +0200, Ulrich Arnold wrote:
> I had removed this line in 2009-09-08 due to problems with 
> lineariza-x-evo-endtion and
> xrefs. With revision 1580 2014-01-05 this line was reenabled by Libor Kone
> (probably as a prerequisite for digital signing with incremental updates).

Hi,
thanks for the heads-up. I've also not much idea what's going on, but 
based on Libor Konečný's comment in the code, he enabled it only for 
testing, thus I disabled the code again in r1660 [1]. I do not have a 
linearized PDF to test the incremental signature with, whether it'll 
work with this change or not. If you have any pointers or test 
linearized PDF, then I'll be happy to test it. The last resort would 
be to call that function only in case of the document being read as 
part of the incremental signing, aka hackish semi-solution.
Bye,
zyx

[1] http://sourceforge.net/p/podofo/code/1660


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


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo and Linearization

2014-07-28 Thread zyx
On Mon, 2014-07-28 at 12:09 +, Leonard Rosenthol wrote:
> As for finding one - just open and save ANY PDF from Adobe Acrobat.

Hi,
I tried that, but my XI-something (I think, I do not have the machine 
running right now) reader saved the file as 1:1 with the source, which 
was generated by PoDoFo. I didn't change anything in the file, just 
took Save As.

> Our default is to linearize them.  Here is a small sample for your 
> enjoyment
> :).

Thanks, I will test with it and report back. The latest by the end of 
this week.
    Bye,
zyx

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


--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PoDoFo and Linearization

2014-07-30 Thread zyx
Dne 28.7.2014 14:09, Leonard Rosenthol napsal(a):
> Linearization tables should NEVER be read on a file with incremental
> updates.

Hi,
just a follow up, I tested the PoDoFo with incremental sign at revision 
1661 and it is able to sign your linearized PDF without any issue.
Thanks and bye,
        zyx


--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] DecodeParms, how to use?

2014-08-19 Thread zyx
On Tue, 2014-08-19 at 13:17 +0930, Domonic Tom wrote:
> ...
> 
> < 12>>/Filter/FlateDecode/ID[<6647557224A6C102A60F6D82BB22C18D>]/Index[10
>  
> 20]/Info 9 0 R/Length 64/Prev 23381/Root 11 0 R/Size 
> 30/Type/XRef/W[1 2 1]>>
> 
> If I know which object this is and extract the dictionary then I 
> can't see why it won't work.

Hi,
I do not think I can help you much here, also because I'm unsure what 
you are trying to do, but maybe this will help a little bit:

Once you have a PdfDictionary, you can get its keys (and values) by:
   if (dict->HasKey("Columns"))
columns = dict->GetKey("Columns");

See the base/PdfDictionary.h for more GetKey...() variants. 

If yours 'dict' points to:
   <>...>>
then the way to get into the inner/sub-dictionary might be:
   columns = dict->GetKey("DecodeParams")->GetDictionary().GetKey("Columns");
Some safety checks like HasKey() and IsDictionary() will make your 
code more error proof.

> PdfDictionary *dict = new PdfDictionary;
> *dict = obj->GetDictionary();
> 

The above construction is incorrect by many means. It might be done 
either directly, like in the snippets I wrote above (not assigning to a
 variable) or by:
   const PdfDictionary &dict = obj->GetDictionary();
   if (dict.HasKey(...)) ...

Hope it helps,
zyx


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


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


Re: [Podofo-users] DecodeParms, how to use?

2014-08-20 Thread zyx
Dne 19.8.2014 19:41, Domonic Tom napsal(a):
> Can you see what I mean.  The Decode function requires a pointer
> argument.  I have to provide it with a PdfDictionary so getting the
> Decode Parms directly is of no use in this case.
>
> dict->HasKey("Columns") and dict->HasKey("Predictor") both indicate
> true, so when I load the dictionary it is definitely seeing those parms.
>
> I can't seem to decode a stream with parms using this function so I'm
> not sure what is going wrong.  If I use this very same code (without
> parms) on other streams, it decompresses them fine.  When I need to use
> Parms it doesn't decompress the stream.  Just outputs jumble.
>
> That's all I am trying to do, just using the *Decode Function* from
> *PdfFilter*.

Hi,
I never used the function directly myself, neither I have any PDF where 
I would be able to test this, but searching PoDoFo sources, the only 
mention of 'DecodeParams' is at base/PdfFiltersPrivate.cpp, which reads 
values directly from that dictionary with PdfPredictorDecoder. It means 
the PdfPredictorDecoder expects a dictionary, which is the content of 
/DecodeParams.

Searching on the usage of PdfPredictorDecoder, only two filters are 
instantiating it, they are PdfFlateFilter and PdfLZWFilter, if it's 
passed to it.

If I read the PdfPredictorDecoder properly, then it supports only TIFF 
and PNG predictors. The number 12 means, according to the 
implementation, that the actual predictor to use is stored as the first 
(the next) byte of the stream. The PdfPredictorDecoder doesn't implement 
all predictors, thus it's possible that your stream is encoded in a way 
which PoDoFo cannot decode.
Bye,
zyx

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


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] DecodeParms, how to use?

2014-08-21 Thread zyx
Dne 20.8.2014 12:48, Domonic Tom napsal(a):
> Hi, Thanks again.  That could very well be it.  But I think I know how I
> may be able to fix it.
> It may not actually be Podofo, because Podofo actually depends on 'zlib'
> for it's Flate encoding and decoding needs.
>
> I'm currently using Podofo 0.9.1 and an older version of zlib-1.2.3 on
> Windows XP.  My guess is that I'm using a version of zlib which is too
> old. It's possible. Zlib 1.2.3 was put out in 2005 and Pdf 1.5 (which is
> the version I have) was put out in 2003.  I'm not sure but this could be
> the case.
>
> Either that or I will need to upgrade to Podofo 0.9.3.
>
> Does any of this sound plausible?

Hi,
I've no idea. It depends on your actual file which you want to decode. 
In any case, trying with the latest version of the PoDoFo and its 
dependencies is always a good idea.
Bye,
zyx


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] EDIT Bug in PdfDate + FIx

2014-09-14 Thread zyx
Dne 30.8.2014 8:44, Marc De Mulder napsal(a):
> Sorry, i found a bug in PdfDate::CreateStringRepresentation(), but
> didn't find any other way to report it
> The error lines are commented out and i appended "// Original code !
> (n)" to the corresponding line. n is 1,2,3 or 4
> The corrected line is just below the problem line. (4 problem lines)
>
> Sorry i overlooked the bug marked as 3 !
> localtime_s(&stm, &m_time ) returns En != 0 on error, En == 0 means NO error

Hello,
thanks for the code, the best option is to create real diff files, 
either from a svn checkout of the current PoDoFo (or any other open 
source project using any version control system like cvn, svn, git, 
mercury, ...) with a command like "svn diff >file.patch". If you do not 
have any such checkout, then having an original file and creating your 
changes into a new file, you can get a similar patch with a command like 
this:
$ diff -up file.orig file >file.patch

> //En = localtime_s(stm, &m_time );

I also mentioned the "current PoDoFo checkout" above, because the code 
you use is not what the current (0.9.3) PoDoFo has. There is no 
localtime_s() in the base/PdfDate.cpp now [1]. I suggest you to use more 
recent version of PoDoFo.
Bye,
zyx

[1] 
http://sourceforge.net/p/podofo/code/1661/tree/podofo/trunk/src/base/PdfDate.cpp#l145

--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] How to extract document level attachments from pdf file using PoDoFo library?

2014-09-14 Thread zyx
Dne 3.9.2014 14:58, Laith Dawahier napsal(a):
> I have Pdf files with attachments and am wonder how can I extract these
> files from the PDF using PoDoFo library( and I do not have any other
> option to use another library ).

Hello,
there had been asked a similar question couple months ago. Please see 
thread [1] for more information.
Hope it helps,
    zyx

[1] http://sourceforge.net/p/podofo/mailman/message/31421224/


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] [PATCH] Recognise OpenType and TTC fonts

2014-09-14 Thread zyx
On Sun, 2014-09-14 at 05:29 +0900, Simon Cozens wrote:
> Index: src/doc/PdfFontFactory.cpp
> ===
> --- src/doc/PdfFontFactory.cpp  (revision 1661)
> +++ src/doc/PdfFontFactory.cpp  (working copy)
> @@ -314,6 +314,10 @@
> 

Hello,
thanks for the patch. I committed it as r1663:
http://sourceforge.net/p/podofo/code/1663

The next time, please provide patches as attachments. Mail agents can 
break the body, but usually not the attachments (I was not able to 
apply the patch from the mail).

Thanks and bye,
zyx


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


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] [PATCH] Allow DrawGlyph to be used when not subsetting

2014-09-14 Thread zyx
On Sun, 2014-09-14 at 05:30 +0900, Simon Cozens wrote:
> Index: src/doc/PdfPainter.cpp
> ===
> --- src/doc/PdfPainter.cpp  (revision 1661)
> +++ src/doc/PdfPainter.cpp  (working copy)
> @@ -1227,7 +1227,9 @@
> 

Hello,
thanks for the patch. I committed it as r1664:
http://sourceforge.net/p/podofo/code/1664

The next time, please provide patches as attachments. Mail agents can 
break the body, but usually not the attachments (I was not able to 
apply the patch from the mail).
Thanks and bye,
zyx


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


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Podofo enhanced support for *.ttc fonts

2014-09-14 Thread zyx
On Wed, 2014-09-10 at 12:46 +0200, dennis wrote:
> The *.ttc support for windows stated in this submit by an 
> ex-colleague
> of mine is insufficient:
> http://sourceforge.net/p/podofo/mailman/message/27461957/
> 
> It only works if the *.ttc has a font in it with the platformid = 0
> (unicode platform) and if that font has a languageID = 0 (unicode 
> 1.0).
> I fixed that issue so that all *.ttc files with a font in them which 
> has
> a platformId = 3 (Windows) are supported as long as they have a
> languageID equal to the users local LCID or (as fallback) an english
> version of the font (id = 1033).
> (Details on ttc naming tables:
> http://www.microsoft.com/typography/otspec/name.htm)
> 
> What has to be done in the future:
> - More attributes of the font should be checked e.g. fontstyle,
> ps-fontname etc. (now only the fontname will be checked against the
> demanded fontname)
> 

Hello,
I committed your patch (just replaced tabs with 4 spaces) ar r1662:
http://sourceforge.net/p/podofo/code/1662
Bye,
zyx



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


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] [PATCH] Allow DrawGlyph to be used when not subsetting

2014-09-21 Thread zyx
Dne 21.9.2014 16:13, Simon Cozens napsal(a):
> On 15/09/2014 02:27, zyx wrote:
>> thanks for the patch. I committed it as r1664:
>> http://sourceforge.net/p/podofo/code/1664
>
> Thanks for this. There is still something wrong with PdfPainter::DrawGlyph but
> I am not sure how to fix it; in particular this line:
>
> PdfFont* pGlyphFont = pDocument->CreateDuplicateFontType1( m_pFont, "Glyph1" 
> );
>
> (a) looks Type1 specific when there's no guarantee that Type1 fonts are being
> used, and
> (b) certainly allocates a massive amount of memory when Type1 fonts are not
> being used. (It creates a new font for every call to DrawGlyph, and I'm
> calling it a lot.)
>
> If I change it to the (obviously incorrect)
>
> PdfFont* pGlyphFont = m_pFont;
>
> then there is no loss of functionality for me and no memory growth when using
> TTF fonts. However, it obviously forces the font into difference encoding. I
> don't know what the implications of that are because I'm only using fonts via
> DrawGlyph.
>
> Does there need to be a CreateDuplicateFontTTF?

Hi,
I'm sorry, but I do not know. I'm only a regular user of the PoDoFo with 
commit rights, thus I can commit patches sent to this list ("if I 
want/can").

I do not use that DrawGlyph (directly), neither I wrote it.
Bye,
zyx


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfPainter::DrawGlyph and GetObjects

2014-09-21 Thread zyx
Dne 20.9.2014 13:59, Simon Cozens napsal(a):
> I'm trying to use PdfPainter::DrawGlyph with a PdfStreamedDocument object
> instead of a PdfMemDocument object. They're both PdfDocuments and if I cast
> the pDocument manually it works; I wondered whether DrawGlyph could just be
> rewritten to take a PdfDocument argument instead.
>
> But when I tried to do that, I found that there's a weird type signature
> mismatch. The base class PdfDocument has
>
> PdfVecObjects *   GetObjects ()
>
> but PdfMemDocument has
>
> PdfVecObjects &   GetObjects ()

Hi,
it looks like a bug to me. There had been some API changes in the past, 
and this particular bit seems to be overlooked. 'svn blame' on both 
files may give a hint when and why the change was done. I'd prefer to 
have the two use the same prototype, most likely the one from 
PdfMemDocument, if possible (aka if all the descendants has the 
PdfVecObjects always available).

> At this point I'm out of my depth. Is there a good reason why we can only draw
> glyphs on in-memory documents,

You might try it. Maybe the call of CreateFontDuplicate() manipulates 
objects in a way which prevent it to be used in streamed documents (once 
written data cannot be rewritten there).

> and is there a good reason why the return value
> of GetObjects is different in PdfMemDocument class?

see above, looks like a bug/left-over from my point of view.
Bye,
zyx


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PdfFilteredDecodeStream ?

2014-09-21 Thread zyx
Dne 20.9.2014 18:53, Svetlana Watkins napsal(a):
> Can someone tell me why I cannot declare PdfFilteredDecodeStream.  It
> is not in the PdfFilters header file?  Only the PdfFilters source file.Â

Hello,
could you be a bit more specific, please? What exactly are you trying to 
do? What is the exact compiler/linker error? What is the compiler you 
use? Maybe it's a compiler's limitation.

By the way, if you are trying to declare a new class of the same name in 
your project's sources, why do you pick such a complicated name for it?
    Bye,
zyx


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] How to reduce pdf document size?

2014-10-28 Thread zyx
On Tue, 2014-10-28 at 09:32 +0100, Sebastian Haag wrote:
> 
> I create a PDF document using PdfMemDocument (podofo 0.9.2). It 
> contains just a few words but is around 420KB in size. I think the 
> "oversize" comes from the Filter/FlateDecode part. How can I reduce 
> the output filesize?
> 

Hi,
the size is caused by the font being embedded in the document. The 
FlateDecode is a compression, it makes things smaller.

You might want to not embed the font, or embed only subset (used 
letters). Better to use 0.9.3, where the related things were improved.

See the PdfDocument::CreateFont() variants, each of them has 
  bool bEmbedd = true
argument. Set it to false to not embed the font. But beware, some PDF 
viewers may fail to show the text when the font is not embedded.

Yet another option is to use one of the built-in fonts, instead of 
system fonts, for example instead of Arial use Helvetica. The names of 
base 14 (standard) fonts can be found at the end of 
PdfFontFactoryBase14Data.h.
        Hope it helps,
zyx

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


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


Re: [Podofo-users] About PoDoFo DrawImage (was: Podofo-users Digest, Vol 100, Issue 3)

2014-11-11 Thread zyx
On Tue, 2014-11-11 at 09:44 +0800, wangg...@visteam.com wrote:
> 
> Hello all!
> You are still not completely understood my problem, I really want to 
> use the podofo to realize the signature.

Hi,
I do not think so, I believe Robert understands your issue pretty well 
(it's only my point of view).

> But i don't want to use the PdfSignOutputDevice this method, I will
> put the signature to make a picture file, i want to use the DrawImage
> this method.

You might be aware that "an image" is not an electronic signature of a 
PDF document by any means. The electronic signature does much more 
than just the image, it for example ensures that the content of the 
file was not changed, thus you see what the person sent (and signed).

> 
> I know that the lower left corner coordinates is the origin of 
> coordinates.

That makes things clear, maybe? If you want to flip the image, then 
it'll be drawn properly. That is, either use a negative height (and 
shift the top origin slightly towards bottom), or preppend a 
transformation matrix which will do the Y-flip for you before the draw 
of the image.

Bye,
zyx

P.S.: Please do not reply to message digests, it breaks references, 
threading, message subject and you just sent an email full of 
unrelated information to your question.

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


--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] podofo not drawtext chinese please help me thankyous

2014-11-26 Thread zyx
On Wed, 2014-11-26 at 16:35 +0800, MarkTam亿万富翁 wrote:
> 
>  //PdfString sJap(reinterpret_cast pdf_utf8*>("你好!中国"));  error // PdfString 
> sJap(reinterpret_cast(L"你好!中国")); true but not show
> PdfString sJap("你好!中国");
> // PdfString sJap((wchar_t*)("你好!中国"));
>  std::string sTemp = sJap.GetStringUtf8();
> 

Hi,
you didn't seem to try unicode encoding in the source file and unicode 
variant of the PdfString constructor, that is:
PdfString sJap(L"你好!中国");

I would try that. By the way, 0.9.1 is quite old, I would update to a 
more recent version, 0.9.3 ( 
http://podofo.sourceforge.net/download.html ).

Hope it helps,
zyx

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


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] 转发:回复: podofo not drawtext chinese please help methankyous

2014-11-30 Thread zyx
On Sun, 2014-11-30 at 13:22 +0800, MarkTam亿万富翁 wrote:
> Hi z...@litepdf.cz
>  I look litepdf can do sign pdf. 
> can you help me to use podofo generator sign pdf file
> Look forward to your reply!
> 

Hi,
first of all, if you want to talk to me, then talk to me, not to an 
"unrelated" mailing list. Subscribers to the list might not be 
interested in a private conversation.

The second thing, if you are starting a new thread, then do not use 
unrelated subject and thread references. That's just misleading and 
breaks mailing list archive searches. Not talking about useless quoted 
text in your email.

You are right, litePDF can digitally sign PDF document. It uses PoDoFo 
for it, thus it's a proof that PoDoFo can digitally sign PDF 
documents. There are examples of how to do it in PoDoFo sources, thus 
just search for it. It took me some time to figure out how to do it 
too, so welcome on board.
Bye,
zyx

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


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] compiling podofo manually?

2015-01-07 Thread zyx
On Wed, 2015-01-07 at 17:46 +0300, Yuliana Zigangirova wrote:
> 
> I have tried to unset precompiler  defines in "podofo_config.h" like 
> "DEBUG" and "PODOFO_VERBOSE_DEBUG" but
> this output is still here.   So, where should I set precompiler 
> defines (like DEBUG, PODOFO_EXTRA_CHECKS etc.)
> when compiling manually?  How is correct error verbosity set?  What 
> would be correct options for production build?  I have used  Borland 
> options for
> release build.
> 

Hi,
try, somewhere in main(), to call:
   PdfError::EnableLogging(false);
   PdfError::EnableDebug(false);
It'll mute those messages, if I recall correctly.
Bye,
zyx

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


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] compiling podofo manually?

2015-01-07 Thread zyx
On Thu, 2015-01-08 at 09:54 +0300, Yuliana Zigangirova wrote:
> Thank you, this has muted the messages indeed.
> But I would very much like to be sure, that extra checks
> anddebugging were not enabled during compilation and that I got the 
> most possible efficient and quick library build.
> Do you may be know which configuration file is commonly
> read in all respectful sources?
> 

Hi,
it's the podofo_config.h you filled manually. It is included in 
PdfCompilerCompat.h. Looking into this file gives you some hints on 
DEBUG and _DEBUG differences, which this file defines for PoDoFo in a 
way it is used in sources.

In any case, I would not edit the PdfCompilerCompat.h file, your main 
place for customization is the podofo_config.h and compiler flags, 
where you can also declare the desired defines. Search the code for 
the DEBUG macro, then you'll see how often it's used. And to get the 
most efficient code, just turn on the compiler optimizations.
Bye,
zyx

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


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] copy pdf pages without xobjects wrapping?

2015-01-08 Thread zyx
On Thu, 2015-01-08 at 20:12 +0300, Yuliana Zigangirova wrote:
> I have taken a pdf from Adobe website -  Adobe PDF Reference, 1.7, 
> sixth
> edition  - 31 MB large
> and have copied 10 pages from there to a new pdf file.  The resulted 
> PDF has the same 31MB and the copying of 10 pages took 35 minute!
> I have tried to look at the pdf source - it looks like only 
> references in the page tree are
> changed and  all other pages are also there silently, with there 
> content.
> 
> I  mean, something is definitely wrong here.  Most probably it is me 
> - probably I do not use some necessary options or something,
> and I would be very glad if someone could tell me where my error 
> could be
> and  how to do this correctly.
> 

Hi,
you do not do anything wrong. When you look at the body of 
PdfDocument::InsertExistingPageAt() [1], then you can see that it 
always copies all the objects and pages and so on. Thus it's the 
PoDoFo which doesn't copy only the necessary objects. I recall seeing 
some comment in the code along these lines, but I cannot find it right 
now. There was also a note to better copy the whole document and 
delete unwanted pages, rather that copy page by page.
Bye,
zyx

[1] 
http://sourceforge.net/p/podofo/code/HEAD/tree/podofo/trunk/src/doc/PdfDocument.cpp#l369

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


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PATCH for PdfXRefStreamParserObject.cpp (Repost)

2015-01-14 Thread zyx
On Tue, 2015-01-13 at 10:40 +0100, A. Massad wrote:
> 
> I have managed to fix this issue with the following patch to 
> PdfXRefStreamParserObject.cpp, the if-statement added just before 
> the switch-statement fixed this bug:
> 
> > ===
> > --- podofo-src-r1665/src/base/PdfXRefStreamParserObject.cpp 
> > (revision 7630)
> > +++ podofo-src-r1665/src/base/PdfXRefStreamParserObject.cpp 
> > (working copy)
> > @@ -228,6 +228,7 @@
> >  
> >  //printf("OBJ=%i nData = [ %i %i %i ]\n", nObjNo, 
> > static_cast(nData[0]), static_cast(nData[1]), 
> > static_cast(nData[2]) );
> >  (*m_pOffsets)[nObjNo].bParsed = true;
> > +if (lW[0]==0) nData[0]=1; // If the first element is zero, 
> > the type field shall not be present, and shall default to type 1.
> >  switch( nData[0] ) // nData[0] contains the type information 
> > of this entry
> >  {
> >  case 0:
> Without this patch, I could not create a PdfMemDocument for a 
> certain PDF sample file which contains an XRef with a W-key of the 
> form [0 3 0]. The symptom looked like this
> > 

Hi,
it seems nobody took an action on your previous request from 2014-11-29.
Pity. Anyway, I didn't check the exact code and consequences, but on 
the first look, does it make sense to modify the nData[0] value? It 
seems to me that a cleaner solution would be something like this:

switch( lW[0] == 0 ? 1 : nData[0] )

thus when you'll save the document it'll still contain the same 
reference as before it's opened in PoDoFo. Again, I didn't check the 
actual code and other consequences. It's also possible that such check 
should be done on more places than just here (which your value 
overwrite hid).

By the way, it's better to attach patches, rather than paste them 
inline, especially when you compose in an HTML format. This one-liner 
is not a big problem, still you expect someone to open the editor and 
apply it manually, instead of just invoking a `patch` command. Once 
you'd like to provide a patch for something more complicated the 
garbled patch would be just the main obstacle. It's garbled due to 
white-spaces (even a tab replacement, which depends on the actual mail 
agent which would show the message body), indentation and line 
wrapping.

Bye,
zyx

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


--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Release 0.9.3, SVN revision

2015-01-18 Thread zyx
Dne 17.1.2015 19:53, Dennis Jenkins napsal(a):
>  What SVN revision was used to create the official 0.9.3 release that is
> available for download here [1]?

Hi,
it's r1650, according to the release tag:
http://sourceforge.net/p/podofo/code/1650

>  Gentoo Linux is still using 0.9.2.  I've been building my own project
> against podofo svn trunk head, which is installed as 0.9.4 [2].  I am
> trying to build my project on a new Gentoo server that only has official
> packages installed, and it fails (the podofo API has subtle changes).  My
> end goal is to coordinate with the Gentoo podofo package maintainer to
> publish 0.9.3 or 0.9.4.  But before I do that, I want to recreate 0.9.3
> from SVN and test against that.  If that version does not have the API
> level that I need, then I want to request that Podofo publish 0.9.4 as an
> official release.

You are right, the 0.9.4 is the current development version, any 
distribution should not use it unless an official release is done.
Bye,
zyx

P.S: I cannot speak about actual future release date or anything 
related, I'm only a regular user of PoDoFo.

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] PATCH for PdfXRefStreamParserObject.cpp (Repost)

2015-02-11 Thread zyx
> >   switch( lW[0] == 0 ? 1 : nData[0] )
> Yes, I agree: your solution is cleaner and does fix the problem.

Hi,
I received a private reply from Amin couple weeks ago with his 
acknowledge that the above change works, thus I committed it as r1666:
http://sourceforge.net/p/podofo/code/1666

Bye,
    zyx

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


--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] Patches

2015-03-05 Thread zyx
Hi,
thanks for the patches, just beware of stealing threads.

On Fri, 2015-02-27 at 08:32 -0600, Mark Rogers wrote:
> Patch1
> Fixes a problem with a previous patch I sent, that occurs when a PDF 
> contains a mix of xref tables (ISO 32000-1 7.5.4)  and XRefStm 
> streams (ISO 32000-1 7.5.8.1) in the Prev chain. This happens if a 
> PDF has been through multiple tools, for example the W-9 PDF on  
> irs.gov. PoDoFo currently assumes that all xrefs sections following 
> an XRefStm are all XRefStms as well (which is not always true).
> Has been used in production since July 2014

Committed as r1668:
http://sourceforge.net/p/podofo/code/1668
 
> Patch 2
> Fixes a NULL pointer de-ref on some badly formed PDFs
> Has been used in production since Sept 2014

Committed as r1669:
http://sourceforge.net/p/podofo/code/1669

Bye,
zyx

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


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


Re: [Podofo-users] patch for libdir

2015-03-24 Thread zyx
On Sat, 2015-03-21 at 10:59 +0200, Elan Ruusamäe wrote:
> as tickets creation is disabled in sourceforge page, sending patch to
> mailing list

Hi,
there is no patch attached here. (I know you pasted the link, but the 
link can get obsolete soon).

> the attached patch adds support for controlling lib dir with 
> standard LIB_SUFFIX variable.

Do you have any pointers where is stated that the LIB_SUFFIX is the 
standard variable for this purpose, please? Searching with Google gave 
me nothing trustworthy, even getting some people prefer LIB_SUFFIX 
while other prefer LIBDIR_SUFFIX, which makes this a mess. Not that 
it's against your change, I'm only chasing for some details.
Thanks and bye,
zyx

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


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


  1   2   3   4   5   6   7   8   >