PDF binary sent to server each roundtrip?!
Hi all,
I'm on NW CE 7.11, integrating WDJ with SIFbA.
I would really appreciate some help on the following problem:
in my application we have 2 views, accessed in sequence by users.
View 1 displays ("usepdf" mode) a PDF retrieved from db.
View 2 allows users to perform search on backend and so on.
The problem is that at each server roundtrip the binary is sent to the server, even when View 1 is no longer visible.
As a consequence, when in view 2 a very simple interaction has to take place, the whole binary from view 1 is sent to the server as well.
This is a major performance issue with large binaries (~1mb).
I would like to tell the framework to send the PDF to server only when really necessary
How can this be done?
Thanks regards
Vincenzo
Hi Vincenzo,
If you haven't tried it already you can use the setting "Allow Form Rendering to be Cached on Server". This is found on the form properties on the Performance tab. This will improve performance as the form does not need to be rendered for each round trip, however I don't believe that it prevent the round trip altogether. You may want to post this on the WDJ forum as well.
Let us know how you go.
Regards,
Ben.
Similar Messages
-
Save the report in PDF format on the server: is it possible?
Hi all,
Is it possible to save the report in PDF format on the server?
In other words, in a web application:
1) the user requests a report
2) the report produced in PDF format, is saved on the server, where is the Java Reporting Component
3) the report, in PDF format, is sent to the client's user
Thanks a lotPrintOutputController.export, get the byte stream, save on server.
Sincerely,
Ted Ueda -
Read PDF Formatted Spool and write PDF File to Application Server
Hi Experts,
After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
PARAMETERS : p_spono LIKE tsp01-rqident.
DATA: pdf_data type FPCONTENT.
types: lt_pdf_table(1000) type x.
data: l_pdf_data type standard table of lt_pdf_table,
l_pdf_line type lt_pdf_table,
l_offset type i,
l_len type i,
p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
*Read the spool content
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = p_spono
i_partnum = '1'
IMPORTING
e_pdf = pdf_data
* e_pdf_file = file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
* Modify the spool contents to prepare internal table
l_len = xstrlen( pdf_data ).
while l_len >= 1000.
l_pdf_line = pdf_data+l_offset(1000).
append l_pdf_line to l_pdf_data.
add 1000 to l_offset.
subtract 1000 from l_len.
endwhile.
if l_len > 0.
l_pdf_line = pdf_data+l_offset(l_len).
append l_pdf_line to l_pdf_data.
endif.
* GUI DOWNLOAD Works Fine
* Now pdf contents is ready , lets store in local PC
*CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
* filename = 'C:\Documents and Settings\Desktop\shital.pdf'
* filetype = 'BIN'
* TABLES
* data_tab = l_pdf_data.
OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error opening file:'(Z03) p_file.
ENDIF.
LOOP AT l_pdf_data INTO l_pdf_line.
TRANSFER l_pdf_line TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error closing file:'(Z04) p_file.
ENDIF.
Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
Let me know if you require further details about the issue.
Regards
Shital
Edited by: shital phadake on Apr 8, 2009 9:39 PMThanks Selçuk for your reply and taking time for understanding the Issue,
I went thru Functionality of the program you suggested but dont think it matches my requirement.
Regards
Shital -
Printing problem when PDF is sent to the printer with certain fonts - missing text
I'm running into a printing problem when PDFs containing certain characters of the Calibri font are used. The text in large sections of the PDF is missing on the paper version, but the text is there on the screen. It's also happened when the PDFs we created were e-mailed out to a client and printed on their printer. The problem is not present when printing directly from the programs (Microsoft Word, Excel, Visio, etc.). I've been trying to get tech support from Adobe on this, but every time I call they apologize and say they will call back in 4-6 hours with an answer. Same result each time, no call back. If anyone from Adobe is listening, it's case number 184891587. The font appears as an embedded subset when I look at the document properties. Sometimes deleting one or two Characters allows for larger text blocks to be printed - i.e. removing a long dash in bold from the heading of a paragraph makes the paragraph reappear when printed to paper from PDF. In all cases the PDF appears correct on the screen. Printing as an image allows the text to appear, but the image quality isn't acceptable for small text, even at the 600 dpi setting on the printer. If the PDF is sent out by e-mail, we do not have control over the end-user's printer setup anyway, so we need this to work in all cases.
The setup/process I'm using is as follows:
Windows 7 Professional SP1 64-Bit
Microsoft Office 2013 - problem is present when printing documents from Word, Excel or Visio. Even other variations on documents.
I've tried Acrobat versions 11.0.0 to 11.0.5 as well as Acrobat Pro 11.0.0 and 11.0.1. Same Result
Printing to Adobe PDF as the printer, from the third party application
Printing to a Xerox printer from PDF using Acrobat - Text missing
Client prints to Konica printer - Text missing
I print to the wide-format Ricoh (which also does 11x17) and the text is present.
Is there something I'm missing? Is the entire font not getting embedded into the PDF file? I noticed that rolling back to a much older version of the Calibri font (1.02 compared to 5.72) makes the problem mostly go away, but it's not completely gone. Is it possible the font is too large to be completely embedded? Where can I go from here?Success! At least for now. It looks like my problem was fixed with Adobe's most recent update, 11.0.06. From the release notes:
PDF creation
Added support for Lotus Notes 9.
Added support for WebCapture in IE 11.
Added support for conversions from AutoCAD 2013.
3652540 A blank pdf is created for files having hidden visual style.
3601108 Flow Chart converts as a multicolored square.
3654345 Word documents missing parts of images in conversion to PDF.
3654572 Temporary file size increases when creating pdf by combining multiple files into one PDF.
3670155 PDF file created with Distiller XI prints incorrectly to some printers. (Emphasis mine)
3599407 Checkbox check marks do not appear in these files.
3663233 IE Web Capture in localized OS: Icons and drop-down menu items are missing and conversion dialog is not localized.
3651931 Chrome Only: Few web pages when converted to pdf from Chrome plugin doesn’t show up the Save As dialog.
3597910 EPM Mode On: Web capture is not working on Windows 8-32 bit when cache folder is missing.
3610644 Firefox 23.0: With Firefox version 23.0 (latest), the WebCapture icon shows up very dim as if it is disabled.
3650244 ODA falis to convert DWG files to PDF for large files.
I don't know if that's definately what solved the problem, but it sure sounds similar and this is the update that made the printing problem go away. We can't get the PDFs to fail at this point with our printers, even with Calibri 5.72. I'll come back to thread if we have printing problems at the end-user locations. -
PDF write to application server
Hi All,
I want to write PDF string to application server its writing but in this manner
%PDF-1.6#%####
108 0 obj#<</First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm>>stream
xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[^##GjNYjIfr##SN##kr~Jf#~xf#c^q&##Ҧ##agG#a####X###T##XR### ##b#
Please let me know where i am doing wrong.
Please see below my code .
(the scenario is when i download the pdf file i want to write the same file in to app server, there user changes the data and he will do upload )
call function fm_name
exporting
/1bcdwb/docparams = fp_docparams "
ls_header = ls_waste
lt_item = gt_rkpf
aufnr = lv_aufnr
importing
/1bcdwb/formoutput = fp_formoutput
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum '.PDF' into lv_file.
pr_file = lv_file.
open dataset pr_file for output in binary mode."text mode encoding NON-UNICODE.
if sy-subrc <> 0.
exit.
endif.
transfer fp_formoutput-pdf to pr_file.
close dataset pr_file.
clear :fp_formoutput-pdf,lv_file.
Please any one help me thanks,
Thanks,
KumarYou can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.
open dataset pr_file for output in binary mode."text mode encoding NON-UNICODE.
if sy-subrc 0.
exit.
endif.
loop at fp_formoutput-pdf *****************
transfer fp_formoutput-pdf to pr_file.
endloop.
close dataset pr_file.
clear :fp_formoutput-pdf,lv_file. -
View the pdf stored in content server
Hello,
Can I open a pdf available in content server from web? This web based application is non SAP aaplication.
The content server is connected to my SAP system and by using FM ALINK_RFC_DOCUMENTS_GET I get the required link. I am not sure how can I open this link from ouside SAP system( in SAP system pfd can be open using FM OBJECT_DISPLAY_CONNECTIONS).
I have also gone through the below SAP link also but no luck.
http://help.sap.com/saphelp_nw70/helpdata/en/9b/e8c18ceaf811d195580000e82deb58/frameset.htm
Thank you,
BhavanaHi
I'm not sure you can use this URL outside your SAP System and open it without providing any kind of security credentials.
Anyway what you could do is use ALINK_RFC_TABLE_GET to get your PDF in binary format and compose it in your Web Application
Regards -
How to Generate PDF file on the server
Hello Everybody !
I Need to generate a PDF File on the server, and I'm usin the command :
"OPEN DATASET p_path FOR OUTPUT IN BINARY MODE message l_verro .
LOOP AT t_lines.
TRANSFER t_lines-tdline TO p_path.
ENDLOOP.
CLOSE DATASET p_path. "
The File was generated, but is corrupt . Don't Open the file, It's wrong.
When I use the function GUI_DOWNLOAD the file is generated right. But in the server not.
Can someone help me please ??
Best Regards,
Wagner DuarteHi.
did you check this post?
Download PDF File to SAP Application Server
It doest the same as you are asking.
" Write PDF Binary Data to App Server
OPEN DATASET lv_filename FOR OUTPUT IN BINARY MODE.
IF sy-subrc = 0.
LOOP AT lines INTO ls_data.
TRANSFER ls_data TO lv_filename.
ENDLOOP.
ENDIF.
CLOSE DATASET lv_filename.
Regards
Miguel -
How can I force Mail to ask me to choose outgoing server each time I send an email?
I work for 3 different companies and I have 3 different mail accounts in my Mail for each of them. It happens to me very often that my email is sent from the wrong account, causing me a lot of trouble. This is of course my human mistake, but I want to limit this and would like to know if there is an option to force Mail to ask me for mail server each time I send an email?
Mail/Preferences/Accounts/Account/Account Information - try checking use only this server.
If that doesn't work properly, select the server, click Edit SMTP Server List and set up the server with your e-mail address so each one is named differently. Test. -
Move pdf file into application server
Hi ABAP Gurus,
i want your valuable help in solving my problem.
i tried to create PDF file in application server and its creating as
PDF file in Application server..but i am unable to see the content in text ,
instead it is displaying in binary content...but when i tried to create
in presentation server i am able to see it as text in PDF file....
Can u please let me know whats wrong in my work and how to create a PDF file
in Application server with text content
with regards,
Gowri.Hi Gowri,
Check this example....
report ztest.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
length like sy-tabix,
lengthn like sy-tabix.
call function 'GUI_UPLOAD'
exporting
filename = 'c:\temp\test.pdf'
filetype = 'BIN'
importing
filelength = length
tables
data_tab = itab.
open dataset dsn for output in binary mode.
loop at itab.
transfer itab-field to dsn.
endloop.
close dataset dsn.
clear itab.
refresh itab.
*- To crosscheck if it went well
open dataset dsn for input in binary mode.
do.
read dataset dsn into itab-field.
if sy-subrc = 0.
append itab.
else.
exit.
endif.
enddo.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:\temp\testn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
Or
Use the TCode
CG3Z or CG3Y
for downloading to Application Server.
Thanks,
Reward If helpful. -
Send PDF form to FTP server folder
I am not sure if this is possible, but one of my clients wants it, so I'm checking. They have a PDF form set up that currently sends the attachment via the user's email program. My client doesn't like that. So they want it to when a user fills out the PDF and submits it, the filled out PDF is sent to an FTP folder they can access. Is it possible to send a PDF to a specified FTP folder? If so, what all would be needed?
ThanksNot possible. You can submit to a web server, which can then save the file somewhere, but this would involve some programming.
-
Error while opening a pdf file sent as an attachment in mail
Dear All,
We have converted a alv grid into pdf and sent a mail with the attached pdf file. When the attachment is opened in the received mail we get an error " File does not begin with %pdf-". I am pasting the code.
Select single
from
TSP01
where
RQIDENT = wa_listident.
if sy-subrc <> 0.
exit.
endif.
client = tsp01-rqclient.
name = tsp01-rqo1name.
*BREAK-POINT.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = 'SP01'
CLIENT = client
NAME = name
PART = 1
IMPORTING
CHARCO =
CREATER =
CREDATE =
DELDATE =
MAX_CREDATE =
MAX_DELDATE =
NON_UNIQ =
NOOF_PARTS =
RECTYP =
SIZE =
STOTYP =
TYPE = type
OBJTYPE = objtype
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4.
if objtype(3) = 'OTF'.
is_otf = 'X'.
else.
is_otf = space.
endif.
*BREAK-POINT.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = wa_listident
desired_type = desired_type
IMPORTING
real_type = real_type
TABLES
buffer = l_objcont
EXCEPTIONS
no_such_job = 14
type_no_match = 94
job_contains_no_data = 54
no_permission = 21
can_not_access = 21
read_error = 54.
IF sy-subrc EQ 0.
attach_type = real_type.
ENDIF.
if is_otf = 'X'.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = wa_listident
NO_DIALOG = c_no
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT = gd_bytecount
PDF_SPOOLID = pdfspoolid
OTF_PAGECOUNT =
BTC_JOBNAME = jobname
BTC_JOBCOUNT = jobcount
TABLES
PDF = it_pdf_output
EXCEPTIONS
ERR_NO_OTF_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DSTDEVICE = 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
CHECK sy-subrc = 0.
ENDIF.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Please guide me to resolve this issue.
Thanks & Regards,
AnandHi,
is the next part of the code correct.
What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
You can also try below link..
Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
Hope this helps.
Regards,
-Sandeep -
No Data in PDF file in FTP server
Hi All,
I am trying to place a PDF file in FTP server.
Used
CONVERT_OTFSPOOLJOB_2_PDF to convert spool to PDF
SCMS_TEXT_TO_XSTRING
FTP_R3_TO_SERVER to transfer data to FTP.
I am able to see PDF file in FTP and no of pages matches with that of R/3 but there is no data in PDF file.To get pdf file , you need to set the itcpo-tdgetotf = 'X' and need to pass in the exporting parameter (options in open_form function module ).Then in close_form function module take all the data of otfdata table into an internal table . Then use SX_OBJECT_CONVERT_OTF_PDF function module to convert it to pdf.
I will show with an example.
tables itcpo.
DATA: ch_otf TYPE STANDARD TABLE OF itcoo.
DATA: w_otf TYPE itcoo.
DATA: w_pdf TYPE solisti1. "For PDF
DATA: i_content_txt TYPE soli_tab.
DATA: temp1 TYPE sx_format VALUE 'OTF',
temp2 TYPE sx_format VALUE 'PDF'.
DATA: c_printer TYPE sx_devtype VALUE 'PRINTER'.
DATA: w_transfer_bin TYPE sx_boolean. "Content
DATA: i_content_bin TYPE solix_tab, "Content
wa_content_bin TYPE solix,
i_objhead TYPE soli_tab.
itcpo-tdnoprint = 'X'.
itcpo-tdpreview = 'X'.
itcpo-tdgetotf = 'X'.
These three parameters need to be passed along with other required parameters
CALL FUNCTION 'OPEN_FORM'
EXPORTING form = xformular
language = ekko-spras
OPTIONS = itcpo
archive_index = toa_dara
archive_params = arc_params
device = xdevice
dialog = xdialog
mail_sender = sender
mail_recipient = recipient
EXCEPTIONS canceled = 01.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
tables
otfdata = ch_otf.
LOOP AT ch_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
converting otf file to pdf file
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = temp1 "'OTF'
format_dst = temp2 "'PDF'
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
Then open dataset and transfer to ftp of the content of table content_bin(i_content_bin) as shown in above example.
I think this will be helpful for you -
Convertion pdf file from App. server to Pre.server
Hi,
I have file pdf file in application server. i want to convert this PDF file into presention server.
plese send simple progrme.
Thank&
Regards,
MadhuAlso try
FYI
REPORT ztrans01 .
*Parameters(files)
PARAMETERS: ux_dir TYPE epsf-epsdirnam OBLIGATORY
DEFAULT '/usr/sap/trans',
filename TYPE epsf-epsfilnam OBLIGATORY DEFAULT 'test1',
pc_dir TYPE rlgrap-filename OBLIGATORY
DEFAULT 'c:\tmp'.
*DATA(Strings)
DATA itab TYPE TABLE OF string.
DATA wa TYPE string.
DATA file TYPE string.
DATA size TYPE epsf-epsfilsiz.
DATA ux_file TYPE epsf-epspath.
DATA mode TYPE epsf-epstxtmod.
*start-of-selection
START-OF-SELECTION.
*1) transfer
CONCATENATE ux_dir '/' filename INTO ux_file.
OPEN DATASET ux_file FOR INPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE i502(me) WITH ux_file.
ENDIF.
DO.
READ DATASET ux_file INTO wa.
IF sy-subrc <> 0. EXIT . ENDIF.
APPEND wa TO itab.
ENDDO.
CLOSE DATASET ux_file.
*2)download
CONCATENATE pc_dir '\' filename INTO file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = file
TABLES
data_tab = itab.
OR
*& Form f1104_download_to_lofile
Download to data from internal table to Logical File/application server
FORM f1104_download_to_lofile.
Open the file in application server
OPEN DATASET v_filepht FOR OUTPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE s185 WITH v_filepht.
LEAVE LIST-PROCESSING.
ENDIF.
LOOP AT i_logfile INTO w_logfile.
TRANSFER w_logfile TO v_filepht.
CLEAR w_logfile.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ text-055, v_filepht, text-056.
ELSE.
WRITE:/ text-057, v_filepht.
ENDIF.
Closing the file
CLOSE DATASET v_filepht.
and also check link
http://sap.ittoolbox.com/code/archives.asp?d=2285&a=s
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise" -
Download PDF file from APP server!
Hi!
Has anyone tried uplaoding and downloding a PDF table from app server as I tried from a normal method by Open dataset, Transfer but it wont work.
Please provide any inputs.
Thanks.Hi park,
1. Using open data set, transfer , close etc,
also it will work.
( it will download / upload any kind of file from app server)
2. Just make sure the
FULL PATHNAME and the FILENAME
are mentioned in EXACT CASE
(small/CAPITAL).
3. U can check thru transaction AL11, to see the file and path.
regards,
amit m. -
How to download a pdf file from the server from an strut application?
Hi,
I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.Read up on the Struts download action [1].
And next time, please post in the relevant forum, one of the web-tier ones [2].
[1] http://wiki.apache.org/struts/StrutsFileDownload
[2] http://forum.java.sun.com/category.jspa?categoryID=20
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
----------------------------------------------------------------
Maybe you are looking for
-
Hi, i have the msi 785gm-e65 moptherboard and i would like to ask if it supports ssd drives and trim.I am interested in installing an samsung 830 ssd.
-
Jinitiator - isset_se problems
Check out this article http://support.microsoft.com/support/kb/articles/q192/8/90.asp
-
All, I am a complete newbie to Video so please do not be frustrated with my question. I am using a Panasonic HS700 in 1920x1080 in maximum resolution mode 1080p/60. I understand that the files are not directly importable into imovie11 and I have purc
-
Best Way to Implement Java Onscreen Keyboard Input
Hello! I'm working on an embedded device that will run J2SE, using a touchscreen, but no keyboard. The UI will be in Swing. When the user focuses a text field, I'd like an on-screen keyboard to be displayed. My question is as to the best way to have
-
Upgraded to 3G gave 2G to mom and can't activate it
How can I get the old 2G iPhone to activate. I have done remote desktop, and I can restore the firmware, which I have done (it is on 2.0), but it shows up as still being the same number as my current 3G iPhone. Does my mom need to get a new SIM card