How to open the file in PDF format
Hello,
There is a requirement on our page that , on click of a button a procedure will be called. If that procedure returns “S” i.e success , then I need to open a new browser window and also set the url for the window (all programmatically). That url opens a letter in pdf format. If it is error , I should display the error on the page. Please provide any kind of solutions.
Where is PDF stored after generation? a blob or a location on unix server? or it gives u a byte stream at runtime?
Accordingly we can guide u with the solution.
--Mukul
Similar Messages
-
I have made a file using the Pages app.I mailed it to a friend.When she tried opening the same file on her pc at home , It did not open.Please help me as to how to open the file in the Microsoft word format on her pc.
Send it as a PDF.
-
How to open the file in gmail. As is keep indicate is not support. Previously I can easily open the excel or words sheets that send to my email but After download the Free Trial for Adobe Pro( Convert PDF file to Microsoft words. )
More information would be helpful, such as the file format and what the error message is in more detail.
-
How to send the output to PDF format in reports 6i?
Hi,
How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
Thanks
KavithaHello,
Do you get this problem only for DESFORMAT=PDF ?
Test with :
DESFORMAT = RTF, DESNAME = C:\x.rtf
or
DESFORMAT = HTMLCSS, DESNAME = C:\x.html
does it work ?
Check if DESNAME is modified in the reports itself.
Regards -
How to open the file types of iOSAPP(ipa),EPUBfile(.epub) in windows 7(32 bit)
iOS apps can be added to an iTunes library and thereafter transferred to an iOS device. They cannot be opened directly on a PC.
epub files can be added to an iTunes library, and thereafter transferred to an iOS device where they can be read with the iBooks application. Files protected with Apple's DRM cannot be opened directly on a PC, though there are programs such as Kindle and Calibre that will open non-protected epub files.
tt2 -
How to display the data in PDF format : problem is splitting into 2 lines
Hi ,
I developed one report which downloads the data into PDF format and saved in C drive but my problem is
in my program : Line size of the report is 255 in PDF it is splitting into 2 lines. it has to show in a single line. how to do it. how to reduce the width of the output? i am sending my code below. anybody can suggest me how to do it. if possible please send me the code.
my code:
report zmaheedhar.
maheedhar-start
TABLES : vbak.
parameters : p_vbeln type vbak-vbeln.
data : begin of itab occurs 0,
vbeln type vbak-vbeln,
ERDAT type vbak-erdat,
ERZET type vbak-erzet,
ERNAM type vbak-ernam,
ANGDT type vbak-angdt,
BNDDT type vbak-bnddt,
AUDAT type vbak-audat,
VBTYP type vbak-vbtyp,
TRVOG type vbak-trvog,
AUART type vbak-auart,
AUGRU type vbak-augru,
GWLDT type vbak-gwldt,
SUBMI type vbak-submi,
LIFSK type vbak-lifsk,
FAKSK type vbak-faksk,
NETWR type vbak-netwr,
WAERK type vbak-waerk,
VKORG type vbak-vkorg,
end of itab.
maheedhar-end
DATA: pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
rows TYPE pri_params-linsz.
DATA: val(1), val1(1).
*---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
DATA: name TYPE pri_params-plist VALUE 'Testing'.
DATA: i_pdf TYPE STANDARD TABLE OF tline.
DATA: spono TYPE tsp01-rqident.
maheedhar-start
top-of-page.
write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
'Date','Document Date','SD document category','Transaction group','Sales Document Type',
'Order reason'.
start-OF-SELECTION.
select vbeln ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
VBTYP TRVOG AUART AUGRU GWLDT SUBMI LIFSK
FAKSK NETWR WAERK VKORG from vbak
into table itab
where vbeln = p_vbeln.
maheedhar-end
--- Retreive local printer details
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = dest
no_dialog = 'X'
immediately = ' '
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-- Set Spool printer details w.r.t local printer
pripar-prdsn = 'DSN'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = arcpar
in_parameters = pripar
no_dialog = 'X'
list_name = name
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
NEW-PAGE PRINT ON
NEW-SECTION
PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
NO DIALOG.
ELSE.
WRITE:/ 'Unable to create spool'.
ENDIF.
*--- Output statements
*WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
*WRITE:/ 'Second Line'.
LOOP at itab.
write: itab-vbeln,
itab-ERDAT,
itab-ERZET,
itab-ERNAM,
itab-ANGDT,
itab-BNDDT,
itab-AUDAT,
itab-VBTYP.
ENDLOOP.
"---> Close spool
NEW-PAGE PRINT OFF.
spono = sy-spono.
Convert ABAP Spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spono
no_dialog = 'X'
TABLES
pdf = i_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Download PDF contents to presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\test.pdf'
filetype = 'BIN'
TABLES
data_tab = i_pdf
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
thanks,
maheedharhi tripat,
actual problem is what u said it is decreased the wiidht of the output.
now the output is:
Sales Document C Date Entry time Created By Quotation date Date Document Date
SD document category Transaction group Sales Document Type Order reason
62741 07/29/1996 11:54:38 DARLENE 00/00/0000 00/00/0000 07/29/1996 C
actual output is:
output should come in a single line. it is splitting into 2 lines.
thanks,
maheedhar -
Problem in response.setContentType want to open the file ms-access format
my question is :---Is it possible to open output of a jsp file in ms access format?
i m using response.setContentType("application.vnd.ms-access");but while saving this file ,the extension is jsp format not in mdb extension ...
but if i use response.setContentType("application.vnd.ms-excel") or response.setContentType("application.vnd.ms-word") or response.setContentType("application.vnd.ms-powerpoint ")..the file extension is changing and opens according to htier type defined in code..
is there any other solution open in ms-access format.?
please give the soution if any expert knows (urgent)
thanks in advance..
note:i ahve already asked this question before .but i didnt got the answer....I am not 100% sure on this but I think it means the browser will try and open the file, I tested it with an xml file and using inline opens the xml in the browser window. I just looked at something I wrote more recently and I used the attachment option as this forces a 'save or open' dialog box.
response.setContentType("text/" + contentType);
response.addHeader("Content-Disposition", "attachment;filename=catalogue_download" + versionID + "." + contentType); -
How to open the file writer for next entry after stream is close?
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class TryOut {
public static void main(String args[]) throws IOException{
int inputQuestionnAireNum = 0;
int inputPostCode = 0;
int inputGender = 0;
int inputAge = 0;
int x=0;
Scanner input = new Scanner(System.in);
FileWriter fwrite = new FileWriter("tryout.txt", true);
BufferedWriter out = new BufferedWriter(fwrite);
boolean invalidNum = false;
do{
System.out.print("1 new entry or 0 print");
x = Integer.parseInt(input.nextLine());
if(x == 1)
//Questionnaire Number
System.out.print("Enter Questionnaire Number [ ] ");
inputQuestionnAireNum = Integer.parseInt(input.nextLine());
out.write("NumBER OF Q: "+inputQuestionnAireNum+", ");
//Postal code
System.out.print("Enter Postal Code [ ] ");
inputPostCode = Integer.parseInt(input.nextLine());
out.write("PostCode: "+inputPostCode+", ");
//Age
System.out.print("Enter Age [ ] ");
inputAge = Integer.parseInt(input.nextLine());
out.write("Age: "+inputAge+", ");
//Gender
System.out.print("Enter Gender '1' for Male and '2' for for female [ ] ");
inputGender = Integer.parseInt(input.nextLine());
out.write("Gender: "+inputGender+", \n");
out.close();
} while(x != 0);
Result:
1 new entry or 0 print1
Enter Questionnaire Number [ ] 2
Enter Postal Code [ ] 1
Enter Age [ ] 3
Enter Gender '1' for Male and '2' for for female [ ] 4
1 new entry or 0 print1
Enter Questionnaire Number [ ] 2
Exception in thread "main" java.io.IOException: Stream closed
at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:98)
at java.io.BufferedWriter.write(BufferedWriter.java:203)
at java.io.Writer.write(Writer.java:126)
at TryOut.main(TryOut.java:31)
Hi, how can i open the file writer stream again for next entry after it is has been closed? if i do not close(); all my entry will not be recorded to the text file. how can i solve this ?
Edited by: metaroot on Feb 18, 2008 6:39 PMThe short answer to your question: use out=new BufferedWriter(fwrite) inside the do loop as well.The only difference that would make would be to make the problem worse. It is poor practice. Stream stacks should be constructed once for the life of the stream.
What he needs to do is close his stream outside the loop, possibly calling flush() where he presently has close().
The more relevant answer is: Why are you not wrapping the user-friendly PrintWriter class, wrapping it around the BufferedWriter?Possibly because he doesn't like the fact that PrintWriter swallows exceptions? which makes it less user-friendly IMO.
The println and print methods are very useful, and do not need closing between loop iterations.Neither does anything else.
By the way,you say that without a close() the BufferedWriter doesn't output to the file.I don't know: I never used/tried it.Even if it doesn't, it will surely output after you come out of the loop.If you don't want to use a PrintWriter, why don't you investigate this?Posting guesses here isn' t really much help, especially about something you've never used. A BufferedWriter has a buffer and it doesn't write anything until the buffer is full, you flush it, or your close it. -
How to open the file in a tree control
I use a tree control to list all files in a selected directory, I checked the sample with LV (Directory hierarchy in tree control.vi) and want to add a function like following:
Atfer listing all files, if I click a file listed in the tree control, the computer can open the file automaticly.Hi,
you can use the "Open URL in Default Browser.vi" to open all the files you select in your tree.
Mike
Attachments:
Directory Hierarchy in Tree Control_LV85.vi 35 KB -
Urgent!!how to open the file download dialog box????
Hi all,
i'm using the browse button for the user to select the file
and a submit button, which when cliked should open the file
download dialog box asking for open or save.
i searched for so many forums and websites and didn't get the
solution yet.
i'm using jsp.
anyone have the jsp code for the same????
will b more helpful if u send it to me.
thanx in advance.Hi
Use the Filedialog class.
Let your button call a method wich contains the following Java code:
FileDialog filedialog =
new FileDialog( Frame1.this, "Open a File", FileDialog.LOAD );
//witch calls this constructor: public FileDialog(Frame parent, String title, int mode)
//use Filedialog.SAVE to save a file.
filedialog.show();
String filename = filedialog.getFile();//to display the name of the file
String directoryname = filedialog.getDirectory();// to display the directory name -
How to send the mial with pdf format file
Hi,
I would like to write a program, I have an external file in D drive with PDF format, So i have to attact that file and send to particual user... If any body know pls send with sample code to [email protected]
Thanks in advance...
GopalUse FM
<b>'CONVERT_ABAPSPOOLJOB_2_PDF'</b>
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = SPOOL_NR
IMPORTING
PDF_BYTECOUNT = FILESIZE
TABLES
PDF = PDF_OUTPUT. -
I understand how to convert a file to PDF format, but not how to then send it as an attachment
How to you retrieve and attach a file which has been converted to PDF format to an email?
I don't really understand your question since you don't say whether you are trying to send to or from iPad. However on the assumption that you want to send from iPad, if you have Pages on your iPad then you can just go to the "My Documents" screen of Pages and then choose the leftmost icon at the bottom that has an arrow out of it, then choose email document and select whether you want to email it as a pdf, word or pages document.
-
How to open a file (*.html,*.pdf) in new browser using servlet
Dear Friends,
I am having some files (*.html,*.pdf) in local drive , im getting the path whichy includes dir name + file dynamically, im using the following code
response.sendRedirect(response.encodeRedirectURL(file))
this is displaying the file in same window, now i want open in new window is there any method except java script like window.open("URL");
Thanks in advance....
ThangavelHi Balu !
Thanks for u r reply ,
this is html code ok
<a onclick="view()" >View </a>
im callinig view function in java script
function view()
window.document.formname.submit()
so it will submit the action URL which given in form ok
filename contains full path ok
in server side im sending as i told previously encoderURL(file) ok
but im given target="_blank" as per ur suggestion in anger tag like
<a target="_balnk" onclick="view()" >View </a> tag
it is opening in new window the content which is displaying in jsp but not file
pls give ur valueable suggestion .....
Thanks in advance...
Thangavel -
How to open .mov files in m2v1 format?
I have a number of video files in the following format:
'm2v1', 720 x 576 (1024 x 576), Millions
16-bit Integer (Little Endian), Left, 48.000 kHz
16-bit Integer (Little Endian), Right, 48.000 kHz
I have Quicktime 7with the Mpeg-2 component (£15 extra of course) installed as well as Mpeg Streamclip and Perian. I still cannot open these files.
When I try to open them then I get a blank screen but with the audio alone.
I don't know the source camera for this footage but its driving me bananas thinking I've got a solution and then finding that I am no further forward.
I have googled and read through this forum but cannot find any comparable problem or solution.You need to re-Google as this is in these forums and suggests Streamclip works for the issue. I think if not you will face iMovie issues as an alternative since iMovie depends on this type of file to be on board the camera with the data files used by iMovie to interpret the content intact, e.g. from the finder the file alone will not import (or apparently play).
There is a lot in Google about this format one solution being a hex eidtor to change two instances of M2V1 in the file to another (IIRC MP2V).
From prior posts here: +M2V1 is the FourCC for your raw MPEG2/AC3 files on the camcorder. These files are not edit compatible since they contain I-, P-, and B-frames in a GOP (group of pictures) structure. In order to edit the content, iMovie '08 transforms the files as part of the import process. Basically the content is demultiplexed, the video frames are decoded and the and saved as all I-frames in an MOV file container. Since this essentially turns the MPEG-2 content into Motion-JPEG, the video can now be edited. At the same time, the audio data is also demultiplexed and the individual left and right audio channels are transcoded to individual AIFF (linear PCM audio using "Big Endian" byte order) and stored in the same MOV file container along with the transformed video. A time code track and start and/or end data offsets are then added to minimize possible audio-video drift in the final MOV file.+
+I suspect your problem is that your Mac Pro recognizes the modified files and can play/process the data using the iMovie '08 installed support while your MacBook Pro does not have this support and relying on the original M2V1 FourCC, is trying to decode the video using the QT MPEG-2 Playback component instead. Since this component apparently will not handle the modified video, all you get is the audio which is "natively" compatible with the base QT structure.+
+If true, then you have two options. The first is to copy the raw camcorder files to your MacBook Pro and convert them manually to whatever compression format you want using the QT MPEG-2 Playback component you already have together with MPEG Streamclip as suggested by David or you can install iMovie '08 or the missing component(s) to your MacBook Pro to make it compatible with your "iMovie '08 converted" MOV files+ -
How to open the dashboard in PDF, by default is is open in HTML.
HI ,
When you run any report in dashboard , it's open in HTML , how do we open that whole dashboard in pdf format.
Any solutions on it.
Thanks,
Malli.HI,
My dash board is integrated with sebel. they have configured one button . when they click on that button our dashboard should open in pdf by default, not in html.
Any help on this.
Thanks,
Malli
Maybe you are looking for
-
Hello Guyz I have basic question on setting up Pricing. I have three condition types, PR00(price), ZK04 (Discount) and ZTKK (Tax). I went to set procedure as PR00 = $4 ZK04 = $2 Net price = $2 ZTKK = $3 Final Price = $5. How do I maintain
-
I posted this question last year when I had a big iMovie Project. The big project has returned and I have not worked with iMovie since. I did get a couple of answers to my question. I could not understand the answer, so I am re-posting. I did underst
-
Will adding a custom assembly to SQL Server void the Microsoft Support contract
I've been thinking about extending the capabilities of the SQL Servers that house our System Center databases to add in additional simple functions that could be used in a lot of reports. My question is, would importing a custom assembly void the war
-
Can anyone tell me what Joe is using below to get that transition in the beginning of the following clip below: (Its @ 7 seconds) http://www.joe-shaw.co.uk/ it looks like light rays but each ray looks more thick in his video
-
Dashboard widget to open PDF in ibook
I am in the beginning process of creating an iBook with iBook Author and need a bit of help if this is even possible. I need to make a dashboard widget using Dashcode that will download a PDF within the widget itself and have it open in iBooks. I hav