Font problem creating WORD document with Oracle Reports 8i/9i

I created a report using different Arial fonts. Once the report is generated from a .NET application, the fonts in the word document are changed apparently into Helvetica. This disarrange my lay-out completely. How can I solve this problem?
(NB. when I generate a PDF, there is no problem!)

By the way. I create the files in this way:
   private void createFile(String outFileName) {
      try {
         ByteArrayInputStream result = clientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
         File newFile = new File(outFileName);
         FileOutputStream output = new FileOutputStream(newFile);
         int bytesRead = 0;
         byte[] byteArray = new byte[10000];
         while ((bytesRead = result.read(byteArray)) != -1) {
            output.write(byteArray, 0, bytesRead);
         output.flush();
         output.close();
      } catch (Exception e) {
         e.printStackTrace();

Similar Messages

  • Create Word document with Java

    I want to create a Word Document with Java. But I don't know how can I insert text in a Word document.

    I searched and found JXWord (probably limited to Windows): http://www.geocities.com/picmapicma/
    I'm interrested to know if it works fine...:)

  • Read,write and create word document with list data

    Hi,
    My requirement is that I have a custom list called List1 and which has a 4 (suppose XName, location, phone, email)columns and also have a Template document(.dot). If I click on save button , new document has to create from the Template document(.dot) and
    should modify the content depends on list columns.
    For that I need to read the document , find out the text where XName , location,,phone, email and replace with the list item data(user entered data). 
    Can anybody please refer links for read,write and create word document?
    Thanks in advance.

    Yes, you can using Office Open XML. I found it to be a lot more cumbersome and in the end not a money saving approach:
    https://msdn.microsoft.com/en-us/library/office/bb448854.aspx?f=255&MSPPError=-2147217396
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Create Word Document with OLE2.

    Hi,
    Is it possible to create a word docuent as an attachment? I want to create an attachment for opportunity when its status changes.
    Is it possible to create word document in Actions and can we attach it to opportunity?
    Any suggestions on how to approach for this requirment?
    Regards,

    Mike is not suggesting that you try to invoke a Word macro from OLE2. He is suggesting that you use Word's Macro Recorder to capture the actions you are trying to automate. The resulting macro will be written in VBA, and therefore of no direct use to you. It will, however, show you which objects/methods are relevant to your task. This information will make it much easier to write the equivalent OLE2 code.
    Note that Macro Recorder tends to generate more code than is necessary, by reassigning default values to object properties, to ensure portability. Your OLE2 code can often be left much more brief, by assigning values only to those properties that actually change within your operation.
    Eric Adamson
    Lansing, Michigan

  • Problem converting Word document with TOC table

    Hello,
             I am using MsWord 2003 and Acrobat 9 in Windows 7 Ultimate 64 bits.
    I have created the manual using Word, I set Heading (s) with 3 levels deep and created TOC in Word.
    It looks as designed. There are Titles, Subtitles and Subtiles (3rd level).
    TOC in Word works fine. No problem.
    In PDFMaker options under Bookmarks tab I set TOC 1 with 3 levels.
    However, after converting the whole document into PDF, the Bookmarks look very strange.
    They contain only Titles (no subtitles at all), each bookmark line ends with some number 3, 4 or 5 which I do not have idea what are they and those bollmarks point to the TOC page not to the page they should have.
    What is wrong and how can I correct that?
    Thanks,
    jas
    Added:
    I have read many of posts having similiar problems and tried all the suggestions posted.
    I tried:
    1.
    Reinstalling Adobe (removing all the related files), although I did not have any previous versions (and installations) of Acrobat in this computer.
    2.
    In Adobe PDFMaker  uncheck 'Enable Accessibility and...' option
    3.
    Setting printer to Adobe PDF
    4.
    In Word > TOC settings I checked the 'Use hyperlinks instead of page numbers' option
    Also I tried In Adobe PDFMaker not use TOC but to use 'Convert Word Headings to Bookmarks'
    The result was horrible. Double bookmarks, reversed Level 1 with Level 2 positions and lots of empty bookmarks (I believe created by empty rows in pages tables).
    Please note, that using the same Headings Word creates TOC without any problems!
    The only plus side was that some of those bookmarks came with correct links.
    Those bokkmarks were created using 'New Bookmarks from structure' option in Acrobat (after converting the document)
    /jas

    This is ridiculous!
    I think it is time for Adobe to admit there is a problem creating bookmarks in Acrobat, regardless the used version.
    Today I spent all day trying different combinations.
    In addition to my post above I installed and tested the same document in Acrobat Prof ver.8 and Acrobat X.
    The installation was virgin (no previous Adobe was installed).
    Same for MS Office. Virgin installation of ver. 2003 and 2007
    My document I copied and pasted in blank new Word document.
    Also I tried under Windows XP
    All that does not make any difference.
    The final result was always the same, as shown graphically in above post.
    Any ideas?
    What I do not understand, how such big corporation allows bugs like that.
    Convertning TOC (nice working in Word) cannot be a rocket science!
    If Word can create TOC from Headings flawlessly, why not Adobe?
    That TOC is correctly converted as TOC page in pdf document.
    Maybe Adobe should add the option to create bookmarks directly from it after the conversion?!
    As I said, it is not a rocket science.
    Onus is on you, Adobe!
    /jas

  • Problems Converting word documents with the Adobe Printer and method ,printout (OutputFileName:=) in

    I would like to write a vb-procedure to convert a word document into pdf.
    I'm developing in "Visual Basic 2005 express edition" and tried the following code:
    code[
    Private Sub PrintDocument(sDocName As String,sNewDocName As String)
    'sDocname = "c:\tmp\test.doc"
    'sNewDocName = "c:\test\test.pdf)
    Dim m_wdApp As Word.Application = New Word.Application
    Dim m_wdDatei As Word.Document
    m_wdDatei = m_wdApp.Documents.Open(FileName:=sDocName)
    m_wdDatei.PrintOut(Background:=False,OutputFileName:=sNewDocName, _ ActivePrinterMacGX:="Adobe PDF")
    m_wdDatei.Close(False)
    m_wdDatei = Nothing
    m_wdApp.Quit()
    m_wdApp = Nothing
    End Sub
    ]End of code
    After running the printout line I can see a little window popping up, which shows the progress in the converting and after a little time I can find the expected file in the targetdirectory.
    The problem is that I can't open this file, I just get the message that the file is corrupt or not of the pdf-format.
    By scanning the web, I found several threads describing the same problem, but so far I found no solution. Maybe someone here can help me.
    Adobe standard 7.0.5.2005092300
    COM: Microsoft Word 11.0 Object Library

    You were right.
    I've changed the default printer to "adobe printer" and created a new file. I thought the problem solved, but instead, the error is the same. The new file starts like this:
    %!PS-Adobe-3.0
    %%Title: Microsoft Word - P0017083.OPB
    %%Creator: PScript5.dll Version 5.2
    %%CreationDate: 3/31/2008 19:42:4
    %%For: MMasshoff
    %%BoundingBox: (atend)
    %%Pages: (atend)
    %%Orientation: Portrait
    %%PageOrder: Special
    %%DocumentNeededResources: (atend)
    %%DocumentSuppliedResources: (atend)
    %%DocumentData: Clean7Bit
    %%TargetDevice: (Adobe PDF) (3016.102) 0
    %%LanguageLevel: 3
    %%EndComments
    %%BeginDefaults
    %%PageBoundingBox: 0 0 595 842
    %%ViewingOrientation: 1 0 0 1
    %%EndDefaults
    %%BeginProlog

  • Problem importing Word document with TOC

    I am trying to import a Word document containing a table of contents into Pages. The TOC does not appear at all and I get a box saying: "The table of contents is empty because none of the paragraph styles selected in the Document Inspector are used in the document". The TOC style in the original Word document is a hyperlink.
    Any help appreciated,
    George
    Pages 2.0.2

    I'm on Windows right now, but I will try answering anyhow. Forgive me for being foggy.
    If the the document complains that the styles are wrong, that is probably where the problem is. Somewhere in Pages there should be a setting to choose which styles to use for building a table of contents. You should try to change those settings to match the style names used in the Word document.
    A possible source of error here is if you use Pages in another language than the Word document. Let's say the Word document uses the German word "Titel" for Header 1 and you run Pages in French, which expects something like "Titre". It is then possible that Pages cannot recreate the table of context, unless you tell it that it should built it from the styles called Titel.

  • Hyperion SQR - Create Word document reports

    We are using Hyperion SQR Production Reporting v8.3. Does this have the ability to create a Microsoft Word document as a report?
    If not, does a more recent version have support for creating Word document as a report?

    SQR does not support creating word document. However you could check this link which might help as a workaround :
    sqr report output file in microsoft word format - Toolbox for IT Groups

  • Create a word document with TOC, table,etc

    Hi,
    How to create a word document with Table of content(TOC),header, footer, table, etc?
    Help me with any APIs or examples. I have already tried with POI API, but couldnt create TOC.. So any other api or any solution is available to create complex word document.
    Thank you

    Hi BIJ001,
    Thanks for your valuable suggestion.
    Open standards WordprocessingML format is supports by Microsoft word. It is typical xml format of designing word document. But creating document with TOC,tables, different styles of paragraphs are complex. Using this format, i have created simple docs. I never tried with complex formats like TOC. The generating File should be in ".doc or .docx" format only.
    Hi gimbal2,
    I am parallely looking to find solution in OpenOffice format also. But i never try out ".docx" file format. I will try to look out this option.
    Thanks for the input.
    Edited by: user13735134 on May 24, 2011 6:55 AM

  • I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers.

    I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers. Any ideas?

    version 10.6.8

  • CREATE SD document with characteristics - BAPICUVAL / E1CUVAL problem

    Hello there,
    I am trying to create SD document with material characteristic. I can create single value characteristic, but when I am trying to post interval characteristic, just lower interval is saved and upper one is ignored.
    I use BAPI_SALESORDER_CREATEFROMDAT2. For example:
    DATA: tab_order_value TYPE TABLE OF bapicuval,
          wa_order_value LIKE LINE OF tab_order_value.
    wa_order_value-config_id = '000001'.
    wa_order_value-inst_id = '00000001'.
    wa_order_value-charc = 'OUTER_DIAMETER'.
    wa_order_value-value = '510'.
    wa_order_value-valcode = '3'.
    wa_order_value-value_to = '2100'.
    wa_order_value-author = '8'.
    INSERT wa_order_value INTO TABLE tab_order_value.
    Characteristic is not set properly (510-2100mm), just 510mm is set. How should I call it properly? Should I fill also some another tables? Is there some documentation? Can be there some bug in SAP standard?
    Any response is highly appricieted.

    Hi Maggie,
    my values are definitely ok. When you post 100 its same as 100,00 :).
    When I want to post just one value, for example 100 it works well. When you want to post interval values, for example 100 u2013 500, its just post the first one.
    I debug standard code behind this and its look like, that there is no way to write interval and this "bug" is standard feature - the upper level of interval is cut by ABAP code.
    In past I also checked how is system filling BAPICUVAL structure. When I fill this structure with same values and run it in my BAPI its doesnu2019t work, because its processed like iDoc.
    So the conclusion is, that it is not possible to write intervals right now from external source, just from the inside of SAP standard transactions.
    So, I decided to close this thread.

  • Automatic creation of MS Word Documents within a Report

    Dear Experts,
    within my report which creates automatically activities in a background process I have to create MS Word Documents and
    attach this Word Documents to the Activity.
    The Word Document does have a Logo and the text is changing with every Activity created.
    What would be the best technical solution for the creation of this word documents for my report?
    Best Regards
    Oliver

    Hello, I have found out what was the problem. In the end I have used method EDITREPLACE and not WW2_EDITREPLACE and I put the method EDITREPLACE more to the end of my ABAP Code:
    REPORT  z_prueba_oliver.
    TYPES: BEGIN OF ty_partner,
                 nif            TYPE bu_partner,
                 name_org1      TYPE bu_nameor1,
                 conting_com    TYPE c LENGTH 2,
                 fecha_efecto   TYPE zbufecha_ef,
                 END OF ty_partner.
    DATA:  lt_partner1     TYPE TABLE OF ty_partner,
                 ls_partner1     TYPE ty_partner,
                 lv_file_save_as TYPE c LENGTH 40,
                 lv_contador     TYPE n LENGTH 3.
    * Include necesario para la declaracion de objetos OLE2
    INCLUDE ole2incl.
    * Declaraciones para la llamada a WORD.
    DATA zword TYPE ole2_object.
    CLEAR zword.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 1'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 2'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 3'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510035M'.
    ls_partner1-name_org1 = 'Razon Social 4'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510035M'.
    ls_partner1-name_org1 = 'Razon Social 5'.
    APPEND ls_partner1 TO lt_partner1.
    LOOP AT lt_partner1 INTO ls_partner1.
      AT FIRST.
        CREATE OBJECT zword 'WORD.BASIC'.
    * Se abre el fichero que contiene la plantilla de la carta
        CALL METHOD OF zword 'FILEOPEN'
          EXPORTING
          #1 = 'C:DOCSPRUEBA_1.DOC'.
      ENDAT.
    * Se selecciona todo el texto del archivo PRUEBA_1.DOC
      CALL METHOD OF zword 'EDITSELECTALL'.
    * Se copia el texto seleccionado al portapapeles
      CALL METHOD OF zword 'EDITCOPY'.
    * Se crea un documento nuevo, al que WORD llama documento1
      CALL METHOD OF zword 'FILENEW'.
    * Se pega el texto del portapapeles a documento1
      CALL METHOD OF zword 'EDITPASTE'.
    * Posicionar al principio del documento
      CALL METHOD OF zword 'STARTOFDOCUMENT'.
    * Posicionar al principio del documento
      CALL METHOD OF zword 'STARTOFDOCUMENT'.
    * Se selecciona todo
      CALL METHOD OF zword 'EDITSELECTALL'.
    * Se borra la selección
      CALL METHOD OF zword 'EDITCLEAR'.
    * Se incorpora el texto original de PRUEBA_1.DOC
      CALL METHOD OF zword 'EDITPASTE'.
    *IF ls_partner1-conting_com is initial.*
       *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#linea2y3#'*
        *#02 = 'de la cobertura de Accidentes de Trabajo, de los siguientes código de cuenta de cotización (CCC):'*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
    *else.*
         *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#linea2y3#'*
        *#02 = 'de la cobertura de Accidentes de Trabajo y Contingencias Comunes, de los siguientes código de cuenta de cotización (CCC):'*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
    *ENDIF.*
      *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#codprov#'*
        *#02 = ls_partner1-nif*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
      CALL METHOD OF zword 'EDITREPLACE'
        EXPORTING
        #01 = '#nomprov#'
        #02 = ls_partner1-name_org1
        #03 = 0
        #04 = 0
        #05 = 0
        #06 = 0
        #07 = 0
        #08 = 0
        #09 = 0
        #10 = 1
        #11 = 0
        #12 = 1.
    * Se reemplaza el campo #nomprov# con el valor de la tabla interna.
      CALL METHOD OF zword 'EDITREPLACE'
        EXPORTING
        #01 = '#FECHA_EFECTO#'
        #02 = '10 de Junio de 2010'
        #03 = 0
        #04 = 0
        #05 = 0
        #06 = 0
        #07 = 0
        #08 = 0
        #09 = 0
        #10 = 1
        #11 = 0
        #12 = 1.
      lv_contador = lv_contador + 1.
      CONCATENATE 'C:DOCS' 'PRUEBA' lv_contador '_' sy-datum '.DOC' INTO lv_file_save_as.
    * Se cierra el documento activo, documento1 con opción de salir sin salvar
      CALL METHOD OF zword 'FILESAVEAS' EXPORTING #1 = lv_file_save_as.
    * Se cierra el documento activo PRUEBA.DOC con opción salir sin salvar
      CALL METHOD OF zword 'DOCCLOSE' EXPORTING #1 = 2.
      AT LAST.
    *   Se cierra WORD
        CALL METHOD OF zword 'APPCLOSE'.
    *   Se libera el objeto ZWORD
        FREE OBJECT zword.
      ENDAT.
    ENDLOOP.

  • Write to word document from oracle plsql

    Hi,
    Please provide methods to create and write to a word document from ORACLE PLSQL.We tried using UTL FILE package but it writes as ascii text.

    Divs wrote:
    The server m/c operating system is unix.so we need to invoke the procedure from Unix Os.In that case - not possible. For Windows COM (Component Object Model) to work, Oracle database need to be able to call and load the COM dynamic link libraries.
    Not to say that it is not possible. Have never used DCOM (the Distributed COM interface), and not exactly sure what it requires. Assuming that DCOM is not usable from a Linux perspective, you can still provide a manual interface. You create a NT tcp/ip service that exposes the COM interface calls that you need - in a secure fashion (even better - you can provide a higher level abstraction layer for the COM interface that does the specific job you need to be done).
    From Oracle you can then use PL/SQL's UTL_TCP package to open a connection to it and via this service craft a Word document on that Windows server.
    Are there web services for MS Office? I know Google is pushing that aspect hard (and embroiled in lawsuits with the US government and Microsoft about tender awards in this aspect). Now if Microsoft has "+office-on-the-web+", then one can create a Word document via a web browser. This means that there is an underlying web service - and that this can be called and used. The Evolution (Open Source Mail Reader) project for example uses the MS Exchange web service interface to provide a seamless interface to Exchange mail accounts (have used this everyday for a number of years now).
    The real question I would however ask is why Word specifically? Why not a more common format like PDF? You can even consider generating XML instead. Both Microsoft and Open Office and others are supporting XML formatted word processing documents (as oppose to older proprietary and binary formats).
    And why not use a Report Writer? I'm a big fan of doing as much as possible in Oracle (using PL/SQL most of the time). But certain things, like generating Word-style documents would be better done (and more flexible too) using a Report Writer.

  • Word document with multiple sections generates multiple pdf?

    Hello everyone,
    I'm a new and happy Mac user, but not fully able to use this. I hope you can help.
    I have a Word document, with multiple sections that I want to convert into pdf. When I used to do this with the PC, I didn't have problems. I used to use Click to Convert and I normally used to get one single pdf file.
    Now, using the pdf button wit the Mac, I get separate pdf files, one for each section. Is there a way that I can create a single pdf, with all the sections in order? If not, how can I merge the pdf in one single pdf file?
    Thanks in advance.

    Hi,
    just to let you know I have sorted this.
    http://macintoshhowto.com/leopard/how-to-merge-pdf-files-with-preview-in-leopard .html
    Thanks.

  • Populate word document with default metadata information

    Problem is revers as it is available in internet.  I have created list and
     columns. Which are populated  with default value. I have created word
     template. I can enter  data related to “Document properties”, ect. When I save that document to document library, I can see that filed data, that I type it in newly created word document.
    But because I have several project document library and sites, I would like to create library, 
    and fill all data with required values.  Then when I open new document from pre defied 
    template, I would like to have all fields  that are empty in document, to be filed 
    from  default columns value. Problem is, that when I save document, All fields are empty.
    There is no problem, upending document, and default properties are presented.
    How can I merge  default values from library, to word document ?

    I have word template, that I added-it as a site content type. It has all standard 
    fields  that are mapped to document library filed. If I open 
    new document in  document library, and input 
    required filed,  after  saving document, I can 
    see those fields in SharePoint document library (Item properties).
    Problem that I have is, following :
    When I open that  document “new document” from template, I would like to have all fields filed with default values of that particular library.
    Reason : Because  I will generate  hundred project (
    Each new library is based on new project, build fields are the same, values changes to mimic project)
    ),  I do not wont to create additional template, that would have required fields fill up wit project value, and add it to content type.. .
    I do not won`t to fill those properties manually.
    Option 1 :  After saving document based on template, it will fill out  
    required fields.
    Option 2: Create template, for each project, and save that template as project template, that users open, and save it to project Site/library.
    Option 1, is preferred.  Can that be done, when item is created, and copy project 
    information, from different location ?
    So I have  document library fields :
    Name of the project,  Projec Manager,  Project ref number, Contract, ...
    These filed are mapped to document filed :
    Name of the project,  Projec Manager,  Project ref number, Contract, ...
    I have document library : Project A
    Project A  ,  John dear, 
    REF2014_01_01, C1243332_2014, ...
    I have document library : Project B
    Project B ,  Same Jones ,  REF2014_03_05, AS563332_2014, ...
    I would like,  that when I save  document
     using New document (template),  that have those filed fill up. I do not wont to 
    create  new template for every project.

Maybe you are looking for