Problem in PDF Download
Hi All,
I have created a report and wanted to convert the report output into pdf. I am using the program RSTXPDFT4 to convert the spool job to pdf and it is converting also. But the problem is it is truncating few fields at the end of the report. For example. My report has 18 columns in it, it is truncating last 5 columns. Is there any possible way in which i can get all the fields in the same pdf file and also don't loose the font size of the pdf file.
Please suggest.
Regards,
Akhil Rai.
Hi
Did you mention line count and line size of the report something like below.
REPORT ztest LINE-COUNT 65 LINE-SIZE 132. " Here
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LOCL'
copies = 1
list_name = 'TEST'
list_text = 'Test List'
immediately = ' '
release = ' '
new_list_id = 'X'
line_size = 200
line_count = 65
layout = 'X_65_132' " Here as well
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = g_params
valid = g_valid.
Similar Messages
-
I was ready to blame the latest update from Apple, but perhaps not. Here are the symptoms:
Our church publishes a newsletter in PDF format which can be downloaded from their web site every month. This month, after the latest Apple update, the downloaded document has problems. General format is OK (boxes around text, images) but all text is simply grey bars that seem shaded from one side of the page to the other.
If I save the document and try to open it in Preview the same problem.
HOWEVER, if I open the document in the Adobe reader the document is fine!
I thought this might be a problem with my iMac (first of the aluminium iMacs), so I tried this on my Apple laptop (recent vintage). Both machines run 10.6.8 with the latest updates from Apple applied. I have no funny "helper" programs; i.e. the software is pretty clean and all updated.
Same issue on the laptop.
HOWEVER I looked for a generic pdf download on the web and downloaded a PDF instruction sheet from the Moen (plumbing) web site - no problem!
So now my suspicion is that the PDF document has the problem. But I would have thought that PDF is PDF and if the Adobe reader can handle the document that Safari and Preview should be able to? Is there some format switch in the program used to generate the PDF document that would cause the Apple programs to fail but Adobe to succeed?
Any thoughts welcomed! I'd like to figure out if it's me or them.
PS - I've not yet tried this on that "other" operating system. I could do that with a trip to the libraryThanks guys. I think I'll just rely on Acrobat as suggested. Sounds like somehting has changed on their end as the previous month's file loads fine.
I'll check with teh secretary ans see what has happened.
Thanks -
Strange problem of Pdf downloading with Web Dynpro
Hi, experts, I have to setup a project to realize pdf downloading with web dynpro. But unluckily, I have tried all the methods in this froum ,there's really strange problem .Because when I click the link of Download UI link, there's no reaction at all, I really don't know why.Below is the codes I used , can anyone help me ? thank you very much!
public void wdDoInit()
//@@begin wdDoInit()
IWDAttributeInfo attInfo =
wdContext
.currentContextElement()
.node()
.getNodeInfo()
.getAttribute(
"Pdfsource");
ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
binaryType.setFileName("test.pdf");
binaryType.setMimeType(WDWebResourceType.PDF);
try {
int length =
(int) wdContext.currentPdfdownloadElement().getBin_Filesize();
byte b[] = new byte[length];
b = wdContext.currentPdfdownloadElement().getBin_File();
wdContext.currentContextElement().setPdfsource(b);
} catch (Exception ex) {
"Pdfsource" is the context value attribute of type binary.And Bin_File is the xstring type parameter from my RFC contains pdf content.
I used two views and one customer-controller . I put some value in the first view to set search condition.and the second then appears and have the download UI element. Are there any additional codes I should use? pls help!Hi Hao,
Try this out
Suppose the file name is test.doc in c drive in server
create a context attribute filedata of binary type
bind it to data property
write the following code
try
File input = new File("C:
test.doc");
int length =(int)input.length();
//Create a byte array b to hold the file
byte b[] = new byte[length];
FileInputStream in = new FileInputStream(input);
//Reading the file to a byte array b
in.read(b);
in.close();
//Setting the data from the byte array to the context element.
wdContext.currentContextElement().setfiledata(b);
catch(Exception ex)
wdComponentAPI.getMessageManager().reportSuccess("Error in File
IO"+ex.toString());
// Structure information of the context attribute
IWDAttributeInfo attinfo = wdContext.getNodeInfo().getAttribute("filedata");
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attinfo.getModifiableSimpleType();
// Default File name which appears when opened on client machine
binaryType.setFileName("testing.doc");
//Explicitly setting the file type
binaryType.setMimeType(WDWebResourceType.DOC); -
Anyone experiencing problems with pdfs with Mountain Lion?
When I try to open pdfs downloaded from the internet via Safari to the Mountain Lion desktop I get this message:
"There was an error opening this document. The file is damaged and could not be repaired."
I have encountered this problem with pdfs downloaded from several sources.
When I open pdfs received in email messages there is no probem.
Can anyone advise please?I had been having a similar problem on Lion with Safari pdf files despite downloading the latest Adobe Reader XI.
I would constantly get the same messages - There was an error opening this document. The file is damaged and could not be repaired. And I would get a blank page when I tried to print the pdf if I tried printing from the Safari web page using File - Print from the top toolbar on my laptop.
Then I came across the grey Safari lozenge with action icons.
This allowed me, without downloading the pdf, to print the pdf file direct from the Safari page by using the Print icon on the grey lozenge that appears centrally three quarters down the screen.
Then I discovered that if I save the pdf using the Save icon from this same grey lozenge on the Safari page I can open and print this pdf version from my desktop.
I've tested it with a couple of different pdf files and these methods work using the grey lozenge icons but the same pdfs files don't work using File - Save As on the Tool Bar. -
I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07. When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help..
Thank you for your reply. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07. When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help.
-
Problem with pdf display downloaded from application server
Hi all,
I have a problem with displaying pdf downloaded from application server (saved in BINARY MODE).
I am getting the pdf output of adobe form in FPFORMOUTPUT-PDF as rawstring back to my program and then converting that rawstring into binary form using the function module SCMS_BINARY_TO_STRING.
Now, when I export the data to presentation server directly using cl_gui_frontend_services=>gui_download, the pdf is downloaded properly.
However, when I save the data to application server file by looping at the internal table obtained from SCMS_XSTRING_TO_BINARY and using TRANSFER, and subsequently downloading the file in "unconverted format" from AL11 to my desktop, I am getting a "blank" pdf file (with the same number of pages as the one downloaded using gui_download).
I have tried different encodings during download but in those cases i get corrupted pdf message. only the default option of INTIAL value seems to work.
I am forced to believe that there is a problem in my code which saves the data to app server but I cant find any solution that is logical. Any solution to this would be greatly appreciated.
Regards,
Sasi
Edited by: Sasi Upadrasta on Sep 29, 2010 7:55 PMused a program to read the file from appl server and then downloading it to desktop.
-
Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before downloading the new Reader version. Suggestions? Thank you.
Hi,
Which version of Adobe Reader were you using earlier when printing using Dell printed was working fine?
Thanks,
Shakti K -
I am having problems creating PDF file and downloading them
I am having problems creating PDF file and downloading them
Hi Randy Keil,
You might need to sign up with your Adobe ID and password at "https://cloud.acrobat.com/convertpdf"
Then you can choose the desired files to create the PDF.
Now, let me know what error message do you get while doing the same.
What kind of files are you trying to convert to PDF?
Have you checked with your internet connection and tried using a different browser?
Hope to get your response.
Regards,
Anubha -
Safari can download most files ok. But, pdf downloads result in a dark blank screen and no download. There is no problem downloading in Chrome. Repairing permissions hasn't worked
If you use Adobe Acrobat to view PDF files...
Apple Safari 5.1 and Adobe Reader/Acrobat Advisory -
We are having a difficult time getting a PDF download to work with the
Struts framework on WLS 5.1.
This works fine with a servlet we have in production today, but when using
Struts, it fails every time.
We are submitting a form that contains a date and a type, and then going to
a back-end vendor to retrieve the PDF stream and re-stream it back to the
user. The URL that should work is as follows:
http://xxxx/action/viewStmt?period=mm/dd/yy&type=PDF
When we execute this URL, the action is invoked, the correct arguments are
obtained, the vendor is called, and the streaming is done. However, the
browser then pops up a message saying...
"You have chosen to download a file from this location:
yy&type=PDF from xxxx"
and the download fails.
We are doing almost the exact same thing with a servlet, and no such error
happens. I don't know if this is Struts-related or some configuration
issue.
Any ideas?
Thanks,
John
it sounds like the browser wants to download a file who's ContentType
isn't set.
try the following:
response.setContentType(<ENTER PROPER PDF CONTENT TYPE HERE>);
it'll probably be something like "application/pdf" or "text/pdf"
with Struts you'll probably have to extend the Action bean to handle
that. just have that extended Action read the type parameter and
interpret it.
hope that helps
e.j. fuhr
"John Bauer" <[email protected]> wrote in message news:<[email protected]>...
> We are having a difficult time getting a PDF download to work with the
> Struts framework on WLS 5.1.
> This works fine with a servlet we have in production today, but when using
> Struts, it fails every time.
>
> We are submitting a form that contains a date and a type, and then going to
> a back-end vendor to retrieve the PDF stream and re-stream it back to the
> user. The URL that should work is as follows:
>
> http://xxxx/action/viewStmt?period=mm/dd/yy&type=PDF
>
> When we execute this URL, the action is invoked, the correct arguments are
> obtained, the vendor is called, and the streaming is done. However, the
> browser then pops up a message saying...
>
> "You have chosen to download a file from this location:
>
> yy&type=PDF from xxxx"
>
> and the download fails.
>
> We are doing almost the exact same thing with a servlet, and no such error
> happens. I don't know if this is Struts-related or some configuration
> issue.
>
> Any ideas?
>
> Thanks,
> John
-
The problem is: I download an pdf file from internet. Filename is containg skandinavian characters which are converted as "%D6 etc." When I try to open the file with N9 I get an error similar to: "file is corrupted, can not open the file". Yet the same file works fine with Nokia C5-00 and with my Macbook laptop. Any idea how to fix this problem?
is the device actually sold in your country of origin, or was it imported.
not that it should really matter, but sometimes could be an issue.
you could also try to rename the file and then try to open it. -
PDF download in 3.1 fails with "could not open" error
Just created a couple interactive reports and was truly dazzled by the functionality. But when I try to download to PDF, Acrobat Reader 8.1.1 errors with msg "... could not open <file> because it's either not a supported file type or because the file has been damaged...."
No problem with CSV download.
Is there some special Acrobat plugin that's needed?Its true its not required, but the instructions for deploying the war file advise you to use enterprise manager console, which you won't have if you have just got XE or if you have installed a database without Enterprise manager.
Ideally we need a method of deploying the war file directly
Step 1: Installing the WAR file
Place the fop.war file (located in apex_install_directory/utlities/fop) in an accessible location on your local machine. You then follow the directions below or can view the process by running this viewlet.
Navigate to your OC4J Oracle Enterprise Manager Console eg: http://localhost:8888/em/
Select the Applications Tab
Select Deploy Button
On the "Deploy: Select Archive" page use the option "Archive is present on local host. Upload the archive to the server where Application Server Control is running." Use the file browse to select the fop.war file and click "Next" button
On the "Deploy: Application Attributes" page set the "Application Name" option to "fop" and clear the "Context Root " option and click "Next" Button
On the Deploy: Deployment Settings click the "Deploy" button Message was edited by:
Keith Jamieson -
I created a pdf download link to a _blank page, and when I
try to download and view the pdf in IE 7, a new page comes up but
the page is blank. The pdf does not view. Can someone offer insight
to the problem? Thanks.If you're talking about the link by "Click Here to download a
PDF version of
this Recipe Style Guide" I clicked it, waited about 20
seconds, then saw
your Recipe Style Guide. It's only about 160K so it's not
that large (for
the record, I'm in a coffee shop right now with a not-so-good
connection).
It's working fine. Assuming that's what's causing you a
problem.
Mad Dog
Dored wrote:
> The link is:
http://www.hadfield.net/copywrite.htm#recipe -
Problem sending .pdf with email in ECC 6.0
hi there,
we are upgrading from r/3 4.6.c to ECC 6.0.
i have the following problem: in many z-ababs we convert spool-files to pdf-files and send them with function SO_NEW_DOCUMENT_ATT_SEND_API1 via email.
well, this is working okay, BUT: the ending '.pdf' is missing in the filename:
in R/3 4.6.c it looks like the following:
zfl_reporting.pdf
Now it looks like this:
zfl_reporting
So the file is not recognized as pdf-file. You have to add a .pdf manually to open it.
We can't do this as we send the pdf-files thousands of times to our customers.
Any ideas ?
reg, Martinhi
Posted below is the sample code..
find the bolded ones...
REPORT ZMAIL_PDF NO STANDARD PAGE HEADING.
Data for mailing purpose
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Spool table
TABLES : TSP01.
Data required for creating spool
DATA: MSTR_PRINT_PARMS LIKE PRI_PARAMS VALUE 'LP01',
MC_VALID(1),
MI_BYTECOUNT TYPE I,
MI_LENGTH TYPE I,
MI_RQIDENT LIKE TSP01-RQIDENT,
REP LIKE PRI_PARAMS-PLIST.
Internal table for capturing data into PDF format
DATA: MTAB_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE.
File name
DATA : MC_FILENAME LIKE RLGRAP-FILENAME.
SELECTION SCREEN
PARAMETERS : P_REPID LIKE SY-REPID,
P_LINSZ LIKE SY-LINSZ DEFAULT 132,
P_PAART LIKE SY-PAART DEFAULT 'X_65_132'.
START-OF-SELECTION.
<b> CONCATENATE 'C:\'
P_REPID
'.PDF'
INTO MC_FILENAME.</b>
MOVE SY-REPID TO REP.
Get print parameters
PERFORM GET_PRINT_PARAMS.
Send output of the required program to Spool
SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS MSTR_PRINT_PARMS
VIA SELECTION-SCREEN AND RETURN.
Get the the spool number that is just created
PERFORM GET_SPOOL_NUMBER USING SY-REPID SY-UNAME
CHANGING MI_RQIDENT.
Convert Spool to PDF & download the same
PERFORM SPOOL_2_PDF.
Upload downloaded PDF file for mailing
PERFORM UPLOAD_PDF_FILE.
Send mail with PDF attachment
PERFORM SEND_MAIL.
FORM get_spool_number *
Get the most recent spool created by user/report *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid
f_uname
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = sy-repid
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
*& Form send_mail
text
--> p1 text
<-- p2 text
form send_mail.
Creation of the document to be sent
DOC_CHNG-OBJ_NAME = 'TEST'.
DOC_CHNG-OBJ_DESCR = 'TEST MAIL WITH PDF ATTACHMENT'. "mail subject
OBJTXT = 'Test mail with PDF attachment'.
APPEND OBJTXT.
CLEAR OBJTXT.
APPEND OBJTXT.
APPEND OBJTXT.
OBJTXT = 'Please double click the attachment to verify'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'Sample PDF attachement'. "
APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
<b> OBJPACK-DOC_TYPE = 'PDF'.</b>
OBJPACK-OBJ_NAME = 'TEST'.
OBJPACK-OBJ_DESCR = 'Test.PDF'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
For sending mail to Internet Address
RECLIST-RECEIVER = '[email protected].
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE :/ 'MAIL SENT....'.
WHEN 1.
WRITE :/ 'TOO MANY RECEIVERS'.
WHEN 2.
WRITE :/ 'DOCUMENT NOT SENT'.
WHEN 4.
WRITE :/ 'NO SEND AUTHORIZATION'.
WHEN OTHERS.
WRITE :/ 'ERROR OCCURED WHILE SENDING MAIL'.
ENDCASE.
endform. " send_mail
*& Form GET_PRINT_PARAMS
FORM GET_PRINT_PARAMS.
call function 'GET_PRINT_PARAMETERS'
exporting destination = 'LP01'
copies = 1
list_name = rep
list_text = 'LIST ..... TO SAP-SPOOL'
immediately = 'X'
release = 'X'
new_list_id = 'X'
expiration = 1
line_size = 132
line_count = 65
layout = 'X_PAPER'
sap_cover_page = 'X'
cover_page = 'X'
receiver = sy-uname
department = 'System'
no_dialog = 'X'
importing out_parameters = mstr_print_parms
valid = mc_valid.
ENDFORM. " GET_PRINT_PARAMS
*& Form SPOOL_2_PDF
FORM SPOOL_2_PDF.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
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
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
call function 'WS_DOWNLOAD'
exporting
bin_filesize = mi_bytecount
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = mtab_pdf
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
ENDFORM. " SPOOL_2_PDF
*& Form UPLOAD_PDF_FILE
FORM UPLOAD_PDF_FILE.
call function 'WS_UPLOAD'
exporting
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = OBJBIN
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
ENDFORM. " UPLOAD_PDF_FILE
**reward if helpful
regards,
madhumitha -
Pdf download not appearing in safari download tab
Hi
Recently I have discovered a problem,whenever I download a document the document automatically appears in the safari download tab (the tab with the arrow facing downwards) however this does not occur for pdf files. The pdf will download and go straight into my downloads folder in the dock, but it does not show in the safari download tab. This is a problem for me as i can't easily access my recenetly downloaded folders via the safari tab.
any help would be appreciated
cheersThe same situation is happening to me I bought motion 5 first and the FCP X and the FCPX shows up as install but the Motion 5 shows up like its not installed, but in the purchase section FCPX does not show only Motion 5, and if I click on motion 5 to install it it tells me that it was not purchase in that app store that it was purchase in another app store, but my bank account shows up like if it was already purchase I am afraid to hit install in the motion tab install because it tells me if I want to buy it again.
Maybe you are looking for
-
How to integrate address book in Pages for iPad?
In Pages for Mac, I could drag Address Book entries directly into Pages to automatically populate Name and Address placeholders. How do I do that in Pages for iPad? Currently, iOS Pages does not pull my details (name & address) automatically into let
-
Hello there! I just received a receipt for a game I have purchased for two friends (two distinct account without cards attached, so the game was purchased twice as a gift) but I have been charged for three copies and I want to report this problem. So
-
SEM-BPS: Transporting allocations
Hi, I have used UPC_TRANSPORT_BPS_ALL to transport a planning function (Allocation) that contains several parameter groups. When going to target system I see the transported parameter groups but cannot process these. I get error message about missing
-
Dear All, I have tried to use the iview provided by SAP for Employee Self Service from portal content area. When i click on all the iview (in ESS), i am getting error as user doesn't exist for this period. can any one help me to resolve this issue? w
-
Macbook geht nicht in ruhezustand
hallo, habe ein macbook pro was seit ein paar tagen nicht mehr in den ruhezustand geht wenn ich den deckel schließe. das weise licht rechts leuchtet dauern und 'atmet' nicht mehr wie bisher, die festplatte scheint zu laufen (leise geräusche).