PLPDF

I'm trying to create bold and normal text in the same paragraph with the library PL/PDF, but I can't. This is a small example: "Hi, this is an *example* to the *library* PL/SQL, adding *text* in bold and normal text." This text should be justified on the margins I can set. Thanks for the help.

Here's a suggestion.. Since this is a 3rd party tool, you MIGHT want to try asking at the plpdf developer's site. I believe they have a question and answers forum there to support their product..
Thank you,
Tony Miller
Webster, TX
I cried because I did not have an office with a door until I met a man who had no cubicle.
-Dilbert

Similar Messages

  • Losing carriage returns in textarea / using plpdf to generate report

    Hello,
    I'm using Apex 3.1.1 and Oracle 10g database. I would appreciate any suggestions on how I can preserve carriage returns in a textarea when sending the text to a package that generates a report. Please see example of current problem (below code). I'm using an onkeypress function to check for keycode = 13 when the Enter key is pressed -- that is working. I also created an alert to show the url value -- I can see the text on multiple lines, so that appears to be working as well. The textarea value parameter in the package is defined as varchar2. Per the support folks at plpdf.com, chr(13) indicates an explicit line break, and they told me to check my text. I don't know what I'm missing. Thank you for any suggestions you may have.
    Lisa
      function callPLPDFRep()
          var url;
          url = '#OWNER#.' + $x('P&APP_PAGE_ID._REPORT_PROCEDURE').value + '?' + build_params();
          w = open(url, "winPDFRep", "Scrollbars=1, resizable=1, width=800, height=600");
          if (w.opener == null)
            w.opener = self;
            w.focus();
       function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        return lparms;
      }Text in textarea:
    035 5768 06/15/2010
    035 5768 06/16/2010
    035 5768 06/17/2010
    Printout on report:
    035 5768 06/15/2010035 5768 06/16/2010035 5768 06/17/2010

    Hello Michael,
    Thank you for your response. After doing some researching and experimenting, here's what I have found so far.
    First, using an onkeypress function to alert the keycode, a chr(13) is being returned when I press the Enter key in the textarea.
      function check_Enter(e)
        var keynum;
        var textval = $x('P212_INCORRECT').value;
        if(document.all) 
          keynum = e.keyCode
        else
          keynum = e.which
        alert(keynum);     
      }Next, when I access the value of the textarea via javascript with $x('P212_INCORRECT').value, the chr(13) is automatically converted to the newline character (\n). In an attempt to replace the \n with a \r so plpdf will recognize the carriage return, I added a javascript replace function before sending the text to the package, and it does not work.
      function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        alert(lparms.split(/\n/g).length - 1);  // confirm that a newline character is found
        lparms = lparms.replace( new RegExp( "\n", "g" ), "\r");  // replace newline character with carriage return
        return lparms;
      }When I tried to replace the newline character (\n) with chr(13), the chr(13) is printed out like it is text instead of a special character. In order to test that I have the correct syntax for the replace function in javascript, I tried replacing \n with '...', and then in the package that generates the PDF, I replaced the '...' with chr(13). That works!
    In response to your comment about the PLPDF procedure for multi line section, I am using: plpdf.PrintMultiLineCell(180, 6, l_incorrect, '0', 0). As a newbie to javascript, I am not sure why replacing \n with \r is not working. Can you advise how to use a chr(13) in the javascript replace function and have it recognized as a special character and not text? I don't know how to view special characters in the textarea other than checking for them with javascript.
    Thanks, Lisa

  • PLPDF and APEX

    I want to PLPDF report printing in APEX 4.0.I succesfully installed the scripts in PLPDF schema using SQL*Plus.
    I also worked out the installation test in SQL*Plus:
    - create table
    CREATE TABLE STORE_BLOB
    (BLOB_FILE BLOB,
    CREATED_DATE DATE);
    - create test procedure
    CREATE OR REPLACE PROCEDURE test1 IS
    l_blob BLOB;
    BEGIN
    Plpdf.init;
    Plpdf.NewPage;
    Plpdf.SetPrintFont('Arial',NULL,12);
    Plpdf.PrintCell(50,10,'Test1');
    Plpdf.SendDoc(l_blob);
    -- store
    INSERT INTO STORE_BLOB (blob_file, created_date)
    VALUES (l_blob, SYSDATE);
    COMMIT;
    END;
    - run test procedure
    BEGIN
    test1;
    END;
    /Everything went well but now i want to be able to generate PDFs in APEX. I didn't understood anything from the tutorial on PLPDF site:
    http://plpdf.com/wp-content/articles/PLPDF/plpdf-reporting_in_APEX_environment.pdf
    It would be great if someone could show me the steps to generate PDFs in APEX.
    Kind Regards,
    BgUrsea
    APEX 4
    10g XE

    I've allready watch that but i didn't understood it very good.First of all:
    Create the PL/PDF report: The report has a P_SESSION_ID parameter that receives the actual runtime application ID.
    The report code has to contain a PLPDF_SESSION_IS_VALID function that verifies the session ID.What do they mean by "PL/PDF report" ?Is it a report region,html region,etc?
    Another question is about the procedure:
    CREATE OR REPLACE PROCEDURE REP1(p_session_id NUMBER, p_par1 NUMBER) IS
    l_blob BLOB;
    BEGIN IF PLPDF_SESION_IS_VALID(p_session) THEN
    << PL/PDF API Calls Here >>
    ELSE htp.p(’Invalid Session’);
    END IF;
    END; What should i put in: "PL/PDF API Calls Here"?
    Kind Regards,
    BgUrsea

  • Using PLPDF on XE Production

    Hi,
    I'm using Oracle XE Production and would like to add pdf output in my APEX application using PLPDF. I followed the installation guide but can't get it working. Even testing the installation fails.
    The install guide says:
    "the document can be reached through a browser
    url: http://<host>:<port>/pls/<DAD>/test2"
    Using the example from www.plpdf.com for integrating plpdf in HTMLDB and typing in http://127.0.0.1:8080/rep1 (I left out the parameters) to test leads to an error page 400. Does anyone know how to integrate it successfully in XE production?
    Already tried two install versions: First creating a plpdf user following the install guide and second installing plpdf under the workspace user account. None was successful.
    Thanks

    Hopser2000,
    I wasn't suggesting you use that URL, I was asking which DAD the URL you used was using. From the Installation docs that you quoted -
    "the document can be reached through a browser
    url: http://<host>:<port>/pls/<DAD>/test2"The procedure needs to be access via a DAD. You can either use the existing DAD (and therefore you will need to grant access to that procedure to the user specified in the DAD), or you will need to setup another DAD which has the appropriate rights to access your procedure.

  • Pdf  mail merge like / FOP / PLPDF

    Hi to all,
    does exist any products that run as well with Oracle xe, that allow user to do a 'mailmerge like' linking with data?
    I'll try to explain better what i'm looking for:
    1- A Model designer will do the pdf, with graphic and map the db field according to the existing tables field (or other substitution logic).
    2- The application developer will link the data to the pdf Model.
    I've tried plpdf today and works great, however what i've explained at point 1, 2 doesn't seem to be possible with PLPDF.
    Another question: if you have tested both FOP / PLPDF what kind of solution would you suggest for a fast pdf generation / data merging?
    thanx

    It is really the "how to create the form" part that I am after. The best I have been able to do so far is to use subforms that are of type "Flow Content". But when you mix text nodes with fields, you have to do some fenagling to get them to line up properly. With this approach, I still have not been able to find a way to write paragraphs of text that have merge fields in various places and have it output correctly.
    Am I missing something or is there a better way to do this?
    Are there any examples out there of form letters that have merge fields inside paragraphs in the letter (as part of sentences)?
    Thanks.

  • Best Practices for creating PDFs using PLPDF?

    Does anyone have any suggestions for Best Practices in making PDF files using PLPDF?
    I have been using it for about a month now, and the best that I have come up with is to use MS Access to prototype the layout of a report. Once I have all the graphics areas and text areas lined up how I would want them, I then write PLSQL code to create a procedure which is called from an HTMLDB page. MS Access is handy in that it provides the XY coordinates for each text area and graphics area. It also provides the dimensions of the respective cells. So long as I call plpdf.Init('P', 'in', 'letter') at the beginning of the procedure, both my MS Access prototype and my plpdf code are both using inches - this makes the translation relatively easy.
    Has anybody found anything else easier/better?
    Regards,

    You can make it happen by creating a private connection for 40 users by capi script and when creating portlet select 2nd option in Users Logged in section. In this the portlet uses there own private connection every time user logs in.
    So that it won't ask for password.
    Another thing is there is an option of entering password or not in ASC in discoverer section, if your version 10.1.2.2. Let me know if you need more information
    thnaks
    kiran

  • How to user oracle intermedia and plpdf to display image

    Hi all,
    AS i know plpdf is very retriction to display images and i think it only valid for jpep and may be gif file extension. Can i display any kind of different file of format if i've both oracle intermedia and plpdf in my database. If yes, can you give me an exampe how to work that this.
    Thank you very much,
    Kevin

    Best way,
    1. I belive you have a JPEG Image.
    2. Accept the text from user. Create an Image from it.
    3. Add the two Images.
    4. All this operations can be done using JAI (Java Advanced Imaging API). It is simple and straight forward.

  • PLPDF ibm z/os

    Hi guys
    Does someone use plpdf package on database instaled on IBM z/os?
    I've try it, it works Ok on 10g instaled on Linux platform but not work on BM z/os.
    It generate blob but can't open it.
    Thanks

    Hi Brian,
    Mmh, still not very good.
    For IBM zSeries Based Linux:
    11gR1 (11.1.0.6.0) status PROJECTED not CERTIFIED yet:
    - SLES-9
    - SLES-10
    - Red Hat Enterprise AS/ES 4
    Don't know the release date yet.
    11.1.0.7 patchset is not planned
    11.2.0.1.0 release is planned for Q1 2011
    Do you have a test Windows or some other unix/linux platform to try semantics? so you can install 11.2? and take advantaje of all the new features.
    For more information:
    Release Schedule of Current Database Releases (Doc ID 742060.1)
    Regards!
    Jorge

  • PDF report from PL/SQL

    Hi,
    I have a region built from PL/SQL(Anonymous Block). This report is one record with 90 fields formatted to display. Is there a way to do this so it opens in a pdf?
    I am using APEX 3.1 on Oracle 11g. We do not have BI, so I need to find another solution to doing this.
    Thanks
    Kevin

    You can do this with Apache FOP. You may also want to look at http://www.plpdf.com/.
    Mike

  • Printing out a report in PDF format

    Hi,
    A colleague and myself have been converting an existing system for our customer from the traditional client/server architecture to a web-deployed system on 10g application server. I have been converting the reports from report 3.5 to reports 10g. The reports work fine but the problem we have is more to do with the printer than the reports itself.
    We have a requirement to print a barcode label (and some other text) to a DataMax printer. This printer seems to be quite fussy about the fonts that are used and essentially if you don't use the DataMax fonts the label comes out blank. I have managed however to produce reports as PDF and if I click the Printer button in the adobe control the report will print out as a bitmap image on the printer.
    Is there any way that I can produce the report as a PDF file and get it to print automatically ?

    Prohan,
    I have never been able to get PDF generation working from APEX. I have asked for some help on this forum, but go no responses. And I just won't spend the outrageous license fees for Oracle BI Publisher. But I have been successful in doing what need with some simple methods.
    1. If the email has some simple tables or formatted information from the database, use a PL/SQL procedure to generate an HTML formatted message and the utl_mail package to send the html formatted email. I use this for many customer and internal emails from both APEX and Oracle Forms applications.
    2 There is a stand-alone product PL/PDF (http://www.plpdf.com/) that allows you to generate PDF files directly from PL/SQL (again not APEX specific). I have demoed this product and it works pretty well, but I am not using it at this time because of the licensing that requires a fee for each database instance. It's not really that expensive, but it's more than I want to spend for the number of databases I have.
    3. If you have Acrobat Professional, you can export XML file from the database and create "mail merge" type PDF documents. But you can also do this with Word and a simple CSV or Excel output. Both of these are pretty easy from APEX. I have used both. I found the Work mail merge to be a little easier for end users to use, so this is my primary choice. But Acrobat Pro method also works well.
    If you are interested in any examples of these methods, let me know and I can send you something.
    Bill
    Bill

  • How To Batch Print PDF Files

    Hello Friends.
    I am using Apex 4.1 on Windows 7. My database is Oracle EE 10.2.0.5 on Solaris and OAS as the app server (and so, am using mod_plsql).
    I wrote an application in which I use the PLPDF package to generate PDF screens. Initially, the last few commands in my code looked like:
    owa_util.mime_header('application/pdf',false);
    htp.p('Content-Length: ' || dbms_lob.getlength(l_blob));
    owa_util.http_header_close;    
    wpg_docload.download_file(l_blob);The variable l_blob is the PDF blob object generated by PLPDF. The PDF is being formed from a cursor for loop further up in my code (not displayed here) that is SELECTing from a table. The above code displays the generated PDF on to a popup page in my application. At that point, the user can click the "File->Print" menu to send the displayed PDFF to the default printer.
    However, my requirements are that I may have multiple PDFs generated from my for loop and would like to have each of these PDFs sent to the default printer is one go rather than force the user to have to display and print each one separatlely.
    And so I modified the above code so that the PDFs created by the PLPDF package are being inserted into an Oracle table rather than displayed in a popup page.
    Would any one know how to send each of the PDFs stored in the table to the default printer automagically, perhaps my issuing a ctrl+p command or some such thing.
    Thanks in advance for any help/code/advice.
    Elie

    I tried the following code that which comes directly from the Apex Stored procedure PRINT_PDF.
    The APEX_UTIL.GET_PRINT_DOCUMENT function returns NULL.
    declare
        v_filename varchar2(1000);
        v_pdf_blob blob;
    pnum number;
    begin
    v_filename := 'TEST_' || to_char(sysdate,'yyyymmdd');
    pnum := --Hidden from Post;
    dbms_output.put_line('Security ID: ' || pnum);
    wwv_flow_api.set_security_group_id(p_security_group_id=>nvl(wwv_flow_application_install.get_workspace_id,pnum));
    v_pdf_blob := APEX_UTIL.GET_PRINT_DOCUMENT (
                                           p_application_id      =>  121,
                                           p_report_query_name   => 'QS_CERT_QUERY_TEST',
                                           p_report_layout_name  => 'QS_CERT_QUERY',
                                           p_report_layout_type  => 'xsl-fo',
                                           p_document_format     => 'pdf');
    insert into printed_pdfs (filename, stored_pdf, record_created_By_person, record_created_on_date)
                      values  (v_filename||'.pdf', v_pdf_blob, 'Name', sysdate);
    end;
    Any idea on what is wrong or how to make it work.

  • Print multiple page report

    How do you print a report that spans multiple pages? I couldn't find anything in the user's manual, other than making a page 'printer friendly'. The only thing I can think of is to temporarily change the rows per page to a huge number. But that seems pretty hokey.
    Terry

    That is about all you can do. A web application, a thin-client only knows about what it sees in the current page view.
    Some alternatives you could evaluate to print the entire report are
    a. FOP (export to PDF); search the forum for more information
    b. export to CSV and then print from Excel
    c. change rows/page to a large number (as you point out) and then use the browser's File/Print feature
    d. use a commercial product like http://www.plpdf.com

  • Multiple clobs in a single row of data

    I have several clobs in a single row of data and have created a procedure where I attempt to display the first 4k of each clob.
    using a for loop cursor I select all of the clobs in a row at the same time and then I use dbms_lob.read to get the first 4k of data.
    For the first lob of each row everything works fine but when I attempt to dbms_lob.read the second one I get an "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275" and I'm not sure why?
    does anyone know of an example where two or more clobs are selected and then converted to 4K varchars?
    sample columns for the table:
    SPECIALREQUIREMENTSS     CLOB
    REFERENCERANGE     CLOB
    ALERTVALUE     CLOB
    REFERENCELAB     VARCHAR2(50 CHAR)
    TESTINCLUDES     CLOB
    LASTUPDATE     DATE
    sample code (I removed some code for clairity - this produces the same error):
    create or replace
    procedure test_lobs as
    v_lab_blob blob;
    v_lobamt binary_integer := 32767;
    v_lobpos pls_integer := 1;
    v_labrec labman.lab_testingdata%rowtype;
    v_buffer varchar2(32767) :='';
    v_start_left number;
    begin
    -- *** housekeeping
    dbms_lob.createtemporary(v_labrec.testincludes,TRUE);
    dbms_lob.createtemporary(v_labrec.specialrequirementss,TRUE);
    Plpdf.init;
    Plpdf.NewPage;
    Plpdf.SetColor4Drawing(66,66,66);
    Plpdf.SetColor4Filling(180,180,180);
    v_start_left := Plpdf.GetPageWidth-Plpdf.GetPageRightSpace;
    -- *** select the test name for shaded printing
    for x in (select indexnumber, test from labman.lab_testingdata where test like 'A%') loop
    -- *** select the test data for printing
    select * into v_labrec from labman.lab_testingdata where indexnumber = x.indexnumber;
    -- *** test includes
    if dbms_lob.getlength(v_labrec.testincludes) > 0 or v_labrec.testincludes is not null then
    Plpdf.SetPrintFont('Arial','B',8);
    Plpdf.LineBreak(.1);
    Plpdf.PrintCell(25,5,'Test Includes:',0,0,'R',0,null,0);
    Plpdf.SetPrintFont('Arial',null,8);
    if dbms_lob.getlength(v_labrec.testincludes) > 32767 then
    v_buffer := '*** error - text is greater than 32k ***';
    else
    v_lobamt := 32767;
    v_buffer := '';
    dbms_lob.read(v_labrec.testincludes,v_lobamt,v_lobpos,v_buffer);
    end if;
    Plpdf.SetLeftMargin(Plpdf.GetCurrentX);
    Plpdf.PrintFlowingText(5,v_buffer,null,0);
    Plpdf.SetLeftMargin(v_start_left);
    Plpdf.lineBreak;
    end if;
    -- *** special requirements
    Plpdf.SetPrintFont('Arial','B',8);
    Plpdf.LineBreak(.1);
    Plpdf.PrintCell(25,5,'Special Requirements:',0,0,'R',0,null,0);
    Plpdf.SetPrintFont('Arial',null,8);
    if dbms_lob.getlength(v_labrec.specialrequirementss) > 32767 then
    v_buffer := '*** error - text is greater than 32k ***';
    elsif dbms_lob.getlength(v_labrec.specialrequirementss) = 0 then
    v_buffer := '';
    else
    v_lobamt := 32767;
    v_buffer := '';
    dbms_lob.read(v_labrec.specialrequirementss,v_lobamt,v_lobpos,v_buffer);
    end if;
    Plpdf.SetLeftMargin(Plpdf.GetCurrentX);
    Plpdf.PrintFlowingText(5,v_buffer,null,0);
    Plpdf.SetLeftMargin(v_start_left);
    Plpdf.lineBreak;
    commit;
    end loop;
    Plpdf.SendDoc(v_lab_blob);
    -- store the PDF document
    delete from store_blob;
    commit;
    INSERT INTO STORE_BLOB (blob_file, created_date)
    VALUES (v_lab_blob, SYSDATE);
    COMMIT;
    end test_lobs;

    didn't think that checking for a length of zero and null would produce two different results - should have known better.
    Thanks for your help!
    elsif dbms_lob.getlength(v_labrec.specialrequirementss) = 0
    or v_labrec.specialrequirementss is null then

  • Html db to display pdf files saved as blob in the data base

    Hi all,
    I have a DB page to call next page to display pdf files.
    A procedure is being called when the link is clicked on the first page.
    However, the procedure output a juck code insteand the pdf files. Please help.
    Thanks,
    n_length number;
    n_image BLOB;
    begin
    select note_image, dbms_lob.getlength(note_image)
    into n_image, n_length
    from n100_notes where note_id = nid;
    owa_util.mime_header('application/pdf');
    htp.p('Content-length: ' || n_length);
    wpg_docload.download_file(note_image );

    we use:
    owa_util.mime_header('application/pdf',false);
    htp.p('Content-Length: ' || dbms_lob.getlength(l_blob));
    owa_util.http_header_close;
    wpg_docload.download_file(l_blob);
    see plpdf.com
    LL

  • 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

Maybe you are looking for

  • Blue star no longer showing in Top Sites

    My top sites page no longer shows the blue 'updated' starts in the corner. I have tried resetting just the topsites in 'reset safari...', but it just shuffled them all around and lost some favourites. It's becoming frustrating... Can anyone give me s

  • Need help in upfate of the jlist

    when i add somthing to the listmodel it doesnt apper on the list how to make it appear

  • Boot error in OS8 -- no CD-ROM, how do I fix it?

    OK, I have an old PowerBook 2400c. It was working fine when I got it, running OS8.something, but the previous owner hadn't deleted any of their programs or files before giving it away. Since the hard drive is so small, I went through and deleted all

  • InDesign CS6: Cannot open the file ...

    Hi there, I think I just blew my file by embedding every picture inside the file. It's a ~130 page long user guide with A LOT of pictures. I saved it successfully a few days ago, and now tried to open it again to finish working with it. But then I ge

  • Black and White RDP session

    Is it possible to view an RDP sessions as black and white?  I'm considering ordering a privacy screen, but I think if the RDP sessions could be black and white that would be sufficient.