Regarding "Generate Word document"
Hi,
I have one layout of xml publisher. In the layout I have made the page setup as
Margins:
Top - 0.3 Bottom - 0.3
Left - 0.5 Right - 0.5
and in Layout tab I have
Header - 0.3 Footer - 0.3
I have attached this layout in the Templates tab of XML Publisher responsibility.
But when I am trying to Generate Word Document of my report, The layout and margins gets distorted.
The Margins change to
Top - 0.42 Bottom - 0.4
Left - 0.46 Right - 0.46
and in Layout tab I have
Header - 0.5 Footer - 0.5
Please help me out how can I control the header and footer of my report. Your ideas are welcome at [email protected]
Thanks.
Edited by: user5427917 on Nov 7, 2008 12:27 PM
How are you generating the Word documents, manually? I haven't used it, but it looks like docx4j might be good library for building the documents. General documentation can be found [here|http://dev.plutext.org/trac/docx4j/wiki], description of [Java API|http://dev.plutext.org/docx4j/javadoc-2.2.2/] and here's the [download|http://dev.plutext.org/docx4j/].
Cheers, harald
Similar Messages
-
Generated Word document from Robohelp HTML
Hi Everyone,
I have two questions regarding the word document i have
generated from RH HTML.
First, in my Word document which i have generated from RH
HTML my footer is not displaying the one i have used in online
help.
Second, the hyperlinks i have in my online help, they are
also not displaying in the Word document.
I would appreciate if anybody who knows the answer to it and
can please let me know.
ThanksHeaders and footers are not transferred across.
Hyperlinks are only available in RH6 or better.
Take a look at the topic on Printed Documentation on my site. -
Early watch alert - problem with generating word document
Hello experts,
since last week I am not able to generate word documents of early watch reports. I have access to 4 different solution manager installations (of customers) where the generation was working without problems but stops since last week.
SAP gui starts word and the standard word sheet is loaded (SAP early watch start page) but without putting data into the sheet. At the same time I get an error message in the sap gui saying:
Error during download; read details in long text
Long text:
Message no. DSVAS824
Diagnosis
The application was unable to write a file to a local directory.
Procedure
Often the maximum length of 128 characters for the entire file name, which is defined internally, is exceeded. To avoid this problem, you can change the setting.
To do this, open Microsoft® Word.
For English interfaces, choose Tools->Options->File Locations->User templates.
For German interfaces, choose Extras->Optionen->Speicherort für Dateien->Benutzervorlagen.
Recommendation: Use directory names with a maximum of 60 characters (For example C:Program FilesMicrosoft OfficeTemplates)
I have already maintained the path in word options (we use Word 2007). My colleagues have the same problems.
Any ideas or hints? Thank you in advance.
BR, BastiHi all,
SAP is aware of this problem and is working on a fix.
For a ***temporary workaround**
run se38
RAGS_DSWP_SERV_CONTENT_RESET
(De-Activate content until 26.05.2011 07:28:06
Execute
This will allow you to open the report on a temporary basis. -
Using and Apex developed system and generating word documents
Started a new development project. We looked at using Apex for the system but ran up against a road block because the customer needs to generate word documents that they can edit and print. Does anyone know if Apex can handle this? Any suggestions on were to look for more information.
Hi Dawn,
Yes you can certainly do that, take a look at this quick overview -
http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
It refers specifically to PDF printing, however with BI Publisher you can output in Word Document format too.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
How to generate Word document from JSP ?
Hi,
I want to generate Word documnet from JSP. I am using Neva objects to generate Word document. Now my problem is Word doc generation code works alright as a Java application but when I place that piece of code in a JSP bean it throws an exception. The reason seems to be unavailibility of DLLs and other files of Neva in Tomcat environment. I do not want to use other complex packages like JIntegra, I would prefer any freeware solution. There is not much info. about Word document generation on POI project in Jakarta site.
Could anyone suggest way out ? Any Java examples doing the same would be of great help.
Thanks,
AkashHi Saurabh,
Thanks for the reply.
I have tried that too. Problem with that solution is that if you have used CSS in your JSP code MS word does not understand it and generates word doc which is not the same as HTML which JSP otherwise would have generated.
Akash -
Auto-generating word documents from word templates
How would one go about generating a word document based off of a word template (.dot)? For example, I have a simple JSP form which has a field "Last Name". When submitted, the "Last Name" is plugged into a corresponding bookmark in a .dot file. Then the .dot file is saved as a .doc file and presented to the user for download. So, breaking it down:
1. User fills out a jsp form with "Last Name" and hits the submit button
2. The submit button triggers a routine to:
a. open a .dot file on the server (static location)
b. find the bookmark where the last name should be plugged in
c. plugs the value of last name
d. saves the .dot as a word document
e. presents to the user for download
Has anyone done a similar thing before? Any pointers?There's a lot of templating projects around that are usable in Java. I'm not aware of any that use closed proprietary technology like Word and I wouldn't base my design on that either. If you're stuck with that idea then I don't have any suggestions.
-
Insert and activate a phone number in a generated word document
Hey guys,
I would like to add a phone number to a word document that I generate using the mso api.
In word, when one writes (Tel:00493298402938) and new line, the phone number is activated automatically.
While trying to record the corresponding macro and check the VBA code, it doesn't show the same behavior and the phone number is interpreted as a normal text.
Any helpful source code in VBA, C# or C++ is welcome.
Thanks!Hi Cindy,
It worked. I added a lync addin in word. and used:
HyperlinkPtr Add (
IDispatch * Anchor,
VARIANT * Address = &vtMissing,
VARIANT * SubAddress = &vtMissing,
VARIANT * ScreenTip = &vtMissing,
VARIANT * TextToDisplay = &vtMissing,
VARIANT * Target = &vtMissing );
with the second parameter "tel:002123049034" instead of just the phone number. -
Infopath Multi Textbox and OpenXML to generate word document
Hi,
I'm reading multiple InfoPath Textbox (set to display multiple lines) using OpenXML and generating a word document based on a template collecting data from InfoPath. I'm using following code, the code gives error in
AddMultiLineText at Paragraph p = sdt.GetFirstChild<SdtContentBlock>().GetFirstChild<Paragraph>();
The code actually works when I use only one Multi Textbox but fails if its more than one. I'm quite new to Infopath and OpenXML, I would appreciate some help ASAP as its holding me in my project:
Event Receiver
public override void ItemAdded(SPItemEventProperties properties)
try
this.EventFiringEnabled = false;
string siteUrl = properties.WebUrl;
SPListItem item = properties.ListItem;
SPWeb web = properties.Web;
SPList lib = web.Lists["DocLib"];
SPFile file = lib.RootFolder.Files["template.docx"];
string generatedDoc = "";
if (file != null)
byte[] templateBytes = file.OpenBinary();
using (MemoryStream ms = new MemoryStream())
ms.Write(templateBytes, 0, (int)templateBytes.Length);
byte[] convertedDocBytes = ConvertInfoPathToWord(ms, item.File);
generatedDoc = item["LinkFilename"].ToString().Replace("xml", "docx");
SPFile newFile =
lib.RootFolder.Files.Add(generatedDoc, convertedDocBytes, true);
ms.Close();
private byte[] ConvertInfoPathToWord(MemoryStream ms, SPFile file)
byte[] bytes = file.OpenBinary();
using (MemoryStream msInternal = new MemoryStream(bytes))
XmlDocument doc = new XmlDocument();
doc.Load(msInternal);
XPathNavigator root = doc.CreateNavigator();
root.MoveToFollowing(XPathNodeType.Element);
string ns = root.GetNamespace("my");
XmlNamespaceManager nsMgr = new XmlNamespaceManager(new NameTable());
nsMgr.AddNamespace("my", ns);
string multiLineText1 = root.SelectSingleNode(
"/my:myFields/my:field1", nsMgr).Value;
string multiLineText2 = root.SelectSingleNode(
"/my:myFields/my:field2", nsMgr).Value;
using (WordprocessingDocument myDoc =
WordprocessingDocument.Open(ms, true))
MainDocumentPart mainPart = myDoc.MainDocumentPart;
List<OpenXmlElement> sdtList = InfoPathToWord.GetContentControl(
mainPart.Document, "multilinetext1");
InfoPathToWord.AddMultiLineText(multiLineText1, ref sdtList);
List<OpenXmlElement> sdtList = InfoPathToWord.GetContentControl(
mainPart.Document, "multilinetext2");
InfoPathToWord.AddMultiLineText(multiLineText2, ref sdtList);
myDoc.Close();
msInternal.Close();
return ms.ToArray();
public static List<OpenXmlElement> GetContentControl(
Document doc, string name)
List<OpenXmlElement> list = new List<OpenXmlElement>();
List<SdtBlock> sdtList = doc.Descendants<SdtBlock>()
.Where(s => name.Contains(s.SdtProperties.GetFirstChild<SdtAlias>()
.Val.Value)).ToList();
if (sdtList.Count == 0)
List<SdtRun> sdtRunList = doc.Descendants<SdtRun>()
.Where(s => name.Contains(s.SdtProperties.GetFirstChild<SdtAlias>()
.Val.Value)).ToList();
foreach (SdtRun sdt in sdtRunList)
list.Add(sdt);
else
foreach (SdtBlock sdt in sdtList)
list.Add(sdt);
return list;
public static void AddMultiLineText(
string multiLineText, ref List<OpenXmlElement> sdtList)
string[] lines = multiLineText.Split(new char[] { '\n' });
if (sdtList.Count != 0)
foreach (OpenXmlElement sdt in sdtList)
for (int i = 0; i < lines.Length; i++)
Paragraph p =
sdt.GetFirstChild<SdtContentBlock>().GetFirstChild<Paragraph>(); //this ERRORS
if (i == 0)
InfoPathToWord.WriteText(lines[i], ref p);
else
Paragraph pNext = sdt.AppendChild((Paragraph)p.Clone());
InfoPathToWord.WriteText(lines[i], ref pNext);Additional Info: multiLineText1 and multiLineText2 are "Plain Text Content Control" in the word template used to create the word document.
-
Blank pages in generated Word document
I am using RoboHelp and I have created a document similar to
others that I have created. I generate printed documentation to
Microsoft Word, and it seems to have extra blank pages scattered
throughout the document. When I edit it with Word, I see these
Section Breaks that are in there. I have to delete those and then
re-format my page breaks to get it to work right. This is a real
pain to do especially if I have to make updates to the document
(which I know I will have to do). Any ideas as to why this is
happening all of a sudden? There is really nothing unusual about
this document but perhaps I am missing an option or something is
extra that shouldn't be there.
Thanks for any help!
EvelynI think a read through this should help. See also the
associated Print Issues topic.
Click
here. -
I have tried creating Printed Documentation with Word 2013 64-bit version installed and have gotten error messages. Is there a work around? Is this possible.
This one has been raised several times and it's the same answer still. A project might work with Word 2013 64 bit but if it doesn't then you have to take into account that Microsoft themselves recommend the 32 bit version for compatibility with other programs.
Is the 64 bit version offering you something that the 32 bit version does not?
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
Word Document generation using Perl programming on Windows Server 2003 R2
Hello,
Our application generates word document based on pre-defined template on Windows Server 2003 using Perl Scripting.
Configuration data is fetched from the database and document is populated based on the template. Sections in the document are identified using Bookmarks. We are facing a problem on Windows server 2003 R2. When I do a group update operation, i.e generation
of multiple word documents (using Word 2010) in a loop, one of the section of the word document shifts up and data gets overlapped.
When I use the same piece of code in windows 7 machine, the issue doesn't replicate.
Can anyone provide some pointers to look into this issue ?
Regards
Prashant Jain
software developerHi,
This forum is mailly talk about the product use related issue and not the best place to talk about the develop issue, for the develop issue we can post in MSDN forum for the further help.
MSDN forum
https://social.msdn.microsoft.com/Forums/en-US/home
Thanks for your understanding and support.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Creating pdf files from word document and allow copying of content
I generate word documents and then save them in PDF format before sending out to clients. Sometimes these documents contain quite a lot of data in table format and I want my clients to be able to copy the data from the tables and be able to paste it into excel. How do I save as PDF and still allow copying of content?
ThanksOpen such a PDF in Adobe Reader: File | Properties | tab Security. It will tell you if copying is allowed or not.
I don't know if you can change these security options from Word; you'll have to ask Microsoft. To change them after the PDF was created, you will need Acrobat. -
How to generate Word Dcoument using RH
Hello,
Could you please help me generating a word document using RH.
I am using RH version 5 and MS Word 2007. Will it be possible to generate word document. If so please let me know the steps.Welcome to the forum.
You can create printed documentation. The steps are on my site.
X5 will not work with Word 2007 though.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
Unable to Open the Word Document
Hi Experts,
I have a scenario to generate word document with the information comming from R/3 into bookmarks located in the document. This we are doing with WordML. We have uploaded WordML templates to server and at the run time we are getting the content from those templates replacing book marks with corresponding data comming from R/3.
Once we replace all those book marks and we are writing into another ".doc" file and opening the same ".doc" file in another window.
This functionality (opening document in another window) is working fine in my system (runnig with MicroSoft Word2003). Where as in another systems (runnig with MicroSoft Word2007) is not working, in that system it's opening new window and immediatly it's closing with out waiting to chose either "Open", "Save" or "Cancle" option from user.
Following is the code used for this purpose:
IWDCachedWebResource cachedWebResource=WDWebResource.getWebResource(inp,WDWebResourceType.DOC);
cachedWebResource.setResourceName("XXXXXXXXXX.doc");
wdComponentAPI.getWindowManager().createNonModalExternalWindow(cachedWebResource.getURL(),"XXXXXXX.doc").open();
NOTE: inp is the inputstream which contains the content that has to open in the final ocument.
Please help me out in where exactly it's causing the problem.
Thanks,
Udaya Dumpa.Hi Udaya Dumpa,
I am currently working on a project of my own where I would need to open different versions of Word documents using different version of office.
I am using the method cl_gui_frontend_services=>EXECUTE and just passing the location and file name to the parameter document.
I have tested this and so far have no problems. -
Generating reports in .doc format (Word Document) using Java POI - HWPF
Hi
Can anybody help me how to generate the report in .doc format using POI API?
Please share the sample code, if you have.
Thanks in Advance
DhilipHi,
I dont think that your requirement has to do with ADF capabilities.
You want to edit a word document with JAVA. For that reason, you will need an API, as the suggestions above.
You can do it without ADF and by using standard JAVA and the API of your choice. a static void main will do for that matter.
ADF comes into the game when you want to handle the document with your ADF application.
This means that you either want to get your new data to be placed on your doc from BC or any other DataControl or you want to do something else with ADF..
My guess is that you want to get data from ADF into your Doc.
You could create an API on handling your Doc and then use it into your ADF application.
Regards,
Dimitris.
Maybe you are looking for
-
Why wont new itunes allow me to search podcasts by date/list form anymore?
One of the best features of itunes podcasts is that you could search a key term and see all the individual podcasts related to it and then sort by date to select the newer ones. Now it appears with the new upgrade you can't do that, in fact you cann
-
MacBook HDMI connection problem after Snow Leopard Update
I recently upgraded my MacBook to Snow Leopard and discovered my HDMI set up no longer works after the upgrade. It has worked for the past two years with Leopard without any problems. Now when I plug in my HDMI the computer recognizes that the TV is
-
Search Complaints by Code/Codegruppe/Katalogkart @ item level in Web Ui
Hi All, I have a requirement to search complaints BUS2000120 in the Advance search screen BT120S_CPL by item code,codegruppe & katalogcart. So what i did - have added the fields in the search structure throgh an append & the fields are available on t
-
I have a plug-in I've tried to download from another website. For some reason it got stuck 'waiting' during installation. I want to get rid of it so I can try again, but I can't do anything.
-
I'm trying to understand why I get the error "1180: Call to a possibly undefined method navigateToURL." when I use the following code: