Easy Integration
PDFreactor Web Service works with any language, PDFreactor Library only works with Java based languages.
Check our code examples and try yourself to determine which PDFreactor Product is suitable for your use case.
PDFreactor Web Service works with any language, PDFreactor Library only works with Java based languages.
Check our code examples and try yourself to determine which PDFreactor Product is suitable for your use case.
<!DOCTYPE html><!-- You can download the PDFreactor Web Service JavaScript client from:http://www.pdfreactor.com/download/get/?product=pdfreactor&type=webservice_clients&jre=false -->src="PDFreactor.js"window.onload = async function() {// Create new PDFreactor instancevar pdfReactor = new PDFreactor("https://cloud.pdfreactor.com/service/rest");// Create a new PDFreactor configuration objectvar config = {// Specify the input documentdocument: "http://www.pdfreactor.com/product/samples/textbook/textbook.html",}// Render document and save resulttry {var result = await pdfReactor.convert(config);document.getElementById("result").src = "data:application/pdf;base64," + result.document;} catch (error) {if (error instanceof PDFreactor.PDFreactorWebserviceError) {document.body.innerHTML = "<h1>An Error Has Occurred</h1><h2>" + error.message + "</h2>";}}}id="result" style="width: 100%; height: 95vh"
import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStream;import com.realobjects.pdfreactor.PDFreactor;import com.realobjects.pdfreactor.Configuration;import com.realobjects.pdfreactor.Result;import com.realobjects.pdfreactor.Exceptions.PDFreactorException;public class FirstStepsWithPDFreactor {public static void main(String[] args) {PDFreactor pdfReactor = new PDFreactor();// configuration settingsConfiguration config = new Configuration();// the input documentconfig.setDocument("http://www.pdfreactor.com/product/samples/textbook/textbook.html");// conversion resultResult result = null;try {// render the PDF documentresult = pdfReactor.convert(config);byte[] pdf = result.getDocument();try (OutputStream outputStream = new FileOutputStream("output.pdf")) {outputStream.write(pdf);} catch (IOException e) {e.printStackTrace();}} catch (PDFreactorException e) {// partial result without PDF