How to call Web Based or Cloud Based PDF Stamping Service from Java source code?

Hi,

I'm looking for a service where I can call a service with a string as an input parameter. I want that string to be stamped on the header of all the pages of the PDF file and return a link to download the PDF file.

Is this something that can be done through your service? If yes, can you give a Java code sample that I can use to test your service through my system before purchasing the subscription? I would like to host the PDF on your system and serve a stamped version to my clients who would invoke the service through a link on my site.

Thanks.
Customer
---------------------------------------

image
VeryPDF Cloud API Platform has this function, please look at following web page,

http://www.verypdf.com/online/cloud-api/index.html

Please look at stamp options in VeryPDF Cloud API Platform from following web pages,

http://www.verypdf.com/wordpress/201308/verypdf-cloud-api-platform-pdf-stamper-cloud-api-38024.html

http://www.verypdf.com/wordpress/201308/verypdf-cloud-api-platform-advanced-pdf-tools-cloud-api-stamp-pdf-rotate-pdf-set-pdf-metadata-set-pdf-version-number-set-pdf-info-set-pdf-viewer-preferences-resize-pdf-pages-set-custom-fi-38044.html

You can Fetching URLs with java.net.

Note: The URL Fetch service will always issue a GET request when it receives and responds to a 302 response. See more information in the release notes.

You can use java.net.URLConnection and related classes from the Java standard library to make HTTP and HTTPS connections from your Java application. App Engine implements this interface using the URL Fetch service; your application does not make socket connections directly.

A simple way to get the contents of a page at a URL is to create a java.net.URL object, then call its openStream() method. The method handles the details of creating the connection, issuing an HTTP GET request, and retrieving the response data.

import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

// ...
try {

URL url = new URL(
"http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX
&app=pdftools
&infile=http://online.verypdf.com/examples/cloud-api/multipage.pdf
&outfile=out.pdf
&-pdftoolsini=http://online.verypdf.com/examples/cloud-api/pdftools.ini"
);

BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String line;

while ((line = reader.readLine()) != null) {
// ...
}
reader.close();

} catch (MalformedURLException e) {
// ...
} catch (IOException e) {
// ...
}

For more sophisticated requests, you can call the URL object's openConnection() method to obtain a URLConnection object (either an HttpURLConnection or an HttpsURLConnection, depending on the URL). You can prepare this object with additional information before issuing the request. See Using java.net.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in VeryPDF Cloud API and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!