PDF with Tomcat/Cocoon Problem !!!

Hi,
I am having problem with Tomcat/Cocoon combination for APEX PDF printing which I installed following Carl Backstrom instructions.
When a report is a region report it all works fine, but when I create a report based on a query from the reports section in Shared Components choosing report layout 'Use Generic Report Layout' I get the following error.
javax.xml.transform.TransformerException: attribute-set named #TEXT_ALIGN# does not exist
cocoon://fop_post/xsl - 148:58
Cocoon stacktrace[hide]
attribute-set named #TEXT_ALIGN# does not exist
cocoon://fop_post/xsl - 148:58
I will appreciate any feedback. I saw threads related to the same issue on this forum but they ended up covering something irrelevant.
Regards,
Vadim

Vadim,
Report queries and report region use the same generic report layout. However the processing is handled by different engines. The underlying technical problem with your case is that the substitution string #TEXT_ALIGN# is not substituted in all cases for report queries. This usually does not cause any problems, but appears not to work when using Cocoon.
I'll see that we can this resolved with the next version of APEX, however when working with report layouts, you would typically use your own RTF or XSL-FO stylesheets, where this problem would not occur. The option to use the generic report layout is only included so the data can be tested independently from the layout and is not really intended to be used as the actual layout at runtime.
The generic report layout function is mainly designed to be used for report regions.
Regards,
Marc

Similar Messages

  • External-graphic not shown in PDF with Tomcat / Cocoon / Ubuntu

    Hi,
    this weekend I set up a virtualbox with Ubuntu 8.04 OS; APEX 3.12 @ Oracle 10gXE; Tomcat 6.014; Cocoon 2.1.11; fop_post sitemap file according to Carl Backstrom blogpost ([http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html]); to experiment with APEX & PDF printing.
    Tomcat is configured to listen to port 8888; APEX to 8080.
    I have setup APEX according to Carl's blogpost. All is working fine; I can generate PDF reports using the standard templates. I'm new to XSL, but decided to go wild. I decided to include a JPG graphic.
    I followed the example in Scott & Spendolini, Pro Oracle Application Express, page 399. However the image is not shown in the PDF, nor is there an error message produced. What is wrong?
    This is the relevant section of source code I have used:
    <fo:static-content flow-name="region-footer">
    <fo:block xsl:use-attribute-sets="text footer">
    <fo:inline xsl:use-attribute-sets="body-font page-number">
    <fo:external-graphics width="50px" height="50px" src='url("http://www.fiat128.nl/images/fiat128.jpg")'/>
    <fo:page-number/>
    </fo:inline>
    </fo:block>
    <fo:block xsl:use-attribute-sets="text text_2 #PAGE_FOOTER_ALIGNMENT#">
    <fo:inline xsl:use-attribute-sets="page-footer">#PAGE_FOOTER#</fo:inline>
    </fo:block>
    </fo:static-content>
    all help is appreciated. Is there a problem with Cocoon and Linux?
    many regards,
    Ronald van Dijk
    Edited by: user614694 on Oct 6, 2008 3:09 AM
    Edited by: Ronald van Dijk on Oct 6, 2008 3:10 AM

    Hello Ronald,
    Your code looks fine to me. Although xsl-fo is not very friendly for a slight change...
    This is an example I use during my PDF printing presentation:
    <fo:static-content flow-name="region-header">
    <fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
    <fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
    </fo:block>
    <fo:block border="0.5pt solid silver"
    background-image="url('http://o11g1.apex-evangelists.com:7779/i/htmldb/apex_logo.gif')"
    padding="12pt"
    text-align="center">Apex Evangelists
    </fo:block>
    </fo:static-content>
    Does that work for you?
    (change o11g1.apex-evangelists.com:7779 to your hostname:port - and see that you get the image by using the url)
    I've sometimes seen problems displaying certain pictures or specifying the width.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • PDF with Tomcat - guidelines for template editing

    PDF generation with Tomcat using the standard template works fine - but is pretty bland.
    Does anyone have any guidelines for editing the template - what may / may not be included?
    Are there any GUI tools for this?
    Thanks
    Mike

    Vadim,
    Report queries and report region use the same generic report layout. However the processing is handled by different engines. The underlying technical problem with your case is that the substitution string #TEXT_ALIGN# is not substituted in all cases for report queries. This usually does not cause any problems, but appears not to work when using Cocoon.
    I'll see that we can this resolved with the next version of APEX, however when working with report layouts, you would typically use your own RTF or XSL-FO stylesheets, where this problem would not occur. The option to use the generic report layout is only included so the data can be tested independently from the layout and is not really intended to be used as the actual layout at runtime.
    The generic report layout function is mainly designed to be used for report regions.
    Regards,
    Marc

  • PDF printing--tomcat/cocoon installed, but report server not found------

    As I understood, APEX 3.1 requires either BI/FO tools to enable PDF printing.
    As I do not have BI license, and as I happened to check a very good link on a blog which had a detailed viewlet on apache-cocoon route for PDF print enabling, I downloaded the tomcat, cocoon source files, built the cocoon .WAR, put it in required place as instructed, started tomcot (ran into pronblems because of port conflits, resolved these by configuring different ports for 8005 and 8080 ports).
    Now, when I want to configure the external report server, I am stuck.
    I am not able to locate 'Instances' tab, or 'manage environment settings ' tab in 'manage services'
    I am able to find only following tabs in 'manage services' under HOME.--> Administration ----> Manage services
    1) session state
    2) caching
    3) workspace preferences
    4) applications
    5) workspace
    6) workspace schema reports
    7) Logs
    Can anyone help me to find out where to configure the 'report server' now?
    Thanks,
    suresh.

    Sorry, it was a silly problem:) You have to be logged in as admin to 'see' the 'instances' tab. maybe in all the tomcat/cocoon build/config issues, this simply got off my head!
    now, the problem of print server config is over, I have configured the same. the 'print' link is available now in report region, when I run the report. but when I click the 'print' link, it is taking ages...or rather it is still processing...!!
    Can anyone please point out to me now what is the problem...?
    thanks.

  • EBiz 11i Integration and Printing with TOMCAT/COCOON

    Hi,
    I have successfully set up a TOMCAT/COCOON printing environment on a Red Hat LINUX server. I am able to produce PDF's from all of my APEX applications with the exception of those defined in our 11i (11.5.0) eBusiness application.
    I use the exact same settings in all instance settings. All run under AIX 5.3 and all can see (ping) the print server. Similarly the print server can see (ping) all of the APEX servers.
    However, trying to produce a PDF from an APEX installation hosted in our eBusiness environments (either from within or outide of the eBusiness application) results in the dreaded HTTP 404 Not Found error.
    Is there something else I need to consider when trying to use a print engine on another server when called from an eBusiness database/application server?
    Any help appreciated.
    Thanks,
    Rob

    Hi David,
    Thanks for the feedback. We are on 10gR2 database, but I re-checked logs to include the error_log_pls file as well as error_log!
    In the error_log_pls I see oracle error ORA-22293. As you may know 11i uses 9iAS by default, and associated Apache. I had made use of the installed Apache in the IAS_ORACLE_HOME. Thanks to your pointer, I have seen suggestions that the issue may be resolved by making use of Apache that comes with 10g. My concern here would be that the seamless integration I have between APEX and 11i (printing aside) will be compromised - the entries I use in defining the function within 11i may need to change.
    I will install Apache from 10g and see what transpires.
    As an aside, I do have a lot of dealings with Oracle Support and I wouldnt necessarily share unqualified endorsement of their capabilities :) . I didnt raise an SR this time because I had figured there was some issue with Cocoon and the 11i server rather than with the Oracle software itself. Maybe I was wrong!
    I will update when I have further information.
    Thanks again.
    Rob

  • PDF with Tomcat - failing with isHexDigit conversion

    Hi
    I've built a small report writer with printed output using Tomcat.
    All works fine until a '%' is used in a parameter in the report.
    I then get a Tomcat Error
    2007/05/22 06:57:36 org.apache.tomcat.util.http.Parameters processParameters
    WARNING: Parameters: Character decoding failed. Parameter skipped.
    java.io.CharConversionException: isHexDigit
    Once that happens all subsequent attempts to print - with our without the wildcard give the same error.
    Does anyone know how to trap the contents of the XML passed to Tomcat to see what it's complaining about? Or what APEX is generating?
    Thanks
    Mike

    Vadim,
    Report queries and report region use the same generic report layout. However the processing is handled by different engines. The underlying technical problem with your case is that the substitution string #TEXT_ALIGN# is not substituted in all cases for report queries. This usually does not cause any problems, but appears not to work when using Cocoon.
    I'll see that we can this resolved with the next version of APEX, however when working with report layouts, you would typically use your own RTF or XSL-FO stylesheets, where this problem would not occur. The option to use the generic report layout is only included so the data can be tested independently from the layout and is not really intended to be used as the actual layout at runtime.
    The generic report layout function is mainly designed to be used for report regions.
    Regards,
    Marc

  • Pdf with embeded auido problem

    Hi,
    I have windows vista home premium with service pack 2 and acrobat reader X, i have few tutorial pdfs which have embeded audio files.  The audio plays but without sound.  Other audio files with realplayer, windows media player and quicktime player works fine. I would like to mention here is the same file in windows xp works fine, audio in the pdf plays with the sound.  Is there any security privelages which has to be enabled in windows ??? i am not sure.
    It  is a peculiar problem i am facing.
    Thanks,
    dhaataa

    Vadim,
    Report queries and report region use the same generic report layout. However the processing is handled by different engines. The underlying technical problem with your case is that the substitution string #TEXT_ALIGN# is not substituted in all cases for report queries. This usually does not cause any problems, but appears not to work when using Cocoon.
    I'll see that we can this resolved with the next version of APEX, however when working with report layouts, you would typically use your own RTF or XSL-FO stylesheets, where this problem would not occur. The option to use the generic report layout is only included so the data can be tested independently from the layout and is not really intended to be used as the actual layout at runtime.
    The generic report layout function is mainly designed to be used for report regions.
    Regards,
    Marc

  • Opening pdfs with ibooks ipad: problem

    Hi,
    I found that many people have this problem: opening a pdf (that's attached to an email) with ibooks, used to work perfectly.
    And now it doens't anymore.
    Sometimes (1 on 20 tries) it does work. Often the pdf lights up for a second in ibooks, and then disappears again.
    I tried doing a reinstall as advised on many fora, but this doesn't help.
    Any other ideas why this happens, and a solution?
    It's a shame, cos it was such a fast way of working.
    Thank you in advance.
    Jan.

    I have been experiencing this problem for over a month now. Seems a bug in iBooks. However, if I close the iBooks and then from email try to open the attachment from Email, it works. Having iBooks open gives this problem.

  • Crazy can't export PDF with same name problems

    I am experiencing a a very odd problem using:
    ID CS4 6.0.6
    Acrobat Pro 9.4.3
    After running numerous tests, I've found that if I export a PDF from ID and select it in Finder...not open it...just highlight the darn file, ID will refuse to re-export that file with the same name saying I don't have perms or the file is in use. Since when does selecting a file in Finder constitute "in use?"
    I can export every other format while the file is selected in Finder.
    Is this normal? I have to deselect a PDF in Finder before saving a file of the same name?
    Neglected to mention:
    MacBookPro running OSX 10.6.7

    If running OSX 10.6.7
    I think it is due to your Finder settings.
    Using column view the .pdf file is generating a preview in the right column, thus it is in use and cannot be overwritten.
    Try changing to list view and it is no longer in use.
    Yes it is annoying when you prefer column view.
    Nina Storm

  • Eclipse with Tomcat 6 Problem

    Hello,
    When I try to start Tomcat 6 in Eclipse, I get the following error message:
    Publishing failed
    Could not load the Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.
    Resource is out of sync with the file system: '/Servers/Tomcat v6.0 Server at localhost-config/web.xml'.
    In the beginning I thought the problem might be caused by me inserting a few changes to the web.xml global file and maybe corrupting it in the process. However, I restored the original file and the problem still persists. I have no problem starting Tomcat using the standard start-up script, which indicates web.xml is actually valid, it fails just when starting from Eclipse.
    Does anyone have an idea what the problem is?
    Thanks.

    Bug 228039 from Eclipse MIGHT help, but I'm not sure.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=228039
    It says to manually refresh the file in Eclipse explorer.
    Bug 107386 from Eclipse MIGHT also help.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=107386
    No workaround yet.

  • XDP - open PDF with #toolbar=0 problem in IE

    Hi
    When opening PDF's using a correctly constructed XDP I specify at the end:
    <pdf href="some.pdf" xmlns=http://ns.adobe.com/xdp/pdf/ />
    Everything works correctly in all browsers.
    I would like to hide the toolbars so when I change the href to:
    <pdf href="some.pdf#toolbar=0" xmlns=http://ns.adobe.com/xdp/pdf/ />
    the PDF opens but in IE the XDP data doesn't merge however, it works as expected in other browsers (data merge and toolbar hidden)
    Has anyone else come accross this or know of a fix or workaround?
    Thanks for looking.
    Andy

    Since your posting the XDP data to a PDF, you can merge the XDP + LC PDF using 3rd party tools, send the merged PDF to buffer (data is presented), and then pass the querystring parameter to the merged PDF.
    Example URL:
    http://www.url.com/mergeXDP.aspx#toolbars=0
    If you are using ASP.net web servers:
    Check out www.fdftoolkit.net
    Web Examples:
    www.nk-inc.com/software/fdftoolkit.net/examples/
    If you are using Java enabled non-MS servers, check out iText.
    iText can merge XML/XDP with LC forms.
    For more information Google "iText merge XDP XFA", or buy the book or e-book "iText in Action Second Edition".

  • Custom PDF/RTF reports with Cocoon (problem with special characters)

    Hi all,
    I've setup application (APEX 3.0.1) with some custom PDF reports (using Cocoon 2.1.10),
    I'm generating my own hierarchical xml structure, using query with xmlelement() and xmlagg() functions,
    I cannot use built-in xml generator, because I need to get master-detail report with sub-grouping.
    Everything works fine if data in report doesn't contains special characters like "&",
    but Cocoon stops processing XML data when it found special character, following error is written to cocoon log:
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startElement] uri=,local=PRZEDMIOT,raw=PRZEDMIOT
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startCDATA]
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [characters] PPHU "T
    ERROR (2007-10-02) 12:34.16:828 [sitemap.generator.stream] (/cocoon/fop_post/) http-8888-1/StreamGenerator: StreamGenerator.generate()
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    ERROR (2007-10-02) 12:34.16:828 [sitemap.handled-errors] (/cocoon/fop_post/) http-8888-1/ErrorHandlerHelper: Failed to process pipeline
         at <map:serialize type="xml"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:22:32
         at <map:generate type="stream"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:18:33
         at <map:serialize type="fo2pdf"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:58:37
         at <map:transform> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:51:39
         at <map:transform type="log"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:45:35
         at <map:generate> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:42:38
         at <map:mount> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/sitemap.xmap:1034:92
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    This error occur when Cocoon process folowing XML entity:
    <PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
    I tried to escape "&" character with CDATA section, but it didn't work.
    I tested following alternatives:
    <pre>
    <PRZEDMIOT>PPHU "T&M" Ltd</PRZEDMIOT>
    <PRZEDMIOT><PPHU &quot;T&amp;M&quot; Ltd.></PRZEDMIOT> --remove '<' and '>' characters
    <PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
    </pre>
    but I still get the same error.
    Can anyone help me with this ?
    Thanks
    Tomasz K.

    Ok, I found that only '&' and '%' characters breaks Cocoon processing.
    The workaround is to use replace() function and change:
    '&' to '%26' and '%' to '%25', but I think that is a dirty way...
    Other characters like " - 'double citation' are succesfully escaped with xmlcdata() function.
    Perhaps someone know the simpler way to get Master/Detail PDF reports from APEX without using BI Publisher ???
    Actually I have page process invoked by button, which generates XML data, post it to Cocoon with UTL_HTTP and save generated PDF to database table (for future use).
    The same button invokes branch to URL with download procedure.
    Standard APEX reporting is not very usefull for me, because I don't know how to generate "complex" documents, with several grouping sections.
    I will be gratefull for any aid.

  • Tomcat/Cocoon/APEX PDF printing. Another issue

    Hi All,
    I am trying to implement my own custom report layout for the following simple Report query
    select e.DEPTNO, d.DNAME, d.LOC, e.ENAME, e.JOB
    from emp e, dept d
    where e.deptno = d.deptno
    The steps are the following
    1. Create Report Query
    2. Download XML file
    3. Use Stylus Studio to create XSL-FO (XSLT 2.0) based on XML data downloaded in
    previous step.
    4. Go back to Report query and upload XSL-FO file to APEX (layout name 'MyLayout' is also specified).
    Finish Report Query creation
    5. Enter Report Query again, select report layout 'MyLayout' and select Test Report
    The result is a failure with some java cocoon exception:
    org.apache.cocoon.ProcessingException: Unknown request object encountered named template : null
    Cocoon stacktrace[hide]
    Exception in StreamGenerator.generate() context://fop_post/sitemap.xmap - 17:32 <map:serialize type="xml">
    context://fop_post/sitemap.xmap - 13:33 <map:generate type="stream">
    Unable to get transformer handler for cocoon://fop_post/xsl context://fop_post/sitemap.xmap - 38:37 <map:serialize type="fo2pdf">
    context://fop_post/sitemap.xmap - 31:39 <map:transform>
    context://fop_post/sitemap.xmap - 30:38 <map:generate>
    context://sitemap.xmap - 1034:92 <map:mount>
    It seems to me that XSL-FO that I created for this layout is rejected somehow by APEX and not passed to Coccon at all.
    Guys, what am I doing wrong ? I will appreciate any help.
    Regards,
    Vadim

    Hi Mike,
    My standard printing is working nicely. That's the custom reporting that I experience problems with.
    After 8 hours of googling and 4 cups of coffee I figured out where the problem was. When you define XSL-FO file you need to 'escape' every occurence of % sign. For example you cannot define width= "100%" because APEX will pass this unchanged to Tomcat and Tomcat in turn will reject this but still passing NULL template pointer to Cocoon. Taking into consideration very poor logging capabilities one can spend hours trying to fugure out what is hapenning. APEX should be smart enough to escape characters or at least there should be a doco somewhere listing the rules you need to follow whem creating FO stylesheets.
    I must admit that the whole APEX PDF printing using Tomcat/Cocoon (and probably Fop because that's what used by Cocoon behind the scene anyway) is unfortunately a hack. Reporting does not have to be that complex.
    I would be extremely grateful if somebody can tell me what sort of XML tool is best suited to generate XSL-FO files that can be easily understood by APEX/Tomcat/Cocoon.
    Regards,
    Vadim

  • PDF print Cocoon problem

    Hello!
    I use Apex + Tomcat + Cocoon + fop_post from Carl Backstrom's Blog [http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html].
    Printing reports is possible, but printing big reports, with a lot of data in a cel,l doesn't work. Trying to print a rtf, word says : "Missing file: C:\cocoon\styles\main.css".
    Acrobat Reader says : "Adobe reader could not open 'sample.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)"
    Does anyone have a suggestion how to solve this problem?
    Thank you very much.
    kind regards
    anton

    Hi,
    Jari (jarola) has created this guide
    http://ubuntuforums.org/showthread.php?t=1004742
    And he has all relevant things about post size.
    I hope this is your issue.
    Regards,
    Oleg

  • Problem in creating client side PDF with image using flex and AlivePD

    I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
    Thanks in advance
    Atishay

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

Maybe you are looking for

  • Help with Disk Utility

    I have a removable usb flash drive that I've been using for a while. Occasionally I need to erase it with disk utility to remove all of the past information it has held. This time around though the drive doesn't seem to be created (I'm not sure if I'

  • Filter Custom Component

    I'm trying to build a Filter custom component, which will convert a binary file to an XML file on the fly and send to the requester. I'm trying to use the 'checkDownloadOverride' filter event for this case. But I cant find the content bytes in any ob

  • Could some one please tell me how to take screen shot?

    I was prompted once by the computer to take a screen shot. Now I can't figure out how to do it again.

  • Light representation in CS5 with xyY to LabD50 conversion or how ???

    I hope somebody can help me here: I want to represent artificial light sources on an Adobe CS5 canvas. Artificial light sources are usually described by xy color coordinates and the luminous flux. Lets use typical energy saving CFL (compact fluoresce

  • PS CS6 extended und Camera raw 8.1

    Ich habe den upgrade von dem mitgelieferten camera raw zu 8.1 gemacht und kann jetz nicht mehr die Bildgröße bestimmen, mit der das Bild in CS6 entweder als SO oder normal geladen wird.  mit der Vorgängerversion waren 3 oder 4 Bildgrößen sogar eine m