Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Wrong PDF conversion.

former_member588188
Participant
0 Likes
3,467

problem.pngHello,

I have a program in which we upload a file in a document number. Once we process this document, there is a new posted document number.

When I want to see the attached document in FB03 in attachment file. The document is opened in html which this format.

The program was working fine but after a patching it is showing those junk characters. I think it is due to any SAP note that I should implement. Any ideas?

Thanks a lot

13 REPLIES 13
Read only

vipinsaraika
Participant
0 Likes
3,343

Can u share the code

Read only

former_member588188
Participant
0 Likes
3,343

Hello,

I think it is a standard issue. I am checking the custom programs and they mainly go to database tables. The programs were working perfectly in the past. So I think it is more related to an SAP note.

Read only

0 Likes
3,343

check transaction OAAD it might help u

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,343

Why is it "opened in html"??? If the file has a PDF extension, it should first be displayed in your PDF viewer. What about other documents created before the error occurred?

My 2 cents: such a big horrible issue is not due to a SAP note, but to erroneous coding and to special case occurring.

Read only

former_member588188
Participant
0 Likes
3,343

I attach the document in fb02, then I execute a custom program that will add the info in an IDOC. The program posts a new document and when I enter in this new document, there are 3 documents, 2 of them are fine but the attached one has this strange junk characters.

Before the patching, the program was working perfectly. After this patch, it is working very bad.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,343

Are the old correct PDF "opened in html" or in another application?

Read only

former_member588188
Participant
0 Likes
3,343

Hello,

The program contains an outbound idoc which is containing in one segment the attached file. Then the inbound idoc is having a path but I do not see the attached file. In FB02 when you add an attachment to a document number and you click on it, it is opening an html with the file. The same when I go with the new posted document but when I open the file it is getting the junk characters.

I do not know if I should create a segment in the inbound idoc which will contain the data.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,343

OK. It's all custom IDoc solution there, no idea what is this path, what is this segment made of. I'm blind, please guide me (and any people viewing the question).

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,343

Can you paste the first displayed characters of your pdf (does it start with '%PDF')

Read only

former_member588188
Participant
3,343

Hi Raymond,

yes it starts with %PDF

%PDF-1.7 %âãÏÓ 7 0 obj <>stream

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,343

Could you reproduce the case with a dummy PDF file with no private information, and attach here both this PDF file and copy/paste the junk characters please. Thank you.

By the way, in your title, you are talking about "conversion", don't you mean "display" or do you really mean there is a kind of conversion somewhere, what is it then? (I don't call transferring, whatever the means, attaching and displaying the PDF a "conversion")

Read only

former_member588188
Participant
3,343

Hello Sandra,

It happens when I attach any PDF document. It is not that I was uploading an important document. Anyway I am thinking it is probably related to Archivelink. The outbound IDOC is sending the document with name and type of document, i.e. PDF. However, the inbound IDOC is via link. I am checking one user exit ZXEDFF14.

The name of the tittle, well at the beginning I called it conversion because I see those junk characters.

I am going to check today if it is something of archiving and not ABAP.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,343

Thanks. By the way, in case it's due to the type in ArchiveLink, then maybe you see %PDF-1.7 etc. in your browser because the HTTP request header was not sent "Content-Type: application/pdf" (that you can see via Developer Tools/F12), probably it's more something like "Content-Type: text/plain".

NB: about what I previously asked, you can try with a tiny PDF like this one: https://www.tagg.org/pdftest.pdf