Application Development 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: 

Preview of PDF-stream print do not match physical print

JanBraendgaard
Active Participant
0 Kudos

We have made an enhancement to the FM FPCOMP_JOB_CLOSE, where we replace the PDF stream in the job with a PDF stream retrieved earlier for printing delivery notes.

The delivery note is printed using VL02N->Outbound Delivery->Issue Deilvery Output. The output is then selected and either Print Preview or Print are selected.

READ TABLE job-documents INDEX 1 ASSIGNING FIELD-SYMBOL(<fs_doc>).
IF sy-subrc = 0.
<fs_doc>-pdf = lv_pdf_stream.
ENDIF.

When the print preview is shown all is good, and the correct print is previewed. However when an actual printout is requested, then it is the original layout that is printed regardless of whether the preview have been shown or not.

Is it not possible to replace the content of a print job?

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

What "original layout" are you talking about?

JanBraendgaard
Active Participant
0 Kudos

sandra.rossi

I was referring to the printed PDF stream before the replacement with new PDF stream.

Will2
Explorer
0 Kudos

I think some outputs are archived after being printed. So maybe the printing is coming from the archive rather than being regenerated?

Sandra_Rossi
Active Contributor
0 Kudos

I'd say that you don't give enough information because if you replace the PDF, then it's impossible that something else is printed. So, you should elaborate.

My 2 cents: as you're talking about FPCOMP, I guess it's an Adobe form generated through Adobe Document Services, and so maybe the issue is about the cache in the ADS, which still points to the "original layout". This was already discussed in the forum how to clear the cache. That doesn't explain why it's different between preview and actual printing, maybe it's a matter of different application server, or whatever. Anyway, clearing the cache should solve the issue.