HTML file previews

In the Finder, my webpages I have saved show blank documents in the preview column. Not a generic icon, but a blank web page. When I Quick Look them, everything is fine, just not when they are being previewed. Other files (images, documents, etc.) work fine, just not HTML documents.

Hi, I'm having problems with Live Preview. I've tried all the suggestions in troubleshooting - disabling all extensions, restarting etc. But no joy. Things momentarily worked when I started Chrome via terminal -
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
- but then went awry again.
I'm on chrome 34.0.1838.2 dev.  Perhaps this error log helps solve things...?
See /usr/include/servers/bootstrap_defs.h for the error codes.
2014-02-18 13:18:26.433 Google Chrome Helper[7126:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6027, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
[7113:87043:0218/131828:ERROR:form_data.cc(108)] Bad pickle of FormData, no version present
[7113:87043:0218/131828:ERROR:form_data.cc(108)] Bad pickle of FormData, no version present
[7113:87043:0218/131828:ERROR:form_data.cc(108)] Bad pickle of FormData, no version present
[7113:87043:0218/131828:ERROR:form_data.cc(108)] Bad pickle of FormData, no version present
[7113:87043:0218/131828:ERROR:form_data.cc(108)] Bad pickle of FormData, no version present

Similar Messages

  • Previewing FLA in HTML file

    Hello
    I have an FLA file and movie and wish to upload the movie file to a server. However, when I click File | Preview in HTML the HTML file fails to generate (I see only the background colour of my FLA in my browser).
    What could be the problem there?
    Thanks.
    Steve

    Hello selangov
    Many thanks for your reply.
    No, I am just trying to open the HTML file locally. In the past, I have simply clicked on File | Publish in the MX 2004 application and it generates a working movie in an HTML file (using IE). But recently, as I say, although the HTML file is generated, the movie does not show in the browser.
    The files I have downloaded are AC_ActiveX.js and AC_RunActiveContent.js. Are they the files you mean? And where do I install them to? The same directory as my FLA file?
    Thanks again.
    Steve

  • Is there an easy way to preview an html file in firefox?

    We have an html file supplied to us for an eblast template. Is there an easy way to preview this code in firefox to see how it will look?

    You can open an HTML file in Firefox via File > Open File for previewing.
    Your above posted system details show outdated plugin(s) with known security and stability risks.
    * Shockwave Flash 9.0 r246
    * Java 1.3.1 Plug-in
    Update the [[Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version via Software update.<br />
    See http://support.apple.com/downloads/
    http://support.apple.com/kb/HT2312 - About Java 2 Platform Standard Edition (J2SE) 5.0 Release 1 for Tiger
    http://support.apple.com/kb/DL847 - Java for Mac OS X 10.4, Release 9
    http://support.apple.com/downloads/Java_2_SE_5_0_Release_1

  • OutLook not previewing html files

    OutLook quit providing a preview of my html files (only) about a month ago.  All other files preview okay.  Any suggestions on how to get it working on all files like it used to?

    RICH POW posted in macromedia.dreamweaver
    > I am trying to add includes to pages for a site hosted
    on an
    > Apache server that have the file extension .html but I
    don't want
    > to change any file names to .php.
    Is includes the one and only reason you're using PHP? And is
    there no
    PHP code in any of your files other than include()?
    If the answers to both questions is yes, then, assuming your
    server
    supports SSI, I recommend using simple SSI includes. (You may
    need to
    change your files to .shtml or set up the server to work with
    .html)
    If you are using other PHP code, there is a way to configure
    Apache to
    pass .html pages through the PHP interpreter. Not generally
    recommended
    if you have a lot of static .html pages with no PHP in them.
    > All works fine live, but Dreamweaver does not preview
    the
    > included file: <? include('includes/test.html');
    ?>
    To view Web pages with PHP in a browser, the pages must be
    processed
    through a Web server configured with PHP. You may need to set
    up a test
    server on your machine.
    Note: If you really are using PHP anywhere, you should not
    use short
    tags. Use <?php include('includes/test.html'); ?>
    > Is there any reason I should not include both an .asp
    type
    > include and the .php version as a workaround? Like this:
    > <? include('includes/test.html'); ?>
    > <!--#include file="includes/test.html" -->
    >
    > Is this bad practice or good lateral thinking?
    I would call it bad practice. Assuming you've set up your
    server to
    pass .html files through the PHP interpreter - AND the server
    processes SSI with .html, you will probably end up with two
    copies of
    test.html.
    Mark A. Boyd
    Keep-On-Learnin' :)

  • Multiple HTML-files in one stack / link another HTML-file in a stack

    Hi,
    I want to integrate a webapp (html/js) into a stack of a dps-folio. All the HTML works fine ... all no problem, but at clicking the first link on the initial HTML-document the next (local) HTML-File is opened in a slider with a "ready"/"Fertig"-bar at the top. But I want, that all html files are seamlessly loaded in the same view.
    At this point i found: http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60-8ad81e812b10bfd837-80 00.html and i made the file "NativeOverlays.config" and moved it to the described location. After that, the behaviour was correct in the desktop-preview-app of the DPS, but it still fails on the iPad-Adobe-Viewer.
    How can i link between HTML-files without any interuption or sliding?
    Thank you!
    Christian

    Hi Tim,
    Thanks for replying. I have looked for "PDFBookBinder class" in xml publisher user guide for ver 5.6.2. I didn't get any reference of this text. Can you please guide me to a tutorial/link where i can get more information about this class.
    Also, i originally thought of similar to your second logic, as my design basis. Oracle process generates the xml file in output directory which i can get. What i didn't get is how do i "pick them up and merge" using publisher. Also, is there way to do this merging process using pl/sql ? Can you please give little more information on your second approach.
    My original plan of action is that i will create a report set in which i will call oracle seeded report for all 7 payrolls in a sequential manner. Then using the child requests of the report set i will get to 7 xml files generated by seeded oracle process. Then the piece i am not sure of , i will use those 7 files to generate a single xml file having payroll name as tree top for each output. Once single xml is ready, i can easily design a template and register the process to generate output as Excel.This process will not require me to actually change any data or do any calculation. It will only reformatting the feilds we see and abiity to see all 7 payroll at one time rather then entering these numbers manually into an excel to do analysis.
    Please provide your feedback, if you think above plan is not feasible or need corrections.
    Best Regards,
    Ankur

  • Print HTML file inside JEditorPane

    Hi Guys,
    I'm trying to print the contents of a JEditorPane - actually, a html file that I read and display in that component from the underlying file system. I've had the class that manages the JEditorPane implement Printable - the following is my print() implementation:
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
              throws PrinterException {
              if (pageIndex > 0) {
                   return (NO_SUCH_PAGE);
              } else {
                   Graphics2D g2d = (Graphics2D) graphics;
                   g2d.translate(
                        pageFormat.getImageableX(),
                        pageFormat.getImageableY());
                   ivTextArea.paint(g2d);
                   return (PAGE_EXISTS);
    }I've got another method that gets called when a print button is clicked:
    class .... {
      PrintJob pj;
      PageFormat pf;
    private void printMe() {
               if (pj == null) {
                   pj = PrinterJob.getPrinterJob();
                   pf = pj.defaultPage();
                   pf.setOrientation(PageFormat.PORTRAIT);
              pf = pj.pageDialog(pf);
              pj.setPrintable(this, pf);
              try {
                   pj.print();
              } catch (PrinterException e) {
                   throw new RuntimeException(e);
    }Clearly I'm doing smth wrong, since only a single page gets printed and moreover the formatting is awful [text gets cut instead of moving on the next line]. Can someone help?
    Thanks much!

              if (pageIndex > 0) {
                   return (NO_SUCH_PAGE);This is why you only get a single page.
    page gets printed and moreover the formatting is
    awful [text gets cut instead of moving on the next
    line]. Can someone help?Yeah. Your best bet is either to put the editorpane in a scrollpane and just print what's visible, OR, you can take the print graphics object, convert it into a graphics2D object, and call scale on that by comparing component.getWidth/height to PageFormat.getImageableWidth/Height
    I'm attaching my StandardPrint class. It uses the pageable interface to carry the number of pages + page format as well. I'm not sure if I did the scaling here or not, but I've done it before so I know it works :-) Also, I've got methods for previewing the print, which can save a lot of paper.
    Please feel free to have and use this class, but please do not change the package or portray this as your own work
    =============================
    package tjacobs.print;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.print.*;
    import javax.print.PrintException;
    public class StandardPrint implements Printable, Pageable {
        Component c;
        SpecialPrint sp;
        PageFormat mFormat;
        public StandardPrint(Component c) {
            this.c = c;
            if (c instanceof SpecialPrint) {
                sp = (SpecialPrint)c;
        public StandardPrint(SpecialPrint sp) {
            this.sp = sp;
        public void start() throws PrinterException {
            PrinterJob job = PrinterJob.getPrinterJob();
            if (mFormat == null) {
                mFormat = job.defaultPage();
            job.setPageable(this);
            if (job.printDialog()) {
                job.print();
        public void setPageFormat (PageFormat pf) {
            mFormat = pf;
        public void printStandardComponent (Pageable p) throws PrinterException {
            PrinterJob job = PrinterJob.getPrinterJob();
            job.setPageable(p);
            job.print();
        private Dimension getJobSize() {
            if (sp != null) {
                return sp.getPrintSize();
            else {
                return c.getSize();
        public static Image preview (int width, int height, Printable sp, PageFormat pf, int pageNo) {
            BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
            return preview (im, sp, pf, pageNo);
        public static Image preview (Image im, Printable sp, PageFormat pf, int pageNo) {
            Graphics2D g = (Graphics2D) im.getGraphics();
    //        PageFormat pf = sp.getPageFormat(pageNo);
    //        int width = im.getWidth(null);
    //        int height = im.getHeight(null);
    //        g.setColor(Color.WHITE);
    //        g.fillRect(0, 0, width, height);
    //        double hratio = height / pf.getHeight();
    //        double wratio = width / pf.getWidth();
    //        g.scale(hratio, wratio);
            try {
                   sp.print(g, pf, pageNo);
              catch(PrinterException pe) {
                   pe.printStackTrace();
            g.dispose();
            return im;
        public int print(Graphics gr, PageFormat format, int pageNo) {
            mFormat = format;
            Graphics2D g = (Graphics2D) gr;
            g.translate((int)format.getImageableX(), (int)format.getImageableY());
            Dimension size = getJobSize();
            if (pageNo > getNumberOfPages()) {
                return Printable.NO_SUCH_PAGE;
            int horizontal = getNumHorizontalPages();
            int vertical = getNumVerticalPages();
            int horizontalOffset = (int) ((pageNo % horizontal) * format.getImageableWidth());
            int verticalOffset = (int) ((pageNo / vertical) * format.getImageableHeight());
            double ratio = getScreenRatio();
            g.scale(1 / ratio, 1 / ratio);
            g.translate(-horizontal, -vertical);
            if (sp != null) {
                sp.printerPaint(g);
            else {
                c.paint(g);
            g.translate(horizontal, vertical);
            g.scale(ratio, ratio);
            g.translate((int)-format.getImageableX(), (int)-format.getImageableY());
            return Printable.PAGE_EXISTS;
        public int getNumHorizontalPages() {
            Dimension size = getJobSize();
            int imWidth = (int)mFormat.getImageableWidth();
            int pWidth = 1 + (int)(size.width / getScreenRatio() / imWidth) - (imWidth == size.width ? 1 : 0);
            return pWidth;
        private double getScreenRatio () {
            double res = Toolkit.getDefaultToolkit().getScreenResolution();
            double ratio = res / 72.0;
            return ratio;
        public int getNumVerticalPages() {
            Dimension size = getJobSize();
            int imHeight = (int)mFormat.getImageableHeight();
            int pHeight = (int) (1 + (size.height / getScreenRatio() / imHeight)) - (imHeight == size.height ? 1 : 0);
            return pHeight;
        public int getNumberOfPages() {
            return getNumHorizontalPages() * getNumVerticalPages();
        public Printable getPrintable(int i) {
            return this;
        public PageFormat getPageFormat(int page) {
            if (mFormat == null) {
                PrinterJob job = PrinterJob.getPrinterJob();
                mFormat = job.defaultPage();
            return mFormat;
    }>
    Thanks much!

  • Runtime Error in File Preview of RH7 - Immediate help needed!

    Dear all,
    we're working on a RoboHelp 7 project under version control.
    Today we encountered a major issue with ur project/database. When opening files in the preview window, they are displayed without error. As soon you click on a link within this file that leads to another HTML file, you get a pop-up with a runtime error message. You're asked either to debug or not. Selecting no displays a second runtime error with the same question. After also declining, you get to the selected HTML file.
    We have two major sorts of files: Chapter overview pages and topic files. Both are based on the same Style Sheet (CSS) and template. For the overview files the layout is just changed a bit when you create the file. Further there are some extra files don't use the template.
    Now I recognized some kind of logic:
    - When you open an overview-file, the two pop-ups always refer to runtime errors in line 46 and 49.
    - When you open a topic file, the two pop-ups always refer to runtime errors in line 50 and 53.
    - When you open a file that is blank and not based on the template, there's no error.
    Until now, the error never occured. But since today (or maybe last week und we didn't recognize), this error comes up even for files that were created months ago and never had an error before. They were changed today automatically when a renamed a chapter. Even within our "clean and working" backups we now encounter this error.
    Questions:
    - Can anyone explain, what a runtime error is at all?
    - My assumption is, that it has something to do with the CSS or template, but I'm not sure. What can be wrong there?
    - To what lines do the specifications in the pop-up refer to? Where can I find those lines?
    As we are in a very critical project phase, I really need your assistance for a quick and effective solution. Please help me as soon as possible!! Thanks!!

    Hi Tom
    Here is my own educated guess.
    When you have links of any type in a HTML document, a calculation has to occur at the time they are created. The application has to calculate where the linked item is in relation to the existing page. Then HTML shorthand is created to navigate. Up a folder level is ../ and up two folder levels is ../../. Stuff like that.
    Popups are a different story. While you are still creating links, these beasties are actually handled using JavaScript. So the path is supplied in the call to the JavaScript.
    As if that weren't complex enough, we now toss Headers and Footers into the mix. Headers and Footers are tied to the Master Page. The Master Page is always in the root level of the project. Links in a Header and Footers often break because of the assorted locations of HTML pages if you are using folders to organize your project. So when you create the link initially as part of the Master Page, things are dandy and as long as the topic is in the project root folder (same as the Master Page) things would likely work fine. But if that Master Page is associated with a topic inside a folder level or two down, things can go to pot in a hurry! (Where are we all headed? And what's with the handbasket?)
    Hopefully this helps shed some possible explanation... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Time Machine - AppleXsoft - file preview and support

    Deleted an external drive while trying to install Time Machine. Ran AppleXsoft but downloaded several thousand Jpegs and movies to desktop.  Can't file preview like the software says because they say the file isn't suporte and my emails [email protected]  keep bouncing back.  Anyone been down this road?  I have a Macbook Air.

    aschmid wrote:
    Yes you are right, I know it isn't supported - as so many other things but they work!
    This one is notorious for working for a while, then . . . not.
    In addition to the problems above I got a pop-up from Time Machine saying the backup file is broken and it needs to create a new one. I told it to go ahead and what happened is that it actually proceeded to DELETE the old backup file before creating a new one - there goes my several months of backup history!
    Yes, just as it says in the message. See #C13 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).
    All I can say do now is connect my drive directly to my iMac and figure out a way how I can backup my other iMac and the MacBook I have. On the AE this just worked remotely.
    Yeah. Until it didn't.
    Really not much options here to backup a home with 3 Macs!?!
    Sure there is. Back the others up to the same drive, over your network, via sharing. See #22 in [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum), for details and setup instructions.

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • SSI of HTML file using SpryAssets

    Hi,
    I've saved a navigation header for my website in a nav.html
    file. I'm trying to get another file, test.shtml, to use
    server-side includes to include nav.html into it.
    However, the nav.html file was built in DW using a Spry Menu
    Bar, which stores its files in a directory SpryAssets.
    I have the following statement located right after my
    <body> tag, so it appears at the top of the webpage:
    <!--#include file="nav.html" -->
    The design view in DW shows the nav.html file included, but
    menu-bar is expanded to look like normal text. The DW preview
    doesn't show the nav.html being there at all.
    Any ideas how to solve this? The nav.html file sits in the
    same directory as test.shtml, and looks great when I open nav.html
    alone.
    Thanks in advance. -Gary

    An Include is a code fragment, not an entire page.
    It should not contain <html> or <body> tags, just
    the snippet of code that
    you are replacing the Include directive with.
    As currently set up, your page code will look like this once
    the Include has
    been processed by the server and "included" in the main page
    code:
    This means duplicate doctypes, head tags etc etc which won't
    work.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <link href="StyleSheet.css" rel="stylesheet"
    type="text/css" />
    <style type="text/css">
    <!--
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css"
    rel="stylesheet"
    type="text/css" />
    <style type="text/css">
    <!--
    .style2 {
    font-size: 16px;
    font-weight: bold;
    color: #336600;
    margin-top: 30px;
    margin-bottom: -12px;
    .style3 {
    color: #336600;
    font-weight: bold;
    .style6 {
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    vertical-align: middle;
    color: #6633FF;
    .style7 {
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    position: static;
    height: 0px;
    top: 10px;
    margin-bottom: -12px;
    font-weight: bold;
    color: #333333;
    .style8 {
    color: #CC0000;
    font-weight: bold;
    .style10 {
    font-family: Arial, Helvetica, sans-serif;
    position: static;
    height: 0px;
    top: 10px;
    margin-bottom: -12px;
    font-weight: bold;
    color: #333333;
    font-size: 13px;
    .ucscheader {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: -10px;
    text-align: center;
    .spacer1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin-bottom: 10px;
    -->
    </style>
    </head>
    <body>
    <table width="750" border="0" align="center"
    cellpadding="0"
    cellspacing="0"
    bgcolor="#669900">
    <!--DWLayoutTable-->
    <tr>
    <td width="159" height="7"></td>
    <td width="104"></td>
    <td width="327"></td>
    <td width="10"></td>
    <td width="150"></td>
    </tr>
    <tr>
    <td height="60" colspan="2" valign="top"><img
    src="Images/jittertime_icon_logo.jpg" alt="JitterTime Logo"
    width="222"
    height="53" hspace="20" vspace="3" /></td>
    <td> </td>
    <td> </td>
    <td valign="top"><img
    src="Images/allabouttimingjitter.jpg" alt="Timing
    Jitter Logo" width="129" height="56" hspace="0" vspace="2"
    align="top"
    /></td>
    </tr>
    <tr>
    <td height="6"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td height="24" valign="top" bgcolor="#336600"
    class="HomeText">Home</td>
    <td colspan="2" valign="top" bgcolor="#336600"><ul
    id="NavMenu2"
    class="MenuBarHorizontal">
    <a class="MenuBarItemSubmenu" href="#">Training</a>
    <a href="#">Training Details</a></li>
    <a href="#">Seminar Overview</a></li>
    </li>
    <a href="#"
    class="MenuBarItemSubmenu">Resources</a>
    <a href="#">Rates &amp;
    Frequencies</a></li>
    <a href="#">Phase Jitter Calculator</a></li>
    <a href="#">Links</a></li>
    </li>
    <a class="MenuBarItemSubmenu" href="#">Articles</a>
    <a href="#">Convert dBc/Hz to ps</a> </li>
    </li>
    <a href="#" class="MenuBarItemSubmenu">Company</a>
    <a href="#">Biography</a></li>
    <a href="#">Contact</a></li>
    <a href="#">Policies</a></li>
    </li>
    </td>
    <td colspan="2" valign="top" bgcolor="#336600"
    class="HomeText"><div
    align="right" class="SiteMap">Site
    Map</div></td>
    </tr>
    </table>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("NavMenu2",
    {imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
    imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    <p>this is a test</p>
    </body>
    </html>
    Regards
    John Waller

  • URL iview with HTML file located in Portal server.

    I created URL iview pointing to HTML file located in the Portal server. When I try preview it is not working. We wanted to use this iview to create space between two iviews.
    This is going to be blank iview.
    I saved the HTML file same as where index.html file of webas is located.
    Please let me know what is missing here. What kind of path I need to give in the URL of the iview.

    Hi Nagesh,
    Are you saying that you created a HTML file on the file system of the portal server or did you create the HTML file within a KM repository on the portal?
    If it is the 1st option you should have the HTML file hosted under a webserver such as IIS or Apache and then use the URL that the website is created under.
    If it is a file within KM then open the properties of the HTML document that you have created and use the Access Link value as the URL for the iView.
    Please let me know if you need further clarification.
    Regards
    Daniel

  • Word 2013 - Error inserting an HTML file in a word document

    Hello,
    Here is an issue i'm having:
    Open a blank doc in Word 2013
    Click Insert - Object - Create from file. Then select an html file, click insert and ok.
    i'm always getting the below error message:
    I can reproduce this issue on multiple machines.
    Office 2013 preview and Office 2013 RTM are getting same error.
    Anyone else ?
    Thanks

    Hi Christophe_P,
    I’m able to repro the behavior in my test environment as per your repro steps.
    An Office repair does NOT impact the issue for me.
    I’ll report the issue to the Office product group.
    A possible workaround:
    In a Word 2013 document>Insert tab > Text group > Click Object
    In the Object dialog, click the Create New tab
    Select Microsoft Word Object; then click OK
    In the newly embedded/activated Word doc object, click Insert tab > Text group > Click the Object dropdown arrow; then choose “Text from File…”
    In the Insert File dialog, navigate to; then select the html file; then click Insert.
    Bill Go - MSFT

  • Link style sheet to .html file?

    Hey dreamweaver community i'm really new to dreamweaver but have a slight grasp.
    But i am creating a website (ethicistbeats.com). I have a design by using a css. style sheet and everything looks good in dreamweaver safari preview (on a mac), but when i upload it to my ftp client my designs/ format of my page does not show up, at all.
    If you guys could reply and try to help me out that would be cool. i tried talking to one pf my friends who took a class on html code, but he couldn't help me.
    Anyways, thanks in advance.
    If you guys need more info about code and stuff i'll gladly upload it. Just again i'm new to this so i don't really know much... i just dove into dreamweaver like a need a webpage, not much help, but my site wasmade from a template - not sure if that helps.
    Peace.

    Unfortunatly, you have quite a mess on your hands.  First you have embedded css above the external style sheets, which takes away one of the big advantages of embedded css, namely to override any rules in the external style sheet.
    <style type="text/css">
    .A {
         color: #E12000;
    .b {
         color: #000;
    </style>
    But that is peanuts to the other probelms,
    Your style sheets are not css files, they appear to be an html file.  To create an external style sheet, go up to File | New | CSS and a new CSS blank file will be created.  Paste your css rules into it.
    You have
    <link href="http://www.ethicistbeats.com.css" rel="stylesheet" type="text/css" />
    While I suppose you could link using an absolute link, I dont see an advantage,
    but it would be more like
    <link href="http://www.ethicistbeats.com/stylesheet.css" rel="stylesheet" type="text/css" />
    a better way would be
    <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    This is not a style sheet, but another html file.
    <link href="Index.html.css" rel="stylesheet" type="text/css" />
    Take whatever css is in the files and put them into a new css file.
    Start there, but there is more work to do.
    gary

  • Opening a HTML file through GUI

    Hi guys I am new to java and HTML and now I need to open a HTML file which is saved on disk and search for a word my code is as shown below.......
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class Test_Find extends JFrame {
        public Test_Find() {
            initComponents();
            setExtendedState(JFrame.MAXIMIZED_BOTH);
            textarea.setText(initialText);
            textarea.setCaretPosition(0);
            setVisible(true);
            textarea.requestFocusInWindow();
        private void initComponents() {
            scrollTextarea = new JScrollPane();
            textarea = new JTextArea();
            toolbar = new JToolBar();
            findB = new JButton();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Find");
            scrollTextarea.setViewportView(textarea);
            getContentPane().add(scrollTextarea, BorderLayout.CENTER);
            toolbar.setFloatable(false);
            findB.setText("Find");
            findB.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    findBActionPerformed(evt);
            toolbar.add(findB);
            getContentPane().add(toolbar, BorderLayout.NORTH);
        private void findBActionPerformed(ActionEvent evt) {
            String input = JOptionPane.showInputDialog(
                    "Find what:", pattern);
            if(input==null){
                input="";
            pattern=input;
            doFind();
        private int doFind(){
            textarea.requestFocusInWindow();
            currentCaretPosition = textarea.getCaretPosition();
            text = textarea.getText();
            if(!pattern.equals("")){
                int pos=0;
                pos = text.toLowerCase().indexOf(pattern.toLowerCase(), currentCaretPosition);
                if(pos>-1){
                    scrollTextarea.getHorizontalScrollBar().setValue(0);
                    textarea.setCaretPosition(pos+pattern.length());
                    highlight(textarea, pattern);
                    return 1;//found
            }else{
                removeHighlights(textarea);
                return 0;//no pattern
            return -1;//not found
        // Creates highlights around all occurrences of pattern in textComp
        public void highlight(JTextComponent textComp, String pattern) {
            // First remove all old highlights
            removeHighlights(textComp);
            try {
                Highlighter hilite = textComp.getHighlighter();
                Document doc = textComp.getDocument();
                String text = doc.getText(0, doc.getLength());
                int pos = 0;
                // Search for pattern
                while ((pos = text.toLowerCase().indexOf(pattern.toLowerCase(), pos)) >= 0) {
                    // Add highlight around pattern using private painter
                    hilite.addHighlight(pos, pos+pattern.length(), textPainter);
                    pos += pattern.length();
            } catch (BadLocationException e) {
        // Removes only our private highlights
        public void removeHighlights(JTextComponent textComp) {
            Highlighter hilite = textComp.getHighlighter();
            Highlighter.Highlight[] hilites = hilite.getHighlights();
            for (int i=0; i<hilites.length; i++) {
                if (hilites.getPainter() instanceof TextPainter) {
    hilite.removeHighlight(hilites[i]);
    // An instance of the private subclass of the default highlight painter
    private Highlighter.HighlightPainter textPainter = new TextPainter(Color.yellow);
    // A private subclass of the default highlight painter
    class TextPainter extends DefaultHighlighter.DefaultHighlightPainter {
    public TextPainter(Color color) {
    super(color);
    public static void main(String args[]) {
    new Test_Find();
    private String input, pattern, text;
    private int currentCaretPosition;
    private JButton findB;
    private JScrollPane scrollTextarea;
    private JTextArea textarea;
    private JToolBar toolbar;
    private String initialText =
    "Swing JTable and JScrollPane Problem\n" +
    " tlloreti 4 Jul 5, 2005 4:15 PM\n" +
    "by Tom.Sanders \u00bb \n" +
    "Swing CTRL-A (select all) ignored in applet\n" +
    " ilmbeachgirl 4 Jul 5, 2005 4:10 PM\n" +
    "by ilmbeachgirl \u00bb \n" +
    "Swing drawing problem\n" +
    " gnosnahz 0 Jul 5, 2005 4:09 PM\n" +
    "by gnosnahz \u00bb \n" +
    "Java Event Handling events effecting panels in multiple tabs\n" +
    " sean_hagen 1 Jul 5, 2005 4:06 PM\n" +
    "by es5f2000 \u00bb \n" +
    "Swing Searching text in files & highlighting that text\n" +
    " sketty 1 Jul 5, 2005 3:57 PM\n" +
    "by camickr \u00bb \n" +
    "Swing JTextField displaying prtially its contents\n" +
    " SreeJay 1 Jul 5, 2005 3:55 PM\n" +
    "by camickr \u00bb \n" +
    "Swing how to get BufferedImage of a JPanel\n" +
    " praveen.Arora 1 Jul 5, 2005 3:53 PM\n" +
    "by camickr \u00bb \n" +
    "Swing Creating a form from a xml schema..\n" +
    " zoltern 0 Jul 5, 2005 3:51 PM\n" +
    "by zoltern \u00bb \n" +
    "Swing Da Suckers: Java and Windows XP\n" +
    " [email protected] 1 Jul 5, 2005 3:42 PM\n" +
    "by [email protected] \u00bb \n" +
    "Java 2D Rescaling using JAI\n" +
    " G-Rehuku 0 Jul 5, 2005 3:30 PM\n" +
    "by G-Rehuku \u00bb \n" +
    "Swing how to get Page Preview of multiple page JPanel\n" +
    " Sonu.Arora 0 Jul 5, 2005 2:20 PM\n" +
    "by Sonu.Arora \u00bb \n" +
    "Swing IDE for Swing Development\n" +
    " JavaEnthusiastt 8 Jul 5, 2005 2:17 PM\n" +
    "by uhrand \u00bb \n" +
    "Java 2D Can't connect to X11 window server\n" +
    " kusigubi 0 Jul 5, 2005 2:06 PM\n" +
    "by kusigubi \u00bb \n";
    }Since I am new to the field requesting the kind quick help by java experts here to help me change the code so that I would be able to search a web apge saved on disk and search and highlight a word in that page ....
    Thanks in advance........
    Looking forward for your kind suggestions.......                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Since I am new to the field requesting the kind quick help by java experts here to help me change the code so that I would be able to search a web apge saved on disk and search and highlight a word in that page ....
    Thanks in advance........
    Looking forward for your kind suggestions......1) Did you write that code? If yes, proceed to 2). If no, I charge 150 euros/hr. Let me know when you want me to start.
    2) Post the code for a program that opens a text file with the following in it:
    hello world
    and prints the contents out using System.out.println().
    3) Modify the program in 2) to determine if the file contains the word "yes". Post the code.
    4) An html file is no different than the text file in 2).

  • Question about image slideshow (like mac file preview)

    Hello!Ι have a question about Adobe Edge.is it possible to create a photo slide show like mac's file preview? i mean smthg like this  https://www.youtube.com/watch?v=Q727LqDIZKM

    Hi, TasisGrafix2-
    Edge Animate doesn't support css3d natively, but you can use a third party library such as edgehero.js to make this work.
    http://www.edgehero.com/edgeherojs.html
    Good luck!
    -Elaine

Maybe you are looking for