How to use iText java PDF library with PHP?
up vote
3
down vote
favorite
Google search results suggested that it's possible via PHP/Java Bridge . This bridge requires Java Application Server. My host (bluehost) does not allow to run any Java Application Server. What are the alternatives in this case to make iText work? Switching a host is not viable option for me.
Thanks.
php pdf itext application-server
add a comment |
up vote
3
down vote
favorite
Google search results suggested that it's possible via PHP/Java Bridge . This bridge requires Java Application Server. My host (bluehost) does not allow to run any Java Application Server. What are the alternatives in this case to make iText work? Switching a host is not viable option for me.
Thanks.
php pdf itext application-server
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
1
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
2
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Google search results suggested that it's possible via PHP/Java Bridge . This bridge requires Java Application Server. My host (bluehost) does not allow to run any Java Application Server. What are the alternatives in this case to make iText work? Switching a host is not viable option for me.
Thanks.
php pdf itext application-server
Google search results suggested that it's possible via PHP/Java Bridge . This bridge requires Java Application Server. My host (bluehost) does not allow to run any Java Application Server. What are the alternatives in this case to make iText work? Switching a host is not viable option for me.
Thanks.
php pdf itext application-server
php pdf itext application-server
asked Dec 8 '10 at 17:55
understack
4,338216394
4,338216394
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
1
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
2
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30
add a comment |
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
1
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
2
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
1
1
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
2
2
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30
add a comment |
4 Answers
4
active
oldest
votes
up vote
0
down vote
There's always iTextSharp, a C# translation of iText. Will your host let you run C#?
It looks like you can call C# from PHP, as detailed here.
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
add a comment |
up vote
0
down vote
I know this is an old post, but for those still looking for an answer, may I suggest having Java do your work for you as a REST service using Jersey (JAX-RS), then just call the service from PHP. You can put your Java service on a host that does allow Java and you can call that service from PHP using cURL (or even file_get_contents if your host allows it and if you know what you're doing).
Loose coupling over RESTful services is allows you to have your Java service and your PHP app on separate hosts. Don't waste you time with a PHP/Java Bridge. It's perfectly sane to call a RESTful service with a Java back-end from PHP. This way, later if you decide, your would rather re-do the service in C# or something else, at least there will be 0 impact on the PHP app because you used a language neutral RESTful approach.
I have not had any performance issues using this approach myself, YMMV
(It's mostly a matter of design: It's usually better to "bolt" things together then "weld" them together.)
Also, Java with JAX-RS is very very simple (IMHO, but again .. YMMV)
add a comment |
up vote
0
down vote
The ITEXT website specifically says JAVA and .NET, Wish they can also build the PHP or PERL version
I have used the Java Itext, Its superb!!
add a comment |
up vote
-1
down vote
PDFtk is a command line tool installed on many Linux systems. It is a front end to the iText library. It may do what you need. You'd have to shell out to the command line to invoke it from PHP.
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There's always iTextSharp, a C# translation of iText. Will your host let you run C#?
It looks like you can call C# from PHP, as detailed here.
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
add a comment |
up vote
0
down vote
There's always iTextSharp, a C# translation of iText. Will your host let you run C#?
It looks like you can call C# from PHP, as detailed here.
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
add a comment |
up vote
0
down vote
up vote
0
down vote
There's always iTextSharp, a C# translation of iText. Will your host let you run C#?
It looks like you can call C# from PHP, as detailed here.
There's always iTextSharp, a C# translation of iText. Will your host let you run C#?
It looks like you can call C# from PHP, as detailed here.
answered Dec 8 '10 at 18:39
Mark Storer
13.5k13064
13.5k13064
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
add a comment |
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
1
1
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
Just my opinion, but if Java is not allowed, I think its highly unlikely that there is a .NET Framework environment where C# apps run. And the COM interface of PHP is not really something you want to use. By the way, the article is from 2002.
– Max
Dec 8 '10 at 18:43
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
2002? Eek! Well I doubt it's harder to connect the two now.
– Mark Storer
Dec 8 '10 at 18:54
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
Just checked, C# is not an option either. I guess, I've to look for other libraries.
– understack
Dec 8 '10 at 19:03
add a comment |
up vote
0
down vote
I know this is an old post, but for those still looking for an answer, may I suggest having Java do your work for you as a REST service using Jersey (JAX-RS), then just call the service from PHP. You can put your Java service on a host that does allow Java and you can call that service from PHP using cURL (or even file_get_contents if your host allows it and if you know what you're doing).
Loose coupling over RESTful services is allows you to have your Java service and your PHP app on separate hosts. Don't waste you time with a PHP/Java Bridge. It's perfectly sane to call a RESTful service with a Java back-end from PHP. This way, later if you decide, your would rather re-do the service in C# or something else, at least there will be 0 impact on the PHP app because you used a language neutral RESTful approach.
I have not had any performance issues using this approach myself, YMMV
(It's mostly a matter of design: It's usually better to "bolt" things together then "weld" them together.)
Also, Java with JAX-RS is very very simple (IMHO, but again .. YMMV)
add a comment |
up vote
0
down vote
I know this is an old post, but for those still looking for an answer, may I suggest having Java do your work for you as a REST service using Jersey (JAX-RS), then just call the service from PHP. You can put your Java service on a host that does allow Java and you can call that service from PHP using cURL (or even file_get_contents if your host allows it and if you know what you're doing).
Loose coupling over RESTful services is allows you to have your Java service and your PHP app on separate hosts. Don't waste you time with a PHP/Java Bridge. It's perfectly sane to call a RESTful service with a Java back-end from PHP. This way, later if you decide, your would rather re-do the service in C# or something else, at least there will be 0 impact on the PHP app because you used a language neutral RESTful approach.
I have not had any performance issues using this approach myself, YMMV
(It's mostly a matter of design: It's usually better to "bolt" things together then "weld" them together.)
Also, Java with JAX-RS is very very simple (IMHO, but again .. YMMV)
add a comment |
up vote
0
down vote
up vote
0
down vote
I know this is an old post, but for those still looking for an answer, may I suggest having Java do your work for you as a REST service using Jersey (JAX-RS), then just call the service from PHP. You can put your Java service on a host that does allow Java and you can call that service from PHP using cURL (or even file_get_contents if your host allows it and if you know what you're doing).
Loose coupling over RESTful services is allows you to have your Java service and your PHP app on separate hosts. Don't waste you time with a PHP/Java Bridge. It's perfectly sane to call a RESTful service with a Java back-end from PHP. This way, later if you decide, your would rather re-do the service in C# or something else, at least there will be 0 impact on the PHP app because you used a language neutral RESTful approach.
I have not had any performance issues using this approach myself, YMMV
(It's mostly a matter of design: It's usually better to "bolt" things together then "weld" them together.)
Also, Java with JAX-RS is very very simple (IMHO, but again .. YMMV)
I know this is an old post, but for those still looking for an answer, may I suggest having Java do your work for you as a REST service using Jersey (JAX-RS), then just call the service from PHP. You can put your Java service on a host that does allow Java and you can call that service from PHP using cURL (or even file_get_contents if your host allows it and if you know what you're doing).
Loose coupling over RESTful services is allows you to have your Java service and your PHP app on separate hosts. Don't waste you time with a PHP/Java Bridge. It's perfectly sane to call a RESTful service with a Java back-end from PHP. This way, later if you decide, your would rather re-do the service in C# or something else, at least there will be 0 impact on the PHP app because you used a language neutral RESTful approach.
I have not had any performance issues using this approach myself, YMMV
(It's mostly a matter of design: It's usually better to "bolt" things together then "weld" them together.)
Also, Java with JAX-RS is very very simple (IMHO, but again .. YMMV)
answered Jun 23 '14 at 6:12
Michael Mügge
3,83312030
3,83312030
add a comment |
add a comment |
up vote
0
down vote
The ITEXT website specifically says JAVA and .NET, Wish they can also build the PHP or PERL version
I have used the Java Itext, Its superb!!
add a comment |
up vote
0
down vote
The ITEXT website specifically says JAVA and .NET, Wish they can also build the PHP or PERL version
I have used the Java Itext, Its superb!!
add a comment |
up vote
0
down vote
up vote
0
down vote
The ITEXT website specifically says JAVA and .NET, Wish they can also build the PHP or PERL version
I have used the Java Itext, Its superb!!
The ITEXT website specifically says JAVA and .NET, Wish they can also build the PHP or PERL version
I have used the Java Itext, Its superb!!
answered Jun 8 at 9:10
jsraymond
11
11
add a comment |
add a comment |
up vote
-1
down vote
PDFtk is a command line tool installed on many Linux systems. It is a front end to the iText library. It may do what you need. You'd have to shell out to the command line to invoke it from PHP.
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
add a comment |
up vote
-1
down vote
PDFtk is a command line tool installed on many Linux systems. It is a front end to the iText library. It may do what you need. You'd have to shell out to the command line to invoke it from PHP.
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
add a comment |
up vote
-1
down vote
up vote
-1
down vote
PDFtk is a command line tool installed on many Linux systems. It is a front end to the iText library. It may do what you need. You'd have to shell out to the command line to invoke it from PHP.
PDFtk is a command line tool installed on many Linux systems. It is a front end to the iText library. It may do what you need. You'd have to shell out to the command line to invoke it from PHP.
answered Jun 1 '16 at 23:29
bmb
4,78113152
4,78113152
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
add a comment |
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
Pdftk is a front end to a very, very, very old version of iText.
– Amedee Van Gasse
Jun 2 '16 at 6:07
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4390675%2fhow-to-use-itext-java-pdf-library-with-php%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you are on shared hosting that doesn't run Java, I don't think this can be done at all.
– Pekka 웃
Dec 8 '10 at 17:59
1
If java is not installed, there is not much you can do. Your best bet is probably a PHP based PDF library, see here: php.net/manual/en/faq.using.php#faq.using.freepdf
– Max
Dec 8 '10 at 18:46
2
Hey, if you're generating PDFs, I can fairly strongly recommend wkhtmltopdf which uses the super-awesome webkit rendering engine to render html documents to pdf. It has few external dependencies, so it's pretty easy to get going. It's what pdfmyurl uses, so you can try that out if you want to test your results.
– davidtbernal
Dec 8 '10 at 18:52
A related question stackoverflow.com/questions/1648715/…
– Jaydee
Jun 9 '14 at 14:30