How to disable SAVE AS option while opening PDF in browser in OAF
Hi All,
We have created a page with MessageTextInput fields. All the datas are captured and export into PDF format. We have done this through XML publisher. PDF will be generated when we click on Generate button. PDF is getting opened in the IE browser.
The user should not save the PDF, so we need to disable the save as functionality of browser.
Thanks and Regards,
Myvizhi
On your Print window (CTRL+P '''''or''''' ''Firefox button > Print'' '''''or''''' ''File > Print''):
#be sure your correct printer is seclected
#be sure "Print to file" is '''''not''''' checked
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
Not related to your question, but...
You may need to update some plug-ins. Check your plug-ins and update as necessary:
*Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
*'''''Adobe Shockwave for Director Netscape plug-in''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
*Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
*Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
*Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]
Similar Messages
-
How to disable save as option in forefox when we right click on the image?
Hi Folks,
Can somebody help to disable save as option when i right click on the image which is showing in the browser.Hi,
'''sorry,it is impossible by code'''
you can use addons.
or
you can disable while developing webpage using:
<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
if(event.button==2)
alert(status);
return false;
</script>
Regards
'''Deepak Krishnan''' -
How to disable the select options button, while audio is playing in the question template in captivate 8?
Apologies for late reply.
I mean "On Question screens audio keeps on playing even after we have selected an option or options depending on the question type and clicked Submit. How do we stop the audio on selecting an option?" -
How to remove save, cancel option when end user runs the workbook in Portal
Hi,
how to remove save, cancel option when end user runs the workbook and make some small changes like using page items or increasing rows and columns
I already made 2 changes
1) I removed the option in Oracle Enterprise Manager under discoverer viewer of saving
2) I also removed the option of Allow saving changes made in Viewer when adding workbook to portal
But still the end user gets options of saving when made small changes to workbook like increasing rows and columns
Is their any place, I need to make changes?
Thanks in Advance
RowdheerDon't use JSP to serve a binary file. It almost implies the use of awful scriptlets and the invocation of both the response writer and the response outputstream which would only lead to IllegalStateException headaches in the server logs.
Use a Servlet instead. Specify the file name as request parameter and let the servlet read the file and write it to the outputstream of the response. -
i am opening pdf file in firefox browser in right side i am seeing print and download option
i want to disable it by program like javascript, by manualy i can disable it ,
actually i am opening pdf file in my website by using firefox browser so i do not want to any can download or print the pdf fileIf it's that critical, you could explore this partial workaround:
Use a script or configuration file on your server that changes the disposition based on the user agent. In other words, for Firefox, send an attachment disposition that forces a download outside the browser instead of the default (inline) disposition that allows Firefox to display the PDF in a tab.
Now... that won't stop the user from dragging and dropping the downloaded file on a Firefox tab to use the built-in PDF viewer, but most users would tend to open the file in their default viewer (e.g., stand-alone Adobe Reader). -
How to disable save button on selection screen (1000) run from other report
Hi Experts,
Can any one let me know how to disable save button on selection screen (1000) run from other report.
Say I am running from report R1 which submits report R2, but the save button should be disabled on
report R2(selection screen 100).
Thanks in advance.
Regards
RP.Hi RPReddy16 ,
Try this:
DATA :BEGIN OF t_extab occurs 0,
fcode like rsmpe-func,
END OF t_extab.
REFRESH T_EXTAB.
MOVE 'SAVE' TO T_EXTAB-FCODE.
APPEND T_EXTAB.
CLEAR T_EXTAB.
SET PF-STATUS 'STATUS' EXCLUDING T_EXTAB.
Regards,
José -
Interactive report - unable to disable save report option
Hi,
I am using an interactive report and unable to disable "Save Report" option... Although the option is unchecked under "Include in Actions Menu" section... Others' are working fine, I just can't disable "Save Report" option...
Thanks in advance...When you are logged in as both a Developer and End User, you will ALWAYS see the Save button, even if it is disabled. This is so that you can save the Defaults for an IR. Thus, if you click on the save option, you should only see one item - Save Report Defaults. You will not be able to save a custom report.
Your end-users are not logged in as developers, and thus, won't see any save icon at all. In fact - if you log out of APEX and run just your application, neither will you.
Thanks,
- Scott -
http://spendolini.blogspot.com
http://www.sumneva.com -
How to disable after mis call while showing reply by message in apple 4s
how to disable after mis call while showing reply by message in apple 4s
Please rephrase the question. This doesn't make much sense.
-
How to disable right click option re-size on table column header?
Hi All,
Please let us know how to disable right click option re-size on table column header.
The issue is that when I right click on the column header, the column is selected and the context menu with options like Sort, Columns, Resize Columns, etc.. is popping. we want to disable column re-size option.
We are binding the table values programatically (not using Bc4J) and the Jdeveloper version is 11.1.2.2
Thanks in advance,
- Vignesh S.Hi Gawish,
Thanks for the reply.
This will make the particular column frozen and only work for that particular column.
My use case is that to remove the resize columns option from the context menu or to disable the right click option.
Making column selection as none will disable the right click option but we need column selection for sorting.
Is there any other way to achieve this?
Thanks in advance,
-Vignesh S. -
Error while opening PDF in mail attachment
Hi All,
In smartform i am sending a mail with attachemnt as PDF file,there is one more option like preview of smartform .
issue is like i am able to see the preview of the same record but when it is sent in mail attachement,and while opening PDF its showing error that file can not be open it is corrupted.
Please help.
Mona Singh.Dear Sandra
That was my problem: binary data was incorrectly converted (often because of Unicode systems).
I returned
bin_filesize = v_len_in
bin_file = l_binfile
from the function module CONVERT_OTF, then converted the xstring data (l_binfile) into an internal table (t_objbin) to send to the mail send function with the following function module:
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_binfile
IMPORTING
output_length = v_lines_bin
TABLES
binary_tab = t_objbin.
Many thanks for your help.
Best regards
Patricia -
After Downloading, Error while opening PDF : PDF has no pages
After Downloading, Error while opening PDF : PDF has no pages
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = L_SPOOLNO
NO_DIALOG = SPACE
DST_DEVICE = MSTR_PRINT_PARMS-PDEST
IMPORTING
PDF_BYTECOUNT = MI_BYTECOUNT
TABLES
PDF = MTAB_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
Thanks in advance
Monika
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12.
Transfer the 132-long strings to 255-long strings
LOOP AT MTAB_PDF.
TRANSLATE MTAB_PDF USING '~'.
CONCATENATE WA_BUFFER MTAB_PDF INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
it_attach = WA_BUFFER.
APPEND it_attach.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
****GET THE FILE NAME TO STORE....................
v_path = 'C:\PD Form\' .
CONCATENATE v_path p_pernr-low '.pdf' into v_name.
create object v_guiobj.
call method v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
if v_uact = v_guiobj->action_cancel.
leave to current transaction.
endif.
..................................DOWNLOAD AS FILE....................
move v_fullpath to v_filename.
call function 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = MI_BYTECOUNT
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_ATTACH
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.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.My Generated Spool request is PDF Spool. It contains Adobe Forms data. To Download Adobe form
Spool (PDF Spool) into PDF format,
First,
A) Read PDF Spool data by using u2018FPCOMP_CREATE_PDF_FROM_SPOOLu2019 Function module.
B) Assign the Output Data to XSTRING format
C) Convert that XSTRING data to Binary Format using 'SCMS_XSTRING_TO_BINARY' Function module.
D) Save File on Application server using OPEN DATASET , TRANSFER , CLOSE DATASET.You can see your
downloaded file in Transaction AL11 in specified directory.
You can save your file on Presentation server also using GUI_DOWNLOAD.
First three steps are necessary if your spool is PDF Spool.
Basically we need this when we are downloading Adodbe forms ( which is not a SAPScript or smartforms)
Example :
DATA :
e_pdf1 TYPE fpcontent,
e_renderpagecount1 TYPE i.
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = l_spoolno
i_partnum = '1'
IMPORTING
e_pdf = e_pdf1
e_renderpagecount = e_renderpagecount1
* E_PDF_FILE = E_PDF_FILE1
* EXCEPTIONS
* ADS_ERROR = 1
* USAGE_ERROR = 2
* SYSTEM_ERROR = 3
* INTERNAL_ERROR = 4
* OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA : buffer TYPE xstring,
append_to_table TYPE c.
DATA : output_length TYPE i.
TYPES : BEGIN OF ty_binary,
binary_field(1000) TYPE c,
END OF ty_binary.
DATA : lt_binary TYPE TABLE OF ty_binary WITH HEADER LINE.
DATA : lv_xstring TYPE xstring.
lv_xstring = e_pdf1.
* Convert xstring to binary.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_xstring
append_to_table = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
binary_tab = lt_binary.
DATA : wa_binary LIKE lt_binary.
DATA: BEGIN OF itab OCCURS 0,
field(256),
END OF itab.
DATA: dsn(50000) VALUE '/usr/sap/tmp/',
length LIKE sy-tabix,
lengthn LIKE sy-tabix.
CONCATENATE '/usr/sap/tmp/' lv_pernr '.pdf' INTO dsn.
******* Save file on Application server
OPEN DATASET dsn FOR OUTPUT IN BINARY MODE.
LOOP AT lt_binary.
TRANSFER lt_binary-binary_field TO dsn.
ENDLOOP.
CLOSE DATASET dsn.
CLEAR lt_binary.
REFRESH lt_binary.
cheers -
Hi,
I'm trying to disable the open PDF in browser option in a corporate enviroment. The Adobe knowledge base said that this can be done by disabling the addon called 'Adobe PDF Reader'
I've set a policy to disable this addon, but the PDF still open in the browser. Any ideas?
Also is there a registry key to disable instead? We are using IE11 as a browser.
Thanks
DaveHello,
Please try the below reg.
[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\11.0\Originals]
“bBrowserIntegration”=dword:00000000
~Deepak -
InvalidPDFHeaderSignature Exception while opening pdf using itext jar
Hi,
I am getting InvalidPDFHeader while opening pdf file using itext jar.
How to overcome this?
Thanks,
VeeraPlease continue in your previous thread: Sample code to dynamically append bytes to pdf
Mod: I'm locking up. -
Getting error while opening pdf on server
Dear All,
I am working on jdeveloper 11.1.1.4.0.
I have a use case where on click of link , generating a dynamic pdf. The pdf i am arranging with the help of itext through backing bean. It is generating as well downloading the pdf.I have used filedownloadlistner to call the generate and download pdf methods.
On integrated weblogic server the pdf is working fine, but when i deploy on server while opening pdf getting error :
*"Adobe Reader could not open 'test.pdf' beacause it is either not a supported file type*
*or because the file has been damaged (for example, it was sent as an email attachment and*
*wasn't correctly decoded)."*
I am not able to get the root cause for the problem. The sample code to generate and download pdf is :
// Generate PDF
private void generatePDFFile(FacesContext facesContext,
java.io.OutputStream outputStream) {
try {
System.out.println("In Generate PDF................");
Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document, new FileOutputStream(FILE));
document.open();
addMetaData(document);
addTitlePage(document);
document.close();
System.out.println("End of PDF......................");
facesContext = facesContext.getCurrentInstance();
ServletContext context = (ServletContext)facesContext.getExternalContext().getContext();
System.out.println(context.getRealPath("/"));
String FILE = "test.pdf";
File file = new File(FILE);
FileInputStream fdownload;
//BufferedInputStream bis;
byte[] b;
System.out.println(file.getCanonicalPath());
System.out.println(file.getAbsolutePath());
fdownload = new FileInputStream(file);
int n;
while ((n = fdownload.available()) > 0) {
b = new byte[n];
int result = fdownload.read(b);
outputStream.write(b, 0, b.length);
if (result == -1)
break;
outputStream.flush();
} catch (Exception e) {
e.printStackTrace();
Download PDF
private void downloadPDF(FacesContext facesContext, java.io.OutputStream outputStream) {
try {
facesContext = facesContext.getCurrentInstance();
ServletContext context = (ServletContext)facesContext.getExternalContext().getContext();
ExternalContext ctx = facesContext.getExternalContext();
HttpServletResponse res = (HttpServletResponse)ctx.getResponse();
res.setContentType("application/pdf");
outputStream = res.getOutputStream();
System.out.println(context.getRealPath("/"));
File file = new File(FILE); // FILE = 'test.pdf'
FileInputStream fdownload;
// BufferedInputStream bis;
byte[] b;
fdownload = new FileInputStream(file);
//bis = new BufferedInputStream (new FileInputStream(file));
int n;
while ((n = fdownload.available()) > 0) {
b = new byte[n];
int result = fdownload.read(b);
//outputStream.write(b, 0, b.length);
outputStream.write(b, 0, b.length);
if (result == -1)
break;
outputStream.flush();
outputStream.close();
fdownload.close();
} catch (Exception e) {
e.printStackTrace();
Any help will be appreciated.
Thanks
KanikaIf the pdf file don't open on the server where you created them, they won't open on the client side either.
The code you are using should be refactored to use different file names for the generated files. In a multi user environment (which every web application is) you overwrite the file generated with each new request, even before the file is loaded by a client. This will corrupt the file a client is loading and you get the error you see.
Next I would look into org.apache.commons.io package (http://commons.apache.org/io/) which has utility classes which allows easy handling of streams without looping over the data.
Timo -
Error while Opening PDF attachment from Mail
Hi,
We two Output Types created ZNEU and ZAUF. Two Smartforms are created for the same Output Types. The Issue now is, When ZNEU triggers and send a mail the document is properly decoded and gets opened but for ZAUF it doesn't. It says File damaged.
This is the code we have used for sending mail.
CONSTANTS:
co_pdf(3) TYPE c VALUE 'PDF',
co_raw(3) TYPE c VALUE 'RAW'.
DATA:
it_objbin TYPE STANDARD TABLE OF solisti1,
wa_objbin TYPE solisti1.
DATA:
lv_filesize TYPE i.
DATA:
it_lines TYPE STANDARD TABLE OF tline.
DATA:
wa_mail_body TYPE solisti1,
wa_receipients TYPE somlreci1.
DATA:
document TYPE REF TO cl_document_bcs,
content TYPE solix_tab,
wa_content TYPE solix,
send_request TYPE REF TO cl_bcs,
sender TYPE REF TO if_sender_bcs,
recipient TYPE REF TO if_recipient_bcs,
requested_status TYPE REF TO bcs_rqst,
status_mail TYPE bcs_stml,
bcs_exception TYPE REF TO cx_bcs,
lv_rec TYPE adr6-smtp_addr.
DATA:
wa_attachx TYPE solix,
l_pdf_len TYPE i,
l_con_len TYPE i,
l_pdf_pos TYPE i,
l_con_pos TYPE i.
FIELD-SYMBOLS: <fs_con> TYPE x.
CLASS cl_cam_address_bcs DEFINITION LOAD.
CLASS cl_abap_char_utilities DEFINITION LOAD.
* Get the PDF version of the OTF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = job_output_info-otfdata
lines = it_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Convert the PDF format to the table type required for the attachment.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = it_lines
t_target_tab = it_objbin
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Convert the data which is in text to binary
l_con_pos = 0.
DESCRIBE FIELD wa_objbin LENGTH l_pdf_len IN BYTE MODE.
DESCRIBE FIELD wa_attachx LENGTH l_con_len IN BYTE MODE.
LOOP AT it_objbin INTO wa_objbin.
ASSIGN wa_objbin TO <fs_con> CASTING.
CHECK sy-subrc EQ 0.
DO l_pdf_len TIMES.
l_pdf_pos = sy-index - 1.
IF l_con_pos = l_con_len.
APPEND wa_attachx TO content.
FREE wa_attachx.
l_con_pos = 0.
ENDIF.
MOVE <fs_con>+l_pdf_pos(1) TO wa_attachx-line+l_con_pos(1).
ADD 1 TO l_con_pos.
ENDDO.
ENDLOOP.
IF l_con_pos > 0.
APPEND wa_attachx TO content.
ENDIF.
TRY .
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
* -------- create and set document with attachment ---------------
* create document from internal table with text
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = mail_body_tab
i_subject = email_subject ).
* add attachment to document
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = attachment_name
i_att_content_hex = content.
* add document to send request
CALL METHOD send_request->set_document( document ).
* Set sender
sender = cl_cam_address_bcs=>create_internet_address( sender_id ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
* Receipients
LOOP AT receipients_tab INTO wa_receipients .
lv_rec = wa_receipients-receiver.
recipient = cl_cam_address_bcs=>create_internet_address( lv_rec ).
* Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient.
ENDLOOP.
* Set that you don't need a Return Status E-mail
status_mail = 'N'.
CALL METHOD send_request->set_status_attributes
EXPORTING
i_requested_status = 'N'
i_status_mail = status_mail.
* set send immediately flag
send_request->set_send_immediately( 'X' ).
* Send document
CALL METHOD send_request->send( ).
* COMMIT WORK.
CATCH cx_bcs INTO bcs_exception.
RAISE EXCEPTION bcs_exception.
ENDTRY.
This is in a Class which is been used in the print program for both the Output Types.
Can somebody throw light upon this.
Note: I tried using
but it is not working properly.
Thanks,
Prashanth
Edited by: Prashanth KR on Jan 5, 2010 6:20 AMHi,
Please paste the part of code where you are getting error.
And if you are not clear about where the error is, try searching sdn or google with the error message that you are getting as this issue has been discussed many times earlier.
Check this link.
Error while opening PDF in mail attachment
Hope it helps.
Regards,
Raj
Maybe you are looking for
-
Login page error in the ISA b2b 5.0 application.
Hi all i deployed the CRM ISA b2b 5.0 application successfully in the j2ee engine and after that i have done the XCM configuration also successfully and i tested thru run test for both JCO and IPC components all are successful. now when i tried with
-
Can two different account work on the same project?
I work for a non-profit organization and we are think about switching platform for our website, we are looking in to Muse, our graphic designer already have a Adobe Muse account and we would like to get an other account for the organization, will it
-
I currently have an on-premise SQL server which I intend to migrate to Azure SQL database. We have a number of Word (2013) documents which pull data from the on-premise server and use for mail merge runs. However, I cannot seem to create a DataSource
-
How to allow user print their draft anwsers before sending it as final ?
How to allow user print their draft anwsers before sending it as final in a form central questionnaire ?
-
With holding tax base amount is not showing in miro screen
Dear All Whith holding tax amount is not showing in withholding tax tab after all posting also. but with holding tax posting is going on fine. in miro screen in withholding tax tab i am not getting this value correctly but it is showing 0 value. help