Cocoon pdf printing

Hi,
I have followed Carl's very concise blog on using cocoon for pdf printing. http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
I have tomcat and cocoon up and running on linux (NOT a five minute task on linux unless you are a sysadmin, with all respect to Carl). I have my apex (3.2 on XE ) install pointed to it under Manage Service> Instance Settings > Report Printing.
Now I'm trying to get reports to use this plumbing, but I'm not seeing a builder dialog under Print Attributes> Printing anything like Carl shows in his viewlet. I get only settings for Response Header and Content Disposition, but Carl is showing Enable Report Printing, Link Lable, File Name, Output Format, and Report Layout.
How does the builder decide when to display that kind of Report metadata? Does it have to connect to the print server or "know" that it is up to prompt for that? Any suggestions?
Thanks,
Steve

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.

Similar Messages

  • Apex+Cocoon PDF Printing issue  on printing Large Reports

    Hello All,
    I m in a real hard situation with PDF printing in apex.. The application manages to push the report into PDF with lesser record reports but for Large reports, it says File corrupted when i open the downloaded PDF file..
    I use Apex+Coocoon and fop printing. I found from some forums as this issue was with Java Heap size being lesser and asked me to increase the size.. so i increased the size from 128MB to 1024MB and my server settings allows me to set 1550MB at the maximum..
    If i cross this limit the TOMCAT server stops from running...
    But all of the above was not much fruitful, since it throws again the same errors if report rows crosses 6000+ rows, can any one help me out, do i need to check any other settings to make my large reports printable in PDF.
    My application needs to print around *20000+ rows each report may have at least 20 columns* to get printed...
    Much awaited for your assistance
    Edited by: mohansanjee on Sep 8, 2010 3:58 AM
    Edited by: mohansanjee on Sep 8, 2010 3:59 AM
    Edited by: mohansanjee on Sep 8, 2010 4:00 AM

    Matt,
    On this note, it probably also makes sense to mention that with APEX 3.1 we introduce a PL/SQL API that gives you much broader control over what is generated how and the method it's made available to the client. You'll get the ability to retrieve the PDF in a BLOB directly on the server, store in your own tables for later download or send via email attachment. You'll also get the ability to write your own download process using after-submit page processes. And you can have combinations of your own XML with your own stylesheets, or combine report queries with customer stylesheets at runtime, or just simply retrieve the results of pre-defined report queries / report layouts in BLOBs.
    I'll talk about this much more on my Blog once 3.1 is out, and will provide whitepapers, how-to's etc
    Regards,
    Marc

  • Problem regarding PDF printing in apex 3.1 and 11g database using cocoon

    Hi,
    i am configuring pdf printing on apex 3.1 (database 11g on windows XP OS) with cocoon/apache tomcat/fop using steps given in Carl Backstrom blog
    http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    I am using cocoon 2.2.10 / tomcat 6.0.20 and JDK 1.6
    I did everything as was mentioned in Carl's blog and everything configured without any hassle. I even enabled network services for FLOWS_030100 user on database. Even after doing all the steps I'm getting the error
    ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.
    I'm confused and don't know what to do next.

    Hi,
    By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if running Oracle Application Express with Oracle Database 11g release 1 (11.1), use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with PDF/report printing, specifically, you will get the following error message:
    ORA-20001: The printing engine could not be reached because either
    the URL specified is incorrect or a proxy URL needs to be specified.
    Follow the steps mentioned in the Oracle Application Express Installation Guide, [Enabling Network Services in Oracle Database11g|http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/post_inst.htm#BGEJJIHE]. Also refer to the [troubleshooting section|http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/post_inst.htm#BHAGIHIB] in case you receive an ORA-44416: Invalid ACL error after running the previous script.
    /Kenny

  • 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 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.

  • 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

  • Cocoon - Tomcat - APEX for FOP PDF printing

    I'm trying to setup Cocoon & Tomcat with APEX 4.1 for doing PDF printing of some reports.
    I'm using Linux 64bit, Tomcat 7.0.22, Cocoon 2.1.11, and JDK (build 1.6.0_24-b07).
    I followed Carl Backstrom's very helpful [blog entry|http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html] about using cocoon and tomcat to produce PDF reports through APEX. However, I must just be missing something, because it's not working at all for me.
    Does anyone have any suggestions about getting this to work? Whenever, I attempt to hit the cocoon site (localhost:8080/cocoon/), I receive the following error:
    "org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: index.html"
    Whenever I attempt to download a PDF report, I receive this error:
    "Adobe reader cannot open 'reportname.pdf' because it is either not a supported file type or because the file has been damaged."
    If you have this configuration (cocoon, tomcat, APEX, PDF printing) working, I'd greatly appreciate it if you shared any URLs or tips you have in getting this setup. I understand why folks fork out the big $ for BI Publisher, but that's not an option for me.
    Many thanks,
    Reid

    In the Tomcat Manager app, it shows that cocoon is deployed and running.
    I was able to reload it as well:
    "OK - Reloaded application at context path /cocoon"
    I see this in the Tomcat log:
    "SEVERE: The web application [cocoon] appears to have started a thread named [HSQLDB Timer @6b033450] but has failed to stop it. This is very likely to create a memory leak."

  • APEX 3.1.2 / HTTP-Server 10g PDF-Printing included

    Hello together
    I have APEX running on the Oracle HTTP-Server 10.1.3. Apex is working. Now i want to integrate PDF-printing. I found a lot of HowTos to realize that with a separate OC4J-Installation in an new $ORACLE_HOME.
    Has anybody an Installation running with OC4J intergrated into the HTTP-Server (startable,stopable wirh opmnctl) ? Or an idea how to get that running ? Or a better Idea to print PDFs from APEX ?
    Regards from Switzerland

    Hello,
    Carl Backstrom blogged about using Cocoon and Tomcat to integrate PDF-printing: http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    Cocoon should be installable on an OC4J instance.
    Another alternative is using PL/PDF: http://www.plpdf.com/
    Hope this helps,
    Dirk

  • PDF printing -- process hanging ---

    I tried pdf printing enabling of a report region in APEX using the Tomcat/cocoon route, ended up with successful installation, but when I click the PRINT link, process just hangs.
    Now, I downloaded BI publisher evaluation copy, installation went properly, I am able to log on to the BI publisher using its default port 9704. I changed the instance settings to refer to the BI publisher (Advanced tab, port number,script name etc).
    Now also when I click the link, the process just hangs, browser just keeps on working!
    I tried shutting down the BI publisher, then the link works perfectly, I get error message as word document, stating the 'URL Not found'.
    I am not able to solve this issue since last two days. Yes I reinstalled adobe reader, changed PDF output to 'word' etc and checked all combinations, doesn't seem to work.
    Can anyone point out whatcould be the problem? more importantly, how to debug this? Is there any log where BI publisher logs what it is attempting and any error?
    Thanks,
    suresh.

    Anyone who has faced this problem before:) Maybe a very silly config issue, I am not able to understand. I am yet to get solution for this.
    In fact I tried some more exercise. I installed complete 'apex' and BI publisher on another machine, say X. I configured the print server on my machine 'Y' to X's values i.e, host name,port etc.
    When I click the print link now, again the browser keeps on working!
    When I access the APEX pages on server X from my client machine, and when I press the 'print' link on a sample application hosted in 'X' I get the following HTTP-404 error.
    'http://xxx.xxx.xxx/pls/apex/f?p=103:4:2720332466736282569:FLOW_XMLP_OUTPUT_R301507920155258002_en-us'
    Can anyone help me please? Is there any log or any debugging method to check what is happening?
    Suresh.

  • PDF printing error in some reports

    Hi,
    I am using apache-tomcat-6.0.26 + cocoon-2.1.11 as my PDF print server for Apex. I tested the server and found out that, for simple reports with very limited parameters, PDF download worked find. However, for reports that have certain parameters, it said something like "Adobe Reader cannot open the file because it is either not a supported file type or file is damaged...".
    Also, how can I change the memory size to 512 of Tomcat on Windows?
    Any help?
    Thanks.
    Andy

    Hi Andy,
    Do the parameters that you enter into the report generate any result set?
    I don't really know what is causing the error you experiencing but I found that sometimes I would get a similar error when I attempted to print a report to PDF that contained no data (although I was using BI Publisher). Not sure if this has something to do with it...
    Alternatively, there could be characters within the word document, like brackets (), that could be causing the issue. I think it still causes an issue even if it is in the data itself.
    I would start off with a simple report and then add a little bit of functionality at a time, and then test, to work out which part of the report is causing you grief.
    Amanda.

  • PDF printing in 2.0

    Hi all,
    the following statement is from Carl Backstrom (and can be found here: Problems with PDF printing, using Apache FOP!
    Hello,
    Well I didn't get your email but I did run through and check my steps again because I'm
    making another viewlet for OC4J and Cocoon and another getting PDF working in XE
    and 2.0 (yes it can be done!).I wonder if Carl managed it to finish the viewlets? And if anyone else here could give me some advice to integrate PDF printing in apex 2.0.
    Thanks in advance
    Markus

    Hello,
    No I've never gotten around to getting that viewlet done but I can give you some pointers.
    On every Report there is a section named External Processing
    There are two attributes
    URL this is the url the xml will get posted to.
    Link Label this is ... well the Link Label
    If you populate these what happens is down by your pagiantion a link shows up with whatever you Link Label is if you click that there is an AJAX pull that grabs an XML feed (it's not the same as the XML feed in the current PDF printing) and posts the XML to the URL endpoint. The XML is posted as form item vXML
    I have an example here http://apex.oracle.com/pls/otn/f?p=11933:133 except I've overridden the standard functionality though to populate an TEXTAREA instead so you can see the XML feed.
    You might want to look at this older PDF howto to show you how to put it together. Between a little bit of sitemap.xmap editing in cocoon and some XSL work the pieces are all there to do it though.
    http://htmldb.oracle.com/pls/otn/f?p=18326:44:6141712725600931::::P44_ID:1522
    Carl

  • PDF Printing with XSL-FO and Apache FOP

    Can anyone show me in the right direction for this? I've been hitting a wall for the past 2 weeks or so and it's really starting to infuriate me. How am I supposed to work this out? Where do I start? Let's say I create a layout file with a WYSIWYG XSL editor, in what format do I export it? XSL, XSLT or XSL-FO? I figured it was XSL-FO, but who knows. I tried them all anyways, but nothing seems to work. I seem to be missing a step or something, 'cause something's definitely not right.
    I created a report query (which actually contains two queries):
    select distinct
    V_Usager.NUMEROPERSONNE NoPersonne,
    V_Usager.NOMUSUEL || ', ' || V_Usager.PRENOM Usager,
    V_Usager.DATENAISSANCE DateNaissance,
    V_Usager.DESCRIPTION Sexe,
    ID_Demande,
    NomNature || nvl2(PrecisionNature,', Précision: ' || PrecisionNature,'') Nature,
    NomCadre,
    decode(IND_Securitaire, 1, 'Oui', '0', 'Non') Securitaire,
    NomRessource,
    DT_Demande,
    Note,
    ltrim(decode(IND_DEMANDEIVAC,1,'Dossier IVAC','') || decode(IND_DEMANDEFLORES,1,', Dossier Florès','') || decode(IND_RISQUECRISE,1,', Risque de crise','') || decode(IND_MENOTTES,1,', Menottes nécessaires','') || decode(IND_ADRESSECONFIDENTIELLE,1,', Adresse confidentielle','') || decode(IND_TELEPHONECONFIDENTIEL,1,', Téléphone confidentiel','') || decode(IND_RISQUEFUGUE,1,', Risque de fugue','') || decode(IND_RISQUEVIOLENCE,1,', Risque de violence','') || decode(IND_MALDESTRANSPORTS,1,', Mal des transports','') || decode(IND_MEDICAMENT,1,', Médicament à remettre','') || decode(IND_SIEGE,1,'',2,', Siège fourni',3,', Siège d''enfant requis',4,', Siège de nouveau-né requis',5,', Siège d''appoint requis') || decode(IND_HANDICAP,1,'',2,', Handicap mental',3,', Handicap physique') || decode(IND_MEDICAMENT,1,', Médicament à remettre','') || decode(IND_JUMELER,1,'',2,', Ne pas jumeler',3,', Ne pas jumeler avec une fille',4,', Ne pas jumeler avec un garçon') || decode(IND_TRANSPORTEUR,1,'',2,', Transporteur féminin',3,', Transporteur masculin') || nvl2(REMARQUEPRECISIONS,', ' || REMARQUEPRECISIONS,''),',') Precisions,
    Disp1.PRENOM || ' ' || Disp1.NOM SaisiePar,
    Disp2.PRENOM || ' ' || Disp2.NOM || nvl2(Elem2.Description, ', ' || Elem2.Description,'') Requerant,
    ltrim(nvl(NOMPERSONNEAVISER,'') || nvl2(TELEPHONEPERSONNEAVISER_1,' ' || substr(TELEPHONEPERSONNEAVISER_1,1,3) || '-' || substr(TELEPHONEPERSONNEAVISER_1,4,3) || '-' || substr(TELEPHONEPERSONNEAVISER_1,7,4),'') || nvl2(TELEPHONEPERSONNEAVISER_2,' ' || substr(TELEPHONEPERSONNEAVISER_2,1,3) || '-' || substr(TELEPHONEPERSONNEAVISER_2,4,3) || '-' || substr(TELEPHONEPERSONNEAVISER_2,7,4),''),',') PersonneAAviser
    from
    TBL_Demande_1,
    TBL_Demande_TRSP_1,
    V_Dispensateur Disp1,
    V_Dispensateur Disp2,
    V_ElemStruct Elem2,
    V_Usager,
    TBL_CadresLegaux,
    TBL_Natures,
    TBL_Ressources
    where
    DemandeID = :P7_IDDEMANDE
    and ID_Demande = DemandeID
    and ID_Usager = UsagerID
    and ID_CLegal = IDCadre
    and ID_Nature = IDNature
    and IND_Ressource = IDRessource
    and ID_Intervenant LIKE Disp1.NumeroDispensateur
    and ID_SaisiePar LIKE Disp2.NumeroDispensateur
    and Elem2.ElemStructID = ID_ElemStructSaisiePar
    select
    to_char(DT_TRANSPORT, 'dd/mm/yyyy') || ' à ' || HR_TRANSPORT || nvl2(DUREE,' durée: ' || DUREE,'') DateTRSP,
    decode(IND_TYPETRANSPORT,1,'Aller',2,'Retour',3,'Aller/Retour') TypeTransport,
    case IND_TYPETRANSPORT
    when 1 then
    DEP_NOM || ', ' || DEP_ADRESSE || ', ' || DEP_CPOSTAL
    when 2 then
    DEST_NOM || ', ' || DEST_ADRESSE || ', ' || DEST_CPOSTAL
    when 3 then
    DEP_NOM || ', ' || DEP_ADRESSE || ', ' || DEP_CPOSTAL
    end AdresseDEP,
    case IND_TYPETRANSPORT
    when 1 then
    DEP_PRECISION
    when 2 then
    DEST_PRECISION
    when 3 then
    DEP_PRECISION
    end ContactDEP,
    case IND_TYPETRANSPORT
    when 1 then
    substr(DEP_TELEPHONE,1,3) || '-' || substr(DEP_TELEPHONE,4,3) || '-' || substr(DEP_TELEPHONE,7,4) || nvl2(DEP_POSTE,' poste ' || DEP_POSTE,'')
    when 2 then
    substr(DEST_TELEPHONE,1,3) || '-' || substr(DEST_TELEPHONE,4,3) || '-' || substr(DEST_TELEPHONE,7,4) || nvl2(DEST_POSTE,' poste ' || DEST_POSTE,'')
    when 3 then
    substr(DEP_TELEPHONE,1,3) || '-' || substr(DEP_TELEPHONE,4,3) || '-' || substr(DEP_TELEPHONE,7,4) || nvl2(DEP_POSTE,' poste ' || DEP_POSTE,'')
    end TelDEP,
    case IND_TYPETRANSPORT
    when 1 then
    DEST_NOM || ', ' || DEST_ADRESSE || ', ' || DEST_CPOSTAL
    when 2 then
    DEP_NOM || ', ' || DEP_ADRESSE || ', ' || DEP_CPOSTAL
    when 3 then
    DEST_NOM || ', ' || DEST_ADRESSE || ', ' || DEST_CPOSTAL
    end AdresseDEST,
    case IND_TYPETRANSPORT
    when 1 then
    DEST_PRECISION
    when 2 then
    DEP_PRECISION
    when 3 then
    DEST_PRECISION
    end ContactDEST,
    case IND_TYPETRANSPORT
    when 1 then
    substr(DEST_TELEPHONE,1,3) || '-' || substr(DEST_TELEPHONE,4,3) || '-' || substr(DEST_TELEPHONE,7,4) || nvl2(DEST_POSTE,' poste ' || DEST_POSTE,'')
    when 2 then
    substr(DEP_TELEPHONE,1,3) || '-' || substr(DEP_TELEPHONE,4,3) || '-' || substr(DEP_TELEPHONE,7,4) || nvl2(DEP_POSTE,' poste ' || DEP_POSTE,'')
    when 3 then
    substr(DEST_TELEPHONE,1,3) || '-' || substr(DEST_TELEPHONE,4,3) || '-' || substr(DEST_TELEPHONE,7,4) || nvl2(DEST_POSTE,' poste ' || DEST_POSTE,'')
    end TelDEST,
    decode(RET_NOM || ', ' || RET_ADRESSE || ', ' || RET_CPOSTAL, ', , ', '', RET_NOM || ', ' || RET_ADRESSE || ', ' || RET_CPOSTAL) AdresseRET,
    RET_PRECISION ContactRET,
    substr(RET_TELEPHONE,1,3) || '-' || substr(RET_TELEPHONE,4,3) || '-' || substr(RET_TELEPHONE,7,4) || nvl2(RET_POSTE,' poste ' || RET_POSTE,'') TelRET
    from
    TBL_Demande_1,
    TBL_Demande_TRSP_1
    where
    DemandeID = :P7_IDDEMANDE
    and ID_Demande = DemandeIDI then created a report layout in XSL-FO with XSLfast, but it won't work at all. I always get the dreaded "corrupted file" when I test my PDF Report... any ideas why it doesn't work? Have I missed something obvious?
    Best regards,
    Mathieu

    Hello Mathieu
    i assume that the default PDF printing is working, but that you want to create some better looking reports and therefore use a different non-generic XSL-FO.
    You can do several things in Apex but you can use the Apache-Fop conversion also indepent from Apex.
    What you need is:
    1) An XML (Data) File. You can get it from your report query when you say export it to XML.
    2) The XSL-FO (Layout) file. THis is the processing instruction that says how convert the XML Data into an XML-FO. You can create it manually or with some tool.
    3) The next step is to render the XML-FO into any output format (pdf, rtf, html)
    The creation of the XML-FO and of the PDF are done by the apache fop converter (cocoon or Batik framework if I remember correctly) in a single process but you can influence it so that both steps are done separately. See also: http://xmlgraphics.apache.org/fop/0.95/running.html
    The advantage is that you usually get much better error messages from the single steps.
    My recommendation would be to do all the steps with a very basic report first.
    Then gradually improve the complexity of the report, the data and the layout.

  • APEX - Cocoon PDF Generates as attachment (issue)

    Hello,
    [bumped as issue has come to light again, does anyone have any ideas???]
    We have Application Express 3.01 with PDF printing configured the Apache Tomcat + Cocoon way. Our APEX instance runs over https on an internal network.
    Everything works with no issues, except that in the environment that we are running, browsers are IE configured with an advanced option "Do not save encrypted pages to disk" set (for security reasons related to another application).
    PDF's are served as attachments, this means that when you click the "Print PDF" link you are presented with an Open/ Save dialogue. If you click "Open", the file fails to open (as it has not been saved to disk). Everything is fine if you click "Save" then subsequently open the file. It's the same deal with CSV files using the standard APEX CSV generation. If we turn off the security option in IE, it all works fine, even the "Open", but rolling this change out to users is not an option.
    This issue comes down to the HTML that the PDF document is being wrapped in. The content-disposition must be being set to "attachment", whereas in this situation we would prefer it set to "inline" which would mean that the PDF opens in the users' browser.
    We have tried adding a map:act type="set-header" line to the sitemap.xmap to set the content-disposition but it seems to have no effect, presumably because APEX fires off XML and FO to cocoon, gets back a PDF then generates the HTML to send back to the user.
    Other methods we've considered are:
    - Apache mod_rewrite entries to rewrite the content-disposition on the Apex web server.
    - Adding a before header application process to try to intercept the html and rewrite it manually
    Neither of the above are getting us anywhere, does anyone have any ideas? If no-one has any ideas, can you explain how you get from posting a FLOW_XMLP_OUTPUT_R request to getting back a PDF and whether there's anything along the way that could be tapped into?
    Many thanks in advance for your assistance.
    Matt

    Matt,
    On this note, it probably also makes sense to mention that with APEX 3.1 we introduce a PL/SQL API that gives you much broader control over what is generated how and the method it's made available to the client. You'll get the ability to retrieve the PDF in a BLOB directly on the server, store in your own tables for later download or send via email attachment. You'll also get the ability to write your own download process using after-submit page processes. And you can have combinations of your own XML with your own stylesheets, or combine report queries with customer stylesheets at runtime, or just simply retrieve the results of pre-defined report queries / report layouts in BLOBs.
    I'll talk about this much more on my Blog once 3.1 is out, and will provide whitepapers, how-to's etc
    Regards,
    Marc

  • Doku for pdf printing ends in a dead link

    Hi everyone,
    I want to setup pdf printing in APEX.
    The most important installation doku is
    http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
    Since there is APEX 4.0 it results in 404 page not found.
    But there is no newer documentation in 4.0
    Is there a new url or copy?
    As far I know, the doku describes how to install the fop.war with oc4j.
    Is it possible to use tomcat instead of oc4j, because oc4j is not free (I am using xe and apex 3.2)
    I know, there is the posibility to use cocoon, but I need a small footprint
    Thanks
    Richard

    Hi Richard,
    Here's the new link:
    http://www.oracle.com/technetwork/developer-tools/apex/configure-printing-093060.html
    ... the link changed due to OTN using a new system, it's not related to APEX 4.0, so it's still the old document. Not sure about Tomcat, haven't tried that yet.
    Regards,
    Marc

  • PDF Printing in APEX 3.0

    Hello. I am working my way thru the PDF Printing in Application Express 3.0 document. I am currently stuck at step 5: Configure Oracle Application Express to use the JSP for PDF printing. When I access the Admin Services home page and select Manage Services, I cannot locate the Instance Settings, under the Manage Environment Settings. Is there an error in the documentation or am I just not in the right spot?
    Thanks
    Dennis

    Hi Denise,
    That .cpio file is not a CD image file, it is actually an archive file containing the files and directory layout that you need to extract first. You can do that by using the (Linux/Unix) command cpio like this -
    cpio -idmv < file.cpioNote that BI Publisher is an extra licensed option that you will need to make sure you're covered for.
    As an alternative (and if you're willing to live without the 'Advanced' support that BIP provides), then you can use Apache FOP. Carl Backstrom made a fantastic video showing how to set this up, which you can find here -
    http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    APEX does not come with a built-in BI Publisher, I think you're thinking of the pre-supplied FOP configuration in APEX 3.0.1 (which makes it even easier to setup now).
    If you haven't looked through it already, I can highly recommend the "PDF Printing in APEX" document available here -
    http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
    Hope this helps,
    John.

Maybe you are looking for