Printing to PostScript with PDFBox produces a massive file, why? -


i using pdfbox create pdfs , working great. have need create postscript files generate pdf create. using following code have pdfbox work simpledoc create postscript file. working file massive. 30kb pdf produces 2meg postscript file. need change create reasonably sized postscript file?

    printrequestattributeset aset = new hashprintrequestattributeset();     aset.add(mediasizename.na_letter);      fileoutputstream fos = new fileoutputstream(filepathandname);     map<integer, string> pagelayoutmap = pdfgenerator.getpagelayoutmap();     (int = 1; <= document.getnumberofpages(); i++) {         aset.add(new pageranges(i, i));         if (pagelayoutmap.get(i).equals(pdfgenerator.orientation_landscape)) {             aset.add(orientationrequested.landscape);         } else {             aset.add(orientationrequested.portrait);         }         streamprintservice sps = factories[0].getprintservice(fos);         docprintjob dpj = sps.createprintjob();         simpledoc sd = new simpledoc(new pdfprintable(document, scaling.actual_size, false), flavor, null);         factories[0].getprintservice(fos).createprintjob().print(                 new simpledoc(new pdfprintable(document, scaling.actual_size, false), flavor, daset), aset);     }     fos.close();     document.close(); 

thank you


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -