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.
Similar Messages
-
Generate PDF documents from a template
We need a solution for the following scenario soon.
We need to create documents off of a template. The template is a pdf document with place holders in the text
For example: Assuming that the following is the text in the template I am talking about
Lorem ipsum dolor sit amet, $FIRSTNAME consectetur adipiscing elit. Sed risus orci, consectetur at malesuada euismod, $LASTNAME hendrerit ut turpis. Donec ullamcorper egestas condimentum. Ut eu nisi lacus.
We will create documents off of the above template by replacing $FIRSTNAME and $LASTNAME. The text needs to adjust as needed. In short, we don't want to use fixed fields for the text to be replaced.
Can this be done? How?You will need to use form fields. You may be able to use adjustible size form fields in Designer. You might try to ask in the Designer forum for help.
-
Generate Pages document from Numbers Data
Hi,
I would like to know if it is possible to do so :
On a iWork Number document, for a specific line, can I launch a script that will generate a Pages document from a template, filling custom placeholders with data (strings and numbers) taken from this line (of the Number document).
I'm pretty ok with script programming, so.. hurt me plenty
Thanks in advanceBarry wrote:
Sounds like Mail Merge to me.
thanks a lot, I have been looking to this, but as I have to generate a lot of Pages document, I was wondering if maybe there was a way to launch a script directly from numbers, by pressing an action button on each line I want to "export"... -
Generating a report from RTF template using WSDL from ADF
Hi,
I am a newbie to ADF-BIP integration.
I am using the wsdl http://<<ip>>:<<port>>/xmlpserver/services/PublicReportService?WSDL for generating a report from RTF Template in ADF.
We are using Oracle Business Intelligence Publisher Release 11g (11.1.1) and JDeveloper 11g (11.1.1.5.0).
I have a couple of merge variables in my RTF template and I am passing these variable using Report Request parameters.
below is code I added for creating the report request.
First I created publicReportService using webservice proxy.
public static ReportRequest getReportRequestFromBIPWithTemplate(String reportFolderOnBIP,
String reportName,
String outputFileFormat,
String template,
HashMap params) {
String reportAbsolutePath = reportFolderOnBIP + "/" + reportName + ".xdo";
ReportRequest repRequest = new ReportRequest();
System.out.println("report path: " + reportAbsolutePath);
repRequest.setReportAbsolutePath(reportAbsolutePath);
repRequest.setAttributeTemplate(template);
repRequest.setAttributeFormat(outputFileFormat);
repRequest.setAttributeLocale("en-US");
repRequest.setSizeOfDataChunkDownload(-1);
System.out.println(params.size());
ParamNameValue[] paramNameValue = new ParamNameValue[params.size()];
ArrayOfParamNameValue arrayOfparamNameValue = new ArrayOfParamNameValue();
Set set = params.entrySet();
Iterator iter = set.iterator();
int i = 0;
while (iter.hasNext()) {
Map.Entry me = (Map.Entry)iter.next();
System.out.println(i + "--->>>" + me.getKey() + " : " + me.getValue());
paramNameValue[i] = new ParamNameValue();
paramNameValue.setMultiValuesAllowed(false);
ArrayOfString values = new ArrayOfString();
if (me.getValue() == null) {
values.getItem().add("");
} else {
values.getItem().add((me.getValue()).toString());
paramNameValue[i].setValues(values);
paramNameValue[i].setName((me.getKey()).toString());
arrayOfparamNameValue.getItem().add(paramNameValue[i]);
i++;
repRequest.setParameterNameValues(arrayOfparamNameValue);
return repRequest;
I generated report response bytes using below code
{code:java}
repRes = publicReportService.runReport(repReq,userID,password);
reportStream = repRes.getReportBytes();I could see the generated PDF but the supplied variables are NOT reflected in place of merge variables.
Ex: In template
Welcome, <<merge variable, userName>>
{code}
Generated PDF should have
{code:java}
Welcome, Hello World
{code}
Instead of the above I am getting
{code:java}
Welcome,
{code}
I am looking for a suggestion, Please help me in this regard.
Thanks,
Satya
Edited by: 921138 on May 30, 2012 11:11 PMPlease let me know if any one has update for this.
Thanks in advance,
Satya -
How do you open a new document from the template chooser?
Hi There,
Since upgrading to Yosemite, I can't find the option to open a new document from the template chooser. When I type in "template" in the help box it shows it under "file" But when I click on "File" I don't see that option.
Basically, I'm trying to ask how do you access the templates in the new pages?
Thanks so muchCheck your preferences and make sure Show Template Chooser is selected:
Then just choose New from the File menu. -
Urgetnt:Generate XML Document from Oracle Tables.
Environment is :9i Release 2
Requirement : Generate XML document from the data which is vailable in Oracle tables at client location.
Could some body help me on how to get ahead on this.
Thanks in advance,
Kumar.Implimentation in PowerBuilder7(Source is experimental.. need optimization):
kml_store = create datastore
selectblob kml into :kml_result from (select get_kml(:querry_type,:tmp_querry_value,1) as kml from dual) using sqlca;
if sqlca.sqlcode=100 then
MessageBox("INFO","No data found");
return false;
end if
if sqlca.sqlcode = -1 then
MessageBox("INFO","Error in generating KMl file");
return false
end if
li_FileNum = FileOpen("test.kml",StreamMode!, Write!, LockWrite!, Replace!);
b_len=Len(kml_result)
b_len=64244;
/*inserting in file :)*/
DO WHILE b_pos<=b_len
s_pipe=String(BlobMid(kml_result,b_pos,i_str_len))
ret = FileWrite(li_FileNum,s_pipe);
s_pipe="";
b_pos=b_pos+i_str_len;
LOOP
FileClose(li_FileNum);
Message was edited by:
user601564 -
Generate PDF documents from Oracle PL/SQL
Hi All,
we are working on a PL/SQL project, named PL/PDF, for generate PDF documents from Oracle PL/SQL language. We are looking for PL/SQL programmers for beta testing. If you are an enquirer in this topic, please send an email to [email protected]
Thanks,
LLYou will need to use form fields. You may be able to use adjustible size form fields in Designer. You might try to ask in the Designer forum for help.
-
How to remove an auto generated ActionPreformed Event from Netbeans?
Hi,
How do I remove an auto generated ActionPreformed Event from my code? I accidentally created one and want to remove it. I tried to right click on the event and refactor/delete all the dependencies in the source but it wouldn't let me remove it. There shouldn't be any DEPENDENCIES it was just created.
Thanks,
V$H3rNetBeans | Help | Help Contents | Java Applications | Building Java GUIs | Designing Java GUIs | Managing Component Events | Removing Event Handlers:
1. In the Inspector window, select the component whose event handler you want to remove.
2. Click the Events button at the top of the Properties window.
3. Select the event in the property sheet and click the ellipsis (...) button to display the Handlers dialog box. Alternately, you can simply delete the name of the handler you want to remove in the Properties window.
4. In the Handlers dialog box, select the handler to remove from the list and click Remove.
When you remove an event handler, the corresponding code block is also deleted. If more than one handler uses the same name and same block of code, deleting a single reference to the code does not delete the code itself. Only deleting all references will delete the corresponding code block, and a confirmation dialog box is displayed first. -
EWA - Auto Generate Word Report
Dear all,
When the EWA report create each week, we need click the "word" icon to generate word report.
Is it possible to auto generate EWA word report ?
Best Regards,
WuHello,
It seems like your system is already setup to generate the report automaticallly. Usually when you have the 'Word' icon, it means the report has been generated correctly. By clicking on that icon, you are just opening the report.
If you want to have the report or solution to automatically forward to your email address, please navigate to the link below for the PDF activation file. This will provide youwith the steps required to setup the automatic emailing of the report.
http://service.sap.com/~sapidb/011000358700001873212008E
Regards,
Jared -
Generating TEXT output from RTF template/reports
Hi ,
We have been working with XML Publisher for a long time now.. and we have come across some requirements such as
1. Page break in TXT report output
2. Page Headers after every 'X' lines in TEXT output.
This was easily achieved with RTF template and PDF/HTML/RTF output, but not with TEXT output in eTEXT template.
So we started looking into two approaches
1. Generate TXT from PDF/RTF/HTML output(generated from RTF template), though it will addon to the time, but we are looking for this approach. We are looking for some JAVA api's which can help us to extract text from PDF/HTML/RTF while preserving the format.
2. Pass the TXT generated by eTEXT template to our custom util , which will split the report in diff. pages.This will get complex as we recieve more and more reports.
We have also tried hacking the RTF parser used in XML P so as to get a TXT output or using XSL-FO objects in eTEXT parser, but we could not get anything of our help.
Does anyone have any pointers in this.
regards
GauravYou can burst with eText and I have done it
successfully.
I don't believe pagebreaks are an option in eText and
I don't think it makes sense either since your
generating a flat-file and not a customer or internal
facing document. Does that make sense?
Also, if you would like you can use the
BIPublisherIDE, this code can be converted pretty
easily to handle jcp. There is a an oa framework
version I have developed but I haven't posted on my
blog yet. I plan on adding a bolt on for java
concurrent programs soon. it's really pretty simple
just haven't had the time.
http://bipublisher.blogspot.com/2008/03/bi-publisher-b
ipublisheride.html
Ike Wiggins
http://bipublisher.blogspot.com
Thanks Ike for your reply.
I agree with your points on TXT files, but in our case,the reports are generated in TXT format for the customer so we are looking for the above mentioned features.
I have gone through BIP IDE and its a wonderful small utility which eases the task of BIP development.
As I mentioned in my original post that we are currently processing the generated TXT report using a custom util. in JAVA to get the desired output in TXT again.
I assume thats not what a JCP would do,so I am looking to explore that too.
As I understand the process for report generation is
1. Generate XSL from eTEXT template.
2. Get the XML data from DB using XDO
3. Apply XSL on XML to get the required template.
If we are looking to achieve some customizations then we need to have the XSL generated with those customizations.
In this case, where do we plug in the JCP to alter XSL or am I missing something.
regards
Gaurav -
Auto generated service PR from maint, order
Dear Experts,
As you know while processing external services using control key PM03, a service PR will be generated for the service selected from the agreement or contract & from there we will create PO.
Here in my case while creating PO from auto generated PR it is not carrying the condition type ( Discount entered the contract).Instead of that it gives the option to enter the condition type in the drop down list.Then we can select the condition type as discount & process the order.
where as for the same service from the same agreement,if we create the PO from the manually created PR (not the auto generated from maintenance order) it carries the condition type of agreement (discount) to PO & the discounted price will be displayed automatically.
Why it is not happening to auto generated PR? is there any particular settings are available? is there any notes available?
Please help me out to come out of this problem.
Thanks & best regards,
PraveenDear,
I am extremely sorry for this issue. there was some problem with the program & rectified the same.
Thanks & Best regards,
Praveen -
Generate More Documents From FB01
Good Morning,
I Want to generate in automatic from FB01 more documents when i register a single document accounting.
My Problem is generate another document for a single Profit Center in automatic.
Anyone can help me?
ThanksDear Stefano,
It may be possible to achieve your goal if you create an account assignment to the particular profict center for the Cost Element/GL Account you are posting to in transaction OBO8. In this way when ever you make a posting to the GL Account/Cost Element a posting to the Profit center will also take place. This can also include cost center and internal order and can be statistical posting.
Please review transaction OB08 and view the F1 help for further information.
I hope this helps and I wish you the best of luck in your endeavours.
Kind Regards,
Brendan -
Footer content only on the second page of output document from rtf template
I have a requirement for which my output document should contain signature section (possibly footer ) that needs to be only in second page of output document. As you see in the template has xml data that gets passed and the length of the document is based on amount of data that gets passed. Irrespective of the length of the document. Only and Only on second page of the output I should see the signature section. I am not able to use native Word session break etc.
Is there a way to use XDO api etc to accomplish this ?probably a difference in height between the 2 columns of the left and of the right (check paragraph and character formats, cell margins, borders, etc.)
-
Generate MSDS document from another system
Dear All,
We have one EHS system (HQ) with all the report templates & variants for MSDS document in place.
Now we're going to implement roll out EHS in another server (country).
The MSDS report must be control and same with the one in the HQ.
But we don't want to manually maintain the report template & variant in the country server but read it from the HQ system instead.
Is it possible to do this?
Or any better idea to achieve this?
Thanks.Hello Peer
assuming you would like to use system B to use "report shipping" functionalities you need to consider these topics:
1:) first you must distribute your substance (REAL_SUB) using SUBMAS (ALE)
2.) second you must distribute PHRASMAS (ALE) (you need phrases to prepare accompanying leter)
3.) You must distribute the materials from REAL_SUB to B
4.) you must distribute the Business partner information from A to B
5.) You must link WWI servers on system B
6.) You must make available corresponding GENVARs manually ! (if you do not change the number of GENVARs this need ot be done only once) and you must prepare report symbols (chapter 1 !)
7.) You must prepare the "accompanying" letter in system B
PLease refer to SAP EHS documentation (how to perform ALE transfer)
As explained: it is very important and critical that the EHS customizing of A and B must be the same and you need a DMS/DVS or Archive in system, B as well !
Furthermore you must prepare the whole EHS customizing to do the report shipping topic; schedule jobs (report shipping) , assign printers etc. etc. prepare access concepts (so that e.g. cg50/cg54 can be used)
If you have performed the necessary set up in most cases keep this in mind: you must actively mark a substance (REAL_SUB) as ALE relevant. There is to my knowledge no automatism. Therefore if new REAL_SUBs are generated with materials having MSDS which need to be distributed from system A to B then you must perform this activity manually.
In any case: the set up described above is possible and stable. You can use the ALE( there are some Exits there) to make sure that only MSDS which are valid in e.g. FR must be distributed and not all MSDS etc.
With best regards
C.B.
Edited by: Christoph Bergemann on Sep 15, 2011 4:47 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:47 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:48 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:48 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:49 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:49 PM
Edited by: Christoph Bergemann on Sep 15, 2011 4:50 PM -
Auto-generated links exported from InDesign do not work in tablet apps
Hyperlinks automatically detected and exported from InDesign CS6 8.0.1 as a PDF work fine on the desktop version of Acrobat Reader. However, on the iPad version of Adobe Reader as well as iBooks and GoodReader, these links are completely ignored, meaning they are just text.
On the other hand, if I was to manually set the hyperlink in InDesign or Acrobat, the link works fine.
It would be extremely tedious and time consuming to manually reset hundreds of hyperlinks in my documents since InDesign use to handle this correctly.
Is this a bug? If so, it's pretty serious and should be Adobe's priority to fix since millions of people read documents on tablet devices.No, it's a Feature of Acrobat and reader that they attempt to create links from anything that "looks like" a URL. Other readers lack the feature.
It's not good practice to depend on this in any case as it's hardly foolproof even in Acrobat. Links that break across lines, for example, will not be properly recognized.
Maybe you are looking for
-
With filter values iam not able to see out put of a web report
Hi, I had a web report. for the webreport,data provider is Query. My requirement is to change the description of calculated KF. I have changed the description of Calculated KF in Query and transported it to Quality system. But when i execute the Web
-
Hallo Sapians I have created two Scheduling agreements with one vendor.But while creating Inbond delievery only one line item is adopted & message came that two inbond delieveries are created. What to do
-
Can I create a still photo montage in one frame with imovie 08?
I want to cut a part of several single frames in imovie, and paste each of them in one single frame in imovie, or iphoto, so that I can print a single photo montage of all the cut images. Is this possible in imovie 08 and iphoto, and if not, does any
-
Wrong locations using Map to Geocache
I have recently noted that when I put in the coordinates in Map to Geocache using Latitude and Longitude that it does not put the locations where it should be. For example: I am in upstate NY in the Adirondacks. When I put the coordinates in for a Ge
-
I'm having trouble with the server2server scripts...
I'm trying to call getRoomInfo from python but it throws an exception. My code looks something like: account = "%s/%s" % (lccsSettings.HOST, lccsSettings.ACCOUNT) am = accountmanager(account) am.login(lccsSettings.USER, lccsSettings.PASSWORD) am.getR