Warning: Unknown formatting object ^html

Hi,
I am trying to convert an .fo file into PDF format using a servlet. The code compiled, but when I try to run the servlet it gives me the following warning:
Unknown formatting object ^html
Exception in transformation: null
and does not create the pdf file.
The line: 'driver.buildFOTree(parser, in);' seems to be the problem.
Here is the code ('in' is the .fo file):
XMLReader parser = XMLReaderFactory.createXMLReader();
Driver driver = new Driver();
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",
               Version.getVersion());
driver.addElementMapping               ("org.apache.fop.fo.StandardElementMapping");
driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
driver.addPropertyList               ("org.apache.fop.fo.StandardPropertyListMapping");
driver.addPropertyList               ("org.apache.fop.svg.SVGPropertyListMapping");
driver.buildFOTree(parser, in);
driver.format();
driver.setWriter(new PrintWriter(new FileWriter("new_file.pdf")));
driver.render();
out.flush();
Does anyone know what might be the problem here?
Thanks in advance!
Elena.

I see - the other part of the code that is converting an xml file into an .fo file converted it into an .html file instead.
public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
System.setProperty("javax.xml.transform.TransformerFactory",
"org.apache.xalan.processor.TransformerFactoryImpl");
System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SaxParserFactory",
"xorg.apache.xerces.jaxp.SaxParserFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");
response.setContentType("application/pdf");
PrintWriter out = response.getWriter();
String xslPath = "top.xsl";
String xmlPath = "top.xml";
String foPath = "top.fo";
          try{
               TransformerFactory tfactory = TransformerFactory.newInstance();
               String filepath = foPath;
               Transformer transformer = tfactory.newTransformer(new StreamSource(getServletContext().getResource(xslPath).toString()));
               transformer.transform(new StreamSource(getServletContext().getResource(xmlPath).toString()),new StreamResult(new FileOutputStream(filepath )));
               InputSource fopfile = new InputSource(filepath);
               buildPDFFromFO(fopfile,out);
               out.flush();
          catch(Exception ex){
               System.out.println          }
The fo file that resulted from this looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<html>
<body>
<table bgcolor="yellow" border="2">
<tr>
<th>Artist</th>
<th>Song</th>
</tr>
<tr>
<td>Pinky</td>
<td>Bye-bye</td>
</tr>
<tr>
<td>LOLO3</td>
<td>Austin</td>
</tr>
<tr>
<td>Hello</td>
<td>Kuku</td>
</tr>
</table>
</body>
</html>
Does anybody know why it didn't convert it correctly.
I am really new to all this stuff.
Thanks in advance for your help!!!
Elena.

Similar Messages

  • PDFs Using Formatting Objects Processor

    I'm having problems rendering pdf documents using FOP as detailed in your document 'Rendering Oracle HTML DB Reports as PDFs Using Formatting Objects Processor'.
    When I call the pdf_GrabXML to send the XML report output to the htmldb_fop_render.jsp file I get the following error:
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:/opt/oracle/midtier/9.0.4/j2ee/home/application-deployments/default/defaultWebApp/persistence/_pages//_htmldb__fop__render.java
    8 package org.apache.fop.apps does not exist import org.apache.fop.apps.Driver;
    93 [jsp src:line #:44] cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    93 [jsp src:line #:44]cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    96 [jsp src:line #:47] cannot resolve symbol symbol : variable Driver location: class htmldb_fop__render driver.setRenderer(Driver.RENDER_PDF);
    NOTE:
    We did not have a oc4j directory under $ORACLE_HOME. We have, therefore, placed htmldb_fob_render.jsp and htmldb_example.xslt in the following directory: $ORACLE_HOME/2jee/home/default-web-app. The var g_Render_URL in javascript file (htmldb_pdf.js) was modified to http://<host name>:<port>/j2ee/htmldb_fop_render.jsp.

    Kris,
    I placed the three jar files into the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory (recall that I don't have a oc4j directory) and I changed the library entries in the application.xml file to point to this directory. The htmldb_pdf.js now seems to find the jar files but I now get an error that indicates I'm not able to make a connection:
    java.net.ConnectException: Connection refused     at java.net.PlainSocketImpl.socketConnect(Native Method)     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)     at java.net.Socket.connect(Socket.java:452)     at java.net.Socket.connect(Socket.java:402)     at sun.net.NetworkClient.doConnect(NetworkClient.java:139)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)     at sun.net.www.http.HttpClient.New(HttpClient.java:339)     at sun.net.www.http.HttpClient.New(HttpClient.java:320)     at sun.net.www.http.HttpClient.New(HttpClient.java:315)     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)     at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)     at java.net.URL.openStream(URL.java:913)     at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2133)     at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:257)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:200)     at oracle.xml.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:557)     at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:230)     at htmldb_fop__render._jspService(_htmldb__fop__render.java:76)     [SRC:/htmldb_fop_render.jsp:27]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    QUESTIONS:
    1. Should I place all jar files in the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory . . . there are several jar files that are not referenced in the application.xml file.
    2. Should the port number that is defined in the htmldb_pdf.js and htmldb_fop_render.jsp files be the HTTP Server Listener port.
    Thanks,
    David

  • Unable to open .eps file "unknown format and cannot be opened" ?

    A client sent me an .eps file (logo). I tried opening it in Illustrator AND photoshop (just to see if it was saved in one vs the other program) - however to no avail.
    Illustrator gives me a message "unknown format and cannot be opened"
    Photoshop gives me a message "photoshop was unable to parse the postscript".
    I'm using Adobe CS4, and I've never seen this message before—would love to know what this means and how to resolve?
    File attached if anyone is able to open / fix it?
    Thanks kindly,
    Chemol

    Thanks for the advice Scott - does compression improve the .eps?  Is it
    silly for me to ask them to compress it since the file is only 766 KB
    (that's how big the attachment is in my email - though I am unable to open
    it)?
    My friend is able to open it on his end - however the 3rd person (client) is
    the one who sent it, and I have already requested a different version - no
    response from them yet.  Unfortunately what the company "has" is what he
    will likely give to me again (ie: same file / unable to open).  So ... I am
    curious about how I can resolve this issue on my end - if possible?
    Do you know what the AI and Photoshop error messages mean? Could the issue
    be a mac vs PC concern? Or is it a corrupt file? Could it be a software
    version issue (old vs new) ... or Quark incompatibility?
    .... just guessing at this point....Any insight as to what different
    scenarios may apply in this situation would be greatly appreciated ..thank
    you.

  • How can I force Firefox to properly format all html pages to a pdf without losing top and right hand margins?

    Setting up page printout format for pdf on a Mac OS/X Snow Leopard Mac Pro. Printer is HP 8500A OfficeJet Pro Plus bought after July 14, 2011 serial number- CN141CK7QM
    When I print to file as a pdf I am getting the first page correctly but subsequent pages are getting clipped along the top and the right margins.
    I don't have this problem with my IBook 4.0
    The issue is formatting an html page to a pdf when the print request is asking for a pdf or when the print request is to the printer.
    The url to my HP Office jet Pro 8500A Plus is:
    mdns://Officejet%20Pro%208500%20A910%20%5B530E4F%5D._pdl-datastream._tcp.local./?bidi
    I have a IBook G4 and I do not have any of this problem.
    I have specified a default paper size of "USLetter".
    This printing issue is a new one that occurred since I started the Firefox updates after Firefox 6.0 series.
    I am checking with HP on this issue. Prior to the HP8500A (installed in July 2011) I did have a HP6180 Officejet for several years without encountering such a conflict.
    So my second question is; Are there Firefox printing conflicts with the HP 8500A printers?
    EHW 091211

    Joanna,
    It seems that Illy (still) moves in (ever new) mysterious ways.
    I was surprised to see that you got away with your French word, but the hat part must have hidden the first part from the nanny filter. The first part by itself would have become asterisks.

  • "E:\filename.ai" is in an unknown format and cannot be opened"

    My computer crashed. I just re-installed Adobe Illustrator 10.03. Now some of my ".ai" files show funny looking icons and won't open and instead a pop-up that says "E:\filename.ai" is an unknown format and cannot be opened". Some of my documents are just fine. But there are several Illustrator docs in various spots on my hard drive that are giving me this error.
    Any suggetions on how to get these files to open up?

    OK. Now we're getting somewhere.
    Without knowing more about the precise nature and cause of the "crash," we can only make guesses, and here's mine:
    Basically, Katie, you're screwed.
    My guess is that either the "crash" and/or your boss's subsequent handling of the D: drive (which might have been entirely proper) has caused data corruption on that drive.
    If you have no backup for the files on the drive, and if those files are of critical importance, I would disconnect the drive immediately and get it to a data recovery specialist. The longer you have it connected, the more you reduce the chance of recovering data.
    If the data are somewhat less than critical, you can try some basic recovery steps yourself. Start by making an image backup of the drive (to an external drive or removable media), then run chkdsk on it with the /r option. Rename any recovered files (with the .ai extension), and try opening them.
    Finally, you might send the .ai files that won't open to a specialist who knows the Illustrator file format. He/she might be able to make some partial fixes that will, at least, enable you to open the files.
    If you want, upload a few of the files to a server and post the link here. Some of the experts here might have a crack at it. (Put the files in a .zip archive first to protect them against further corruption during transfer.)

  • Why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please.  Thanks?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

  • PDF export for  columns formatted as HTML

    Hello,
    I've created a report having some columns formatted as HTML .
    in the PDF file exported from BI Answers dashboard, HTML tags are shown instead of formatted value.
    (for example : "div style="width:100%;background-color:#FF3300">89.12%</div" instead of 89.92%)
    Any ideas how to fix this ?
    BI version : 10.1.3.3.3
    Thank you.

    Hi dragosv,
    I've also encountered similar problems to that. The OBIEE process does not first evaluate the code before it exports to other tools like PDF and Excel.
    Here are two options:
    1) Submit an SR to Oracle and have them declare it a bug
    2) Print to HTML first, then print the HTML to PDF. It adds a step but at least you can download your document the way you want.
    Best regards,
    -Joe

  • IDVD: Files exported from iMovie 11, one works, one "Unsupported File Type : Unknown format"

    I used footage from the same camera (taken on the same weekend using the same settings) in several different iMovie "projects". All were shared from iMovie 11 as "File" using the quality setting "SD 480p".
    In Quicktime Player, all ".mp4" files will play and they show the following info in its inspector:
    Format: H.264, 854 x 480
                  AAC, 48000 Hz, Stereo (L R)
    FPS: 29.97
    One exported file will drag, drop, and burn in iDVD just fine. The other two files show the error "Unsupported File Type : Unknown format" as soon as I try and drag them into iDVD.
    The only difference I can find is that the one file that works is about 803MB, while the files that don't work are 1.87GB and 3.98GB.
    All files and the iDVD project are in the same folder on my startup volume. I've tried deleting com.apple.idvd but that didn't help. I've tried rebooting and starting the iDVD project from scratch but I get the same results.
    Mac OS 10.9.1
    iMovie 10.0.1
    iDVD 7.1.2
    Any ideas?

    Hello Bengt and thank you again for the replies.
    As I mentioned in my previous posts, I'm using iMovie 10.0.1 which has very limited quality adjustments. In every case I chose the smallest size, which iMovie 10.0.1 calls "SD 480p (854 x 480)". I used this same setting on all exports.
    I still have iMovie HD (6.0.4) and iMovie '11 (9.0.9) on my iMac so I tried both of them. In both cases, they could import only the file that works in iDVD. Both older versions of iMovie choked on the longer movies shared from iMovie 10.0.1.
    I have many many hours into the editing of these clips and I do not want to have to go back and redo everything in an older version of iMovie. Might I be better off going with a different DVD creation software? Or am I out of luck? Because I can't really change iMovie 10.0.1's export settings, I'm afraid there's nothing I can do to get it to export it as something that iDVD can use (really, I can't even tell why it's different and why iDVD doesn't like it).
    The software "WonderShare DVD Creator" has no issue with any of the files I've exported from iMovie 10.0.1.    

  • Interactive Reports Download In Colour format in html and csv

    Hi All I want to download interactive report in colour format(as it is format) in html and csv using apex 4.0.2
    Regards
    Robert

    http://en.wikipedia.org/wiki/Comma-separated_values
    A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. As a result, such a file is easily human-readable (e.g., in a text editor).re: colours of html output
    interestingly, there are settings in print attributes, but they have no bearing on the output... obviously nothing to do with the html output. Probably best bet is BI Publisher, where you can define your own report templates.

  • [SOLVED] WARNING: bad format of line 333654 of /etc/fstab

    Hi everyone,
    I know that there are couple of topics concerning my problem but non of them  was helpful, because my computer doesn't even boot.
    Here's how it started:
    I was trying to mount a game for the first time and something went wrong. I got message in terminal saying: the file couldn't be found in /etc/fstab so I pasted the iso image in /etc/fstab. I quit trying to mount and changed the appearance of my desktop (changed the theme, wallpaper the size of the folders etc.) and restarted the computer. When the booting started everything was normal until the message  WARNING: bad format of line 333654 of /etc/fstab showed up it started to go on and on and on - the same message with different numbers and it doesn't stop.
    What should I do?
    I've tried to use my apple laptop to go to my linux Arch pc but I get the message "Host is down"
    I also have a Kubuntu 9.10 i386 cd.
    I really don't want to re-install. I thought maybe there is a way to somehow get to /etc/fstab and delete the file I pasted.
    p.s
    I am new in Linux and Arch linux, I am still trying things and often do something silly that I have to find a way to fix
    Last edited by Encho (2011-02-27 15:01:42)

    /etc/fstab exists to be a file system table. It does not and indeed should not contain the contents of an image file such as an ISO. Disk images contain filesystems themselves, so the most you would need to put in /etc/fstab to mount them at boot is a line describing where the image sits and at what place in the filesystem it should be mounted.
    That message about not being able to find it in /etc/fstab appeared because you either didn't specify a mount point for the image or the specified mount point did not exist. But, first, you will need a live CD of some sort to fix your boot issue. You could use the Arch installation live CD to do it—I recommend it. Whatever you choose, you need to mount your root partition and edit <mountpoint>/etc/fstab. If you need to figure out what your root partition's name is in /dev/, type blkid. For example, on my system I would do something like this from the live cd to mount my root partition:
    # blkid
    /dev/sdb1: UUID="06f29dbd-8ce8-4d98-82ee-9e84b7d44758" TYPE="ext2"
    /dev/sdb2: UUID="3747c62b-2be0-415e-bdba-58ca44a67f6d" TYPE="swap"
    /dev/sdb3: LABEL="roothome" UUID="50f8625e-3eeb-4578-9229-e7030bd2a082" TYPE="ext4"
    /dev/sda1: UUID="7CAC3BEAAC3B9D98" TYPE="ntfs" LABEL="System Reserved"
    /dev/sda2: LABEL="halite_windows" UUID="92863FB7863F9AA5" TYPE="ntfs"
    /dev/sdc1: LABEL="citrine" UUID="35987e49-a4e7-4c5f-81cb-1a4e87373ecc" TYPE="ext4"
    # mkdir /mnt/roothome
    # mount -t ext4 /dev/sdb3 /mnt/roothome
    # vim /mnt/roothome/etc/fstab # to edit the fstab
    Once chrooted, edit the /etc/fstab file with your favorite console editor, e.g. vim, nano, emacs, and remove all the stuff you pasted in. It might be helpful to copy the first 20-30 lines of the file – that should be about all your fstab should need – truncate it, and then add the mounts that you copied. (Indeed, it should be possible to use sed or another utility to truncate the file after the last line of the fstab, before the data image begins.)
    In the future, if you see a message about not being able to find the file in /etc/fstab, create a mountpoint for it:
    # mkdir /mnt/iso
    # mount -t iso9660 image.iso /mnt/iso/
    Last edited by Snowknight (2011-02-27 15:51:20)

  • Schedule a job with email destination in BOXI R2 with email format as html

    Hello Guys, would it to possible to schedule a job with email destination in BOXI R2 with email format as html? we are able to get it running with plain text email format. we use Java SDK to interface with BO Enterprise servers.
    thanks for your thoughts,
    Venkat

    Hi
    your job should SMOF_DOWNLOAD can bring new material master if you set up correctly.
    as a smart method smof_download is the best way.
    doble check your filter condition. it should work as you expected. because we dont involve in  manual pulling...
    check your variant once again. in vari table,
    can you check r3ac1 - filter settings- source seetingsa--> source site nmae --> backendlogical system and filter sync..
    br
    Muthu

  • What I view the dbx files are of unknown format from TEMP directory?

    When you start Outlook Express DBX file to create a push, but after the program can not find it. There is a configuration change that? In the TEMP folder found files, but they are of unknown format, what I view the dbx files? 

    The user of the DBX Viewer Tool can recover mail messages from *.dbx files in the batch mode. If you recover messages in the Batch mode, messages are extracted from *.dbx files one by one and immediately saved to the hard drive. Batch message recovery can be
    used to recover correspondence from a large number of corrupted *.dbx files simultaneously.
    http://www.dbx.viewertool.com/ The Batch Mode will allows you to considerably save time and effort spent on organizing the process of recovering messages from corrupted *.dbx files. Read it: http://www.filerepairforum.com/forum/microsoft/microsoft-aa/outlook-express/966-i-need-to-dbx-viewer-tool-advise-me-anything

  • Using Formatting Objects Processor ....

    Нi All!
    I have a data stored in my DB in UTIF-8. I' m using Formatting Objects Processor to transform Oracle APEX 2.2.report output into PDF document.
    It's a dust on the screen after loading my report in Adobe Photoshop. The text on the screen in CP1251. It's realy dust.
    Excuse me for my bad English...
    Нow to solve problem ?
    Any ideas...
    Thanks,
    Roman

    Hi Roman,
    Excuse me for my bad English...Your English is far better than my attempts at a foreign language are.
    However I'm not sure what you mean by this -
    It's realy dust.Can you try and explain it in other words?

  • Receiving an "Unknown Format" error code when submitting a form

    Product: Adobe Acrobat 9 Pro Extended
    Hi, I'm trying to find out what exactly is Acrobat expecting as a return value on its form submission.
    two parts to my setup:
    1. The form. It is a garden vaiety form with a button on it which set up as follows:
    Action -> Mouse Up -> Submit a form -> PDF The complete document
    2. The receiver.  This is a REST based service, expecting a HTTP Post.
    For the most part, the whole setup works like a charm - the form is posted by the client, the server receives the file, creates a local copy and processes it correctly. After the post is successfully received, the last step on server is to send a reply to the client. This is where I’m getting stuck.
    If I return an HttpStatusCode.Ok and a blank SOAP.Fault, I’m getting and “Unknown Format” error on the client side. I tried several different combinations/values/etc, including sending the result code only, but since I don’t know what exactly is acrobat expecting, I’m just shooting in the dark. Other error codes I’ve seen include “Invalid Server Response”.
    Unfortunately I can’t find any guidance from Adobe on what Acrobat is expecting in return for the submit functionality, so any help/pointers are greatly appreciated.
    Thanks everyone!

    Here is the contents of a sample FDF that will cause a popup to display when it is imported:
    %FDF-1.2
    1 0 obj
    << /FDF << /Status (Your message goes here.) >> >>
    endobj
    trailer
    << /Root 1 0 R >>
    %%EOF
    Replace "Your message goes here." with the text you want to display, and don't change anything else in the sample. The value of the /Status key in the FDF is a PDF string, so it has to follow the rules described in the PDF standard (ISO 32000) for strings. So read up on it so you know how to properly escape/encode PDF strings.
    Note that the server needs to set the MIME type of the response in the "Content-type" HTTP header to "application/vnd.fdf".

  • HELP!!! "unknown format cannot open"...BUT it's a Illustrator CS3 file?????

    I spent several hours designing a file in CS3. I went to "Save as Web & Devices" and my MAC froze and I had to reboot. I now cannot open the illustrator file without getting the "file is an unknown format and cannot be opened" error. I have tried dropping the file in Distiller, placing in InDesign and trying to place into a blank illustrator file with no luck. I have even tried to open the file in Photoshop file. All attempts say the file is unknown. Did the crash corrupt the illustrator file? If so, is there a way to recover. I pray there is!! I do not want to redesign this project again!!! HELP!!

    Hi timnancyk,
    If you see this message, please contact with me by email: [email protected] for our project that you selected me. My nick:bestsoftvn.
    Thank you

Maybe you are looking for