-
December 10th, 2006, 07:20 AM
#1
PDF manipulation C/C++ API needed
Hi guys, is there anything free and preferably cross-platform on the subject?
I found an API on pdfonline [dot] com but it's 30 days trial, if somebody know a good PDF API, please, let me know.
P.S. I need to split the input pdf file into several, in such a way that each of newly created pdf files are actually the pages of the source file.
Many thanks in advance.
-
December 10th, 2006, 09:16 AM
#2
Re: PDF manipulation C/C++ API needed
Originally Posted by AvDav
Hi guys, is there anything free and preferably cross-platform on the subject?
I found an API on pdfonline [dot] com but it's 30 days trial, if somebody know a good PDF API, please, let me know.
See if there is a C++ port of the Java-based itext system. Otherwise, prepare to pay big money.
Regards,
Paul McKenzie
-
December 10th, 2006, 11:57 AM
#3
Re: PDF manipulation C/C++ API needed
Thanks Paul, however it is strange why there are lots of free pdf libs in Java, but there isn't any in C++. Well, perhaps I'll have to code in Java, since even Adobe's pdf-dev facility is just an ActiveX control for only viewing and data extraction, for everything else one should buy their SDK.
-
December 10th, 2006, 12:04 PM
#4
Re: PDF manipulation C/C++ API needed
-
December 10th, 2006, 12:38 PM
#5
Re: PDF manipulation C/C++ API needed
Thanks, JohnyDog, but they require VC++ 7.x, I have no opportunity to setup anything higher 6.0, besides .dsp/.dsw/.sln files are missing to build the lib, as mentioned in their readme file.
-
December 12th, 2006, 05:07 PM
#6
Re: PDF manipulation C/C++ API needed
Have you considered digging through the source of any application that supports saving to PDF?
Also, I did a quick search on sourceforge and found libharu free PDF library. The examples look pretty reasonable to me.
You'll have to let me know if you use it, and if so, what you think of it! (I've always been tempted by this sort of thing.) -- Paul
-
December 12th, 2006, 05:54 PM
#7
Re: PDF manipulation C/C++ API needed
Well, thank you very much, I'll tell my opinion if you are interested in and if I'll use it, but as its API reference documentation shows - looks a bit ugly and have complicated design, perhaps not usual for me coz it's passed a long time when I was using pure C API.
-
December 12th, 2006, 06:04 PM
#8
Re: PDF manipulation C/C++ API needed
This portion of the code can tell something about optimization skills of the coder who developed this lib
Code:
for (j = 0; j <= strlen (samp_text) / 2; j++) {
HPDF_Page_MoveTo (page, x_pos, p.y - 10);
HPDF_Page_LineTo (page, x_pos, p.y - 12);
HPDF_Page_Stroke (page);
x_pos = x_pos + 30;
}
-
December 12th, 2006, 06:05 PM
#9
Re: PDF manipulation C/C++ API needed
Originally Posted by AvDav
but as its API reference documentation shows - looks a bit ugly and have complicated design
That is because PDF can get complicated. It is difficult to wrap a multiple hundred page PDF spec into a library with just a few calls.
perhaps not usual for me coz it's passed a long time when I was using pure C API.
Most API's are 'C' based, since the goal is to get the library to work with as many languages as possible (the C++ name-mangling gets in the way of other programming languages utilizing the library). What you can do is develop a C++ wrapper class for the functions. This is what a lot of C++ programmers using a 'C' API end up doing in the long run.
Regards,
Paul McKenzie
-
December 12th, 2006, 06:08 PM
#10
Re: PDF manipulation C/C++ API needed
Originally Posted by AvDav
This portion of the code can tell something about optimization skills of the coder who developed this lib
Code:
for (j = 0; j <= strlen (samp_text) / 2; j++) {
HPDF_Page_MoveTo (page, x_pos, p.y - 10);
HPDF_Page_LineTo (page, x_pos, p.y - 12);
HPDF_Page_Stroke (page);
x_pos = x_pos + 30;
}
Not to defend the programmer, that was one of the samples, right? It wasn't the actual library code, was it?
Anyway, PDF is not an easy spec to write a library for. I would commend the person who is maintaining this library. However my hats go off to the two guys that maintain iText. Now those two are some dedicated fellows.
Regards,
Paul McKenzie
-
December 12th, 2006, 06:14 PM
#11
Re: PDF manipulation C/C++ API needed
Yeah, Paul, you are right ... as usual
-
July 4th, 2013, 09:58 PM
#12
Re: PDF manipulation C/C++ API needed
pdf manipulation c# codes can be found here. there a a few samples and tutorials you can have a look. i think it is the library you are looking for. it is simple.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|