Printing a postscript file

Hi there,
I wonder if I'm missing something simple here...
I have this code, which quite happily prints postscript files to the designated printer, however it always prints duplex.
As you can see, I have added print request attributes to force single-sided and two copies, but both of these attributes are ignored.
          PrintService defaultService = getDefaultPrintService();
          if (defaultService != null) {
               try {
                    DocPrintJob docPrintJob = defaultService.createPrintJob();
                    FileInputStream fileInputStream = new FileInputStream(printFile);
                    Doc doc = new SimpleDoc(fileInputStream, DocFlavor.INPUT_STREAM.POSTSCRIPT, null);
                    HashPrintRequestAttributeSet attribs = new HashPrintRequestAttributeSet();
                    attribs.add(Sides.ONE_SIDED);   // <====
                    attribs.add(new Copies(2));    // <====
                    docPrintJob.print(doc, attribs);
               } catch (Exception e) {
                    ExceptionHelper.logException(CLASS, "Print Failure", e);
                    throw new DSEException(DSEException.critical, "", "Input file name : " + outputFileName);
               } finally {
                    // clean up - now delete the postscript file
                    printFile.delete();
          } else {
               throw new DSEException(DSEException.critical, "", "Default Printer Has Not Been Set Up: ");
          }I realise you cannot actually run this code, but it is a bit difficult to provide a working example, unless you have a postscript file hanging around (maybe that's simple?) but can anyone spot an obvious mistake in the code I've shown?
Thanks,
Tim

Thanks Michael, I've had a quick look at that code and it isn't quite the same functionality - but I'll read it over again in more detail in case it helps.
I'll give you a Duke Dollar for making the effort to reply.

Similar Messages

  • Illustrator CS5 - Cannot make custom size when "printing" a PostScript file

    Hi all,
    I've recently picked up Illustrator CS5, and while this year's model sure is lovely, I'm having an issue when I save a file (or print) as a PostScript file. My aim is to convert the file to a PDF using Distiller and in the Print dialogue box, the PPD field in past versions says something along the lines of Adobe PDF 8.0. In CS5, I do not have the option to select that from the PPD drop down menu (Nor can I find the file to add to the list). Additionally, I can't make a 'custom sized pdf,' only preset paper sizes. I've had to resort to opening my files in CS3 to convert them to PostScript files. I forsee this becoming a problem once I start diving into some of Illustrator CS5's new features.
    I get the feeling the program didn't install with an Adobe PDF plug-in and I can't seem to find a substitute online that isn't from 1999 (!). Is there a way to get that plug-in file that my copy of CS3 is using into my CS5?
    I'm on a Mac by the way, version 10.6.

    I feel your frustration!
    I ran all updates and it did nothing because I was still on an older version of Acrobat. Once I installed Acrobat 9, restarted illustrator, I had all of the PDF options avaliable to me found in the link that fuzzydisco design provided me:
    http://kb2.adobe.com/cps/509/cpsid_50981.html
    Having Acrobat 9 seemed to be the essential missing component to me. If you do have Acrobat 9 already, and its not working, then thats a problem I don't know how to fix unfortunately!

  • PRINTING TO POSTSCRIPT FILE

    When using MacOs 10.4 and earlier, I was able to save as postscript file when printing. With MacOs 10.5 this option is no longer available and every time I try that, I get the following error message
    "The Save as PDF and Save PDF as PostScript options in the Printer dialog are not supported"
    Please help!!!

    Good morning - this is from Illustrator CS3 - I am trying to print to a postscript file using a specific PPD - which has specific tonal curves, tray sizes, halftone transfer functions, etc. the postscript file is used to produce plates.

  • Transparant image printing with white backgroud in postscript file

    Hi,
    I am new to Livecycle ES, It would be grateful if some one answer my question.
    I want to place signature image to the form. Dinamically the signature will be changes. and if i print the postscript file, the signature is printing with white background (even it is transparant image - .gif).
    Steps i follow,
    1) Set the field propertly as 'Image Field' in form and declared field name as 'SIGN_SIGN1'.
    2) Populate signature image as encoded value to the XML stream - <SIGN_SIGN1>-----Base64 encoded string of file PICCHI.(BMP/JPG/…)----</SIGN_SIGN1>
    3) Render the form with XDP and XML data.
    I don't get the white background of an image to the PDF output. I am facing problem in Postscript (PS).
    Pls help me.
    Regards,
    Sasi

    Hi paul,
    I have issues in postscript file, the signature image is printing with white background and hiding the backdrop. I don't have issue in  PDF output, it is printing with transparant image and it is not hiding the backdrop.
    Regards,
    Sasi

  • Can't get postscript files to print properly

    I am using Windows XP Pro, Indesign CS2. I upgraded to Acrbat Professional 9. When I upgraded I lost the Distiller printer in my print setting. When I go to print a postscript file, under the ppd tab normally Distiller is listed there. It's not there. Because of this, my files are not printing properly. How do I get Distiller to show up in the ppd box in Indesign?

    I've been exporting to PDF for newspaper ads for years and never heard of a problem, but if your company uses older equipment I can understand why they might want to distill in order to be sure that there is no transparency.
    That aside, It does look as if the behavior has changed in CS4. I no longer see any PPD choices for PS FIle, either, and I do in earlier versions. I have no idea if this is by design, or if it's a bug, but you can report it at Adobe - Feature Request/Bug Report Form
    In the meantime, if you set your desired joboptions as the default in Distiller, instead of choosing Postscript File from the list of printers you should be able to pick Adobe PDF and make the postscript and invoke the distiller all in one step.
    Peter

  • Printing pdf/postscript with JPS 1.4 -- HELP!

    Hi all,
    I've been experimenting with the new java printing service and I have run into a couple problems. In particular, I have been trying to get even the most basic example referring to printing a postscript file directly to a printer. The code is pretty much straight from sun's JPS section.
    here's the code:
    // Input the file
    FileInputStream textstream = null;
    try {
    textstream = new FileInputStream("c:/0011.ps");
    } catch (FileNotFoundException ffne) {
    if (textstream == null) {
    return;
    // Set the document type
    DocFlavor myFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
    // Create a Doc
    Doc myDoc = new SimpleDoc(textstream, myFormat, null);
    // Build a set of attributes
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Copies(5));
    //aset.add(MediaSize.A4);
    aset.add(Sides.DUPLEX);
    // discover the printers that can print the format according to the
    // instructions in the attribute set
    PrintService[] services =
    PrintServiceLookup.lookupPrintServices(myFormat, aset);
    // Create a print job from one of the print services
    if (services.length > 0) {
    DocPrintJob job = services[0].createPrintJob();
    try {
    job.print(myDoc, aset);
    } catch (PrintException pe) {
    System.out.println("error");
    Now....I've just installed printer drivers in Windows 2K for a RICOH and CANON iR550 printer. Both printers support PS3 and the RICOH Aficio AP2700 PS printer also supports IPP (Note: I physically don't have these printers, so I'm just printing to a file and viewing the file with a PCL viewer).
    okay...now...the problem at hand....I can do the following with the code above:
    1) I can print a postscript file to the printer with NO attributes specified...once I add Copies and Media types..no services are found...
    2) specifying a PDF docflavor and pdf file will not return any services.
    3) If I specify AUTOSENSE in the docflavor, the PDF will be sent to the printer but 'junk' will be printed out. Basically, the printer doesn't seem to understand the file type.
    I've tried other printer drivers from other printer companies with no success.
    Now, my question to everyone who has SUCCESSFULLY printed PDF/Postscript with the Java Print Service using attributes such as Mediasize, Duplex printing, Copies...please...please respond to this message and provide some insight on how you did it (i.e. printer type, drivers, code snippit, etc...)
    am I missing something?
    I know alot of people having the same problem...
    Thankyou

    Hi,
    You may want to check the DocFlavors that are supported by the printers.
    Using the command as followed,
    // Get the supported flavour
    DocFlavor[] docFlavors = printer.getSupportedDocFlavors();
    for (int i=0; i < docFlavors.length; i++) {
    System.out.println("Supported flavour is " + docFlavors);
    I also hit into the same problem like you, trying to print a PDF into HP LaserJet 5 using AUTOSENSE. Junk output.
    Check the docFlavor supported on the printers are
    Supported flavour is image/gif; class="[B"
    Supported flavour is image/gif; class="java.io.InputStream"
    Supported flavour is image/gif; class="java.net.URL"
    Supported flavour is image/jpeg; class="[B"
    Supported flavour is image/jpeg; class="java.io.InputStream"
    Supported flavour is image/jpeg; class="java.net.URL"
    Supported flavour is image/png; class="[B"
    Supported flavour is image/png; class="java.io.InputStream"
    Supported flavour is image/png; class="java.net.URL"
    Supported flavour is application/x-java-jvm-local-objectref; class="java.awt.print.Pageable"
    Supported flavour is application/x-java-jvm-local-objectref; class="java.awt.print.Printable"
    Supported flavour is application/octet-stream; class="[B"
    Supported flavour is application/octet-stream; class="java.net.URL"
    Supported flavour is application/octet-stream; class="java.io.InputStream"
    However, do not know how to create a print service to support PDF. Obviously, we know that HP LaserJet 5 can print PDF.
    Regards
    Heng

  • PDF from PostScript file with hyperlinks/bookmarks

    Is there a way to include hyperlinks and bookmarks when printing to Postscript file.
    Direct Export to PDF creates a huge file size so I need to go the PostScript/Distiller route.

    Would it not be possible to use the famous Acrobat Replace Pages featurebug/bugfeature here? (Hyperlinks on, and bookmarks to pages do not get replaced when you replace those.)
    Something like:
    1. Export to PDF.
    2. Print and Distill.
    3. Replace all pages in the document from step 1 with those from step 2.
    4. Done.

  • Rasterization of complex postscript-file crashes in 64-bit Photoshop CS5

    Rasterization of complex PS-file crashes in 64-bit Photoshop CS5
    I have a variety of complex postscript files that were created in Adobe InDesign CS3 and CS5 through "print to postscript file". I try to rasterize these files in Photoshop CS5 (64 bit on Macintosh) and it crashes Photoshop even before the dialog box comes where one has to specify the dpi for rasterizing. If I use Photoshop CS3 or Photoshop CS5 with 32 Bit opening, it does not crash; and in this case I can rasterize a 100cm x 160cm format with 300 dpi.
    If I reduce the complexity to near triviality it works with the 64 bit version.
    A major reason why I bought CS5 was because I thought that with the 64 bit version I can handle rasterization of large files better: there are a few minor artifacts created by rasterization in Photoshop 32 bit version which are presumably due to some memory problems; I thought the 64 bit version can solve it. But now it turns out that the 64 bit version cannot handle complex files at all.
    If I use Distiller to convert the postscript-File into a pdf file, then the 64-bit version does the rasterization, but there are some reasons why I prefer the rasterization directly from the postscript file.
    Is that a bug of the 64 version?
    V.S.

    I did a lot of testing in the meantime since we have often the task to printout large charts with complex content on plotters of medium size printing companies who need tiffs since they cannot handle pdfs with complex contents.
    It turns out that for large charts with complex content the method to export from Indesign to pdf with PDF/X-1a profile and subsequent rasterization in photoshop to create the tiffs sometimes produces a few minor artifacts; mainly very thin white lines that you see in the printout. Also it is not good if your file contains graphics for which PDF/X-1a profile sometimes does not yield the desired high quality. (In addition the pdf file has a lot of display artifacts visible on screen but not manifesting in the rasterized photoshop file.)
    The use of the "High Quality Print" profile (instead of PDF/X-1a profile) makes it worse since sometimes semi-transparent objects are printed as 100 percent solid. The solution in this case is to change the Acrobat 5 compatibility of the "High Quality Print" profile to Acrobat 4 compatibility, this solves the semi-transparent problem, I don't understand why, but it does.
    On Macintosh one can print to pdf (instead of export to pdf), this solves all problems with artifacts as far as I can judge; however  "print to pdf" has PDF/X-1a profile and I don't see any direct way how to change it to "High Quality Print" profile. Presumably I would have to locate somewhere in the Library > Adobe Application Support > Adobe (on Mac) the presets for "print to pdf" and change it if possible.
    The easiest way on Macintosh that gives no artifacts is for large charts with complex content to "print to postscript" (with Adobe PDF 9.0 PPD), then use distiller with any suitable profile, like "PDF/X-1a-2001" profile or "High Quality Print" profile, to produce a pdf. This pdf looks fine on screen and simultaneously when rasterized with Photoshop (for example the 64 bit version of CS5) gives you a good photoshop file.
    You may be right that the workflow
    Indesign > print to postscript > pdf via distiller > rasterize to photoshop file
    is outdated for simple and medium complex projects, but for those really complex large charts this is the only viable way to my knowledge; I also know that some of my colleagues use this sometimes for complex projects when export to pdf creates artifacts.
    V.S.

  • Printing to Postscript with virtual printer

    Hi,
    I would like to have virtual printer that allows to save prints as postscript files (.ps) within specified folder. Without a need to confirm that and or set that each time. Please do you know any solution?
    I also found that the old hints with virtual poscript printer does not work in 10.7 (e.g. http://kb2.adobe.com/cps/404/kb404931.html) - do you know, how could I configure such virtual printer now?
    Thank you for any help.
    Regards,
    Jiri

    Maybe or maybe not:  Running LabVIEW VIs or Executables That Use .NET Assemblies From a Network Drive .
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • Is there a way to create a postscript file in InDesign for a certain page size without a printer?

    I need to set up a postscript file for my book to take it to print but I can set up the print settings for 11 by 17 in. paper. Is there a way to get around this?
    I am using a mac with cs6.

    Is your print service provider requiring a PostScript file? Normally, they would require PDF with any reasonably modern workflow.
    The print to PostScript Printer and Device Independent option is very limited. If there is a particular device your print service provider is using and requires PostScript for, they should be providing a particular PPD for you and thus, allow you to customize the PostScript for that device.
             - Dov

  • How do I print to a postscript file with InDesign CS6 without both extensions, .indd.ps?

    How do I print to a postscript file without an .indd extension in InDesign CS6? I choose Print, choose a print preset from my print shop and Save. The first time I tried it was blank (the Hide Extension was checked), so I tried to save and got a dialog box that said it cannot be saved as an .indd file (duh), to choose both or .ps. I chose .ps and it was fine, but every time I postscripted it gave me this dialog box until I unchecked Hide Extension. After I did that, every time I postscript it automatically saves both extensions. Not a big deal but it is annoying. I just want it to end with .ps like it used to. Any ideas on how to fix this?
    Thanks!!

    I have no idea but I am incredibly curious...why are you doing this?
    Printing to postscript is a completely archaic workflow. Export to PDF
    instead.
    Bob
    TKnudt <mailto:[email protected]>
    Tuesday, January 15, 2013 6:12 PM
    >
          How do I print to a postscript file with InDesign CS6 without
          both extensions, .indd.ps?
    created by TKnudt <http://forums.adobe.com/people/TKnudt> in
    /InDesign/ - View the full discussion
    <http://forums.adobe.com/message/4996731#4996731

  • Printing a PDF document within a postscript file

    I know it is possible to print a PDF document from within a postscript file using Document Structuring Comments and Document Comment Extensions.  Is is possible to print a single page PDF document multiple times as a booklet?  For example I have a PDF document that is a page of graph paper.  I want to print this PDF file 8 times in the form of a booklet.  Is this possible and if it is how would I code the postscript to do this?
    Thank you  in advance
    David

    Where do you know that “it is possible to print a PDF document from withint a PostScript file using Document Structuring Comments and Document Comment Extensions” from?
    PDF is absolutely not part of the PostScript language itself. Nor is there anything in the DSC specifications that provides for printing a PDF document from within a PostScript file.
    Attached to this posting are the two existing pieces of documentation of DSC from Adobe. Neither references such a capability.
    DSC are simply “comments” within a PostScript program file which may be used by preprocessing software or external applications for various puposes, especially associated with prepress actions and placing of EPS (Encapsulated PostScript) in other graphic arts documents.
    Conceivably some implementor of some PostScript product may have provided some capability to embed a PDF file or to invoke the printing of a PDF file from within a PostScript file using custom DSC. However, this is certainly not part of the official PostScript language. I have also attached those specifications as well!
              - Dov

  • Problem printing booklet to Postscript file to PDF (Mac)

    I am running Mac OSX 10.7.5 and InDesign CC 9.2.1
    I am trying to export a booklet to a PDF so I can send it to another machine to print.  I am going to File> Print Booklet and I am printing to a PostScript file. I am then opening it up in Preview and the orientation of the file is messed up.  Below are some screenshots.
    So in File>Print Booklet> Preview it shows that I am perfectly inside the guidelines.  Notice it is in landscape mode. 
    Then I export it to a .ps file and open it up in Preview (note: I have also tried Acrobat IX Pro). And the file is messed up and in portrait mode.
    From what I can tell it looks like InDesign is exporting the file in portrait instead of landscape but I can't change it in the InDesign Print Booklet settings because it is greyed out.
    Any recommendations on how to fix this problem? Or workarounds so that I can export a booklet to a PDF?  I need to export it in 2-up saddle stitch mode, so I need page 1 to be next to page 12 and so on. 
    Thank you for the help!

    You need to download and install the ADPDF9.PPD printer description and use it instead of Device Independent.

  • Indesign CS5 Duplex printing Postscript file

    I am designing a book half english half spanish—It is an instruction manual so you read the english then flip it and read the spanish.
    In my Indesign CS5 document pages 1-30 are English then 30-1 again are spanish (upside down). I need to export them as a postscript file so that I can print it double sided correctly for a mock up.
    I am making multiples of these books and only some are exporting to a postscript correctly and I cannot figure out why.
    When exported to postscript correctly, it should look as if the left page is the cover in english and directly to the right of it is spanish but upside down, and then it alternates all the way to the end. So for example:
    Spread 1: English on left right side up, Spanish on right upside down.
    Spread 2: Spanish on left, English on right
    Spread 3: English on left, Spanish on right.. and so on
    But, some, are exporting so it shows a cover, then a blank page, and all the pages are jumbled up. (I do have "do not include blank pages ticked when exporting to postscript)
    The only guess I have is that it has to do with the page and section numbering? I don't know if this effects how the postscript converts or not. But, I have several books exporting very differently to post script. Please let me know if anyone can help me figure this out!

    I had a brief PM conversation with Stephen this morning, and it just hit me that I may have been thinking about this incorrectly. There are actually two approaches to this kind of document.
    The approach I've been envisioning presents the reader with all the text on only the right-hand pages -- the lefts are all the other language upside down. But thinking back to my youth and buying some two-title sci-fi paperbacks, I think those were built so that if you tore apart the binding in the center of the book you'd wind up with two "normal" books without back covers, and there would be no page overlap between the two titles.
    I'm guessing that the OP actually means to do the second, and I apologize for being dense yesterday. Seems like it was happening all week. If that's true (I mean the binding layout, not my being dense), then I understand what you were saying about Print Booklet, and there's actually a pretty easy way to make this work, I think without a plugin (though IDImposer might turn out to be even easier).
    Here's the approach I would use to make a single book that can be cut apart to make two independent volumes:
    First, download Scott Zanelli's Multipage Importer script from InDesignSecrets » Blog Archive » Zanelli Releases MultiPageImporter for Importing both PDF and INDD Files The script allows you to automate placing multiple pages from either a PDF or another .indd file into a new .indd doc, and it allows you to select the page range to import, the page on which to start placing, and allows scaling, rotation and alignment adjustments.
    Since you have two 30-page sections, make a new 60-page file. The first time you run the script, place the first 30 pages normally, starting on page 1. Now run the script again, choosing the range 31-60, but do the following: check the Reverse Page Order box, Start Placing on Doument Page 31, and Rotate 180:
    You can run this new file trough Print booklet.
    The original content in the new file cannot be edited directly other than moving pages around or cropping/sizing/repostioning the page images. If you need to make text changes or other edits, do them ithe original, then update the links.

  • Print Services : How to Print to a (Postscript) File ???

    Hi Forum,
    for quite a while I'm thinking about migrating our print server to Mac OS X Server, unfortunately I could not find a way to easily create and manage multiple "Pritn-to-File" queues.
    More precisely: what I would need is the ability to create Postscript spoolers on OSX Server which would just operatelike a virtual Printer, showing up on the network as shared but having no real printer on the other side! Just receiving the Postscript files (without limitations on size, media and colors) and dropping it into a predefined Folder on the Server. Sounds so easy...
    Thanks in adavance for any help!

    First the USB stick needs to be formatted in a format the frame can see. That is usually FAT32, the Windows and mostly Universal format (It probably already is formatted like that).
    Next is what photo cataloging and editing program are you using? If it is iPhoto you need to Export the image or images you want to place on that card/stick. Not sure how that is done exactly as I don't use iPhoto but it is one of the menu item options (Could be under the File menu item).
    Then during the export it should ask you where you want to exprt them TO. you would browse to the USB stick and select it. If it Auto places them on your dekstop then use Finder to coy and paste them from your desktop to the USB stick. Or you can try Drag & Drop (I personally never use that as I've never like it) from the Desktop to the USB stick.

Maybe you are looking for

  • LCD TV vs Falt panel monitor

    Hello, Considering purchasing an LCD TV w/VGA connection or an LCD Monitor for replacing my power-hungry-heat-producing CRT. Leaning toward an LCD TV/PC connection over an LCD monitor. Anyone have any experience with these types of comparisons? I kno

  • Help!  Adobe Photoshop 9 - Windows 7 - Installation Issues

    upgraded to a new laptop.  I can't install a licensed version of Adobe Photoshop Elements 9.  I receive this message below.  Since its a new laptop, there isn't a previous version installed, and since I'm installing from a CD it can't be corrupt.  Ho

  • Upgrading RDC from 8.5 to 11 (or 12)

    Post Author: LeisureTime CA Forum: General I have a VB6 application that utilizes the RDC to generate a large report with perhaps 80 subreports. Here are my questions about upgrading to VB.NET and Crystal Reports version 11 or 12: 1. How easy is the

  • Cons Group Changes & Divestiture with Equity Holdings

    In the scenario with cons unit hierarchy below, company A is the parent of company B and B is the parent of C and D. B is accounted for using purchase method, while C and D are equity method. Cons Group A      Cons unit A      Cons group B           

  • What is ' build indices' and ' drop indices' in a process chain

    Hello , can any one explain me ,In transaction loading process , in a process chain , after activating Data in DS object, what is ' Drop  indices'  and what is 'buid indices' Thank you .