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

PDF problem

Former Member
0 Likes
942

Hi,

I've got some PDFs in the SAP server, which I need to combine into an only pdf document.

This final PDF document needs to have a standard frontpage and a second page with a glosary of all the pdfs documents that i have combined into one.

I had planned to create a smartform for the frontpage and the second page, put them into an spool order, and add into that same spool order the rest of the pdfs one by one. And finally use the function CONVERT_ABAPSPOOLJOB_2_PDF to generate my final PDF.

That was my idea, but when it comes to put that pdfs (the ones in the sap server) into the spool order... then i've got the problem.

Please, is there anyone who can guide me with this big problem i have? How can i put those PDFs in the sap server into my spool order?

Thanks and regards,

Paula

Moderator message: please use more descriptive subject lines for your posts.

Edited by: Thomas Zloch on Mar 1, 2011 5:40 PM

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
884

It sounds like you're asking to combine PDF docs together - use a 3rd party tool for that. You can call the tool from an ABAP application (as we've discussed here before). The conversion functions are for converting OTF or ALI data to PDF. If you want to re-render existing spools into one, you can do that but you need one type before conversion. Personally, I would handle this at the point of generation, not after the fact...

5 REPLIES 5
Read only

brad_bohn
Active Contributor
0 Likes
885

It sounds like you're asking to combine PDF docs together - use a 3rd party tool for that. You can call the tool from an ABAP application (as we've discussed here before). The conversion functions are for converting OTF or ALI data to PDF. If you want to re-render existing spools into one, you can do that but you need one type before conversion. Personally, I would handle this at the point of generation, not after the fact...

Read only

Former Member
0 Likes
884

Thanks a lot for your quick reply.

I'm sorry but there are some points that I don't understand:

1. It sounds like you're asking to combine PDF docs together - use a 3rd party tool for that. : Yes, I need to combine PDFs docs together. These PDFs are in the SAP server. Please, could you tell me what's that 3rd party tool you are talking about?

2. The conversion functions are for converting OTF or ALI data to PDF: I don't get this point, i already have my PDFs, why should I convert them into OTF or ALI data?

3.If you want to re-render existing spools into one, you can do that but you need one type before conversion: I need one type of what? One type of spool order? didn't know there were many types. Is there any function which can re-render existing spools into one?

Sorry for all these questions.

Regards,

Paula

Read only

Former Member
0 Likes
884

HI,

you have some pdf's and you want to build one pdf out of these pdf's.

This will only be possible with a 3rd party product, e.g. using Seal System or an external converting tool.

If you have these documents as OTF-Data, you can put these otf-documents together and then convert it into one pdf, thats all sap can do as i know

Read only

brad_bohn
Active Contributor
0 Likes
884

1 - There are many 3rd party tools for working with PDFs. You need to Google for them. There is even one discussed in a blog or wiki on this forum.

2 - You are the one who mentioned that and that was my point. I had no idea why you would use the ABAB list convert function for your requirement.

3 - One spool format type - ALI or OTF and use the corresponding convert function.

Search for the PDF merge wiki to get some idea of how to proceed. I don't have a link to it because I use a different approach and tool for merging PDFs when necessary. As I said before, it's better to attack the issue before conversion if you can.

@Oscar: that wasn't the question asked though...

Read only

Former Member
0 Likes
884

Hey

Call one by one the function module for the smartforms with the parameters

output_options-tddataset = 'PDF'.

output_options-tdsuffix1 = 'SUFFIX.'.

output_options-tdsuffix2 = lw_vbrk-vbeln.

output_options-tdnewid = 'X'.

output_options-tddelete = 'X'.

output_options-tdfinal = ' '.

output_options-tdlifetime = 8.

control_parameters-no_dialog = 'X'.

control_parameters-preview = ' '.

control_parameters-getotf = 'X'.

The importing parameter job_output_info-otfdata will will you back the form in OTF format.

You can append every smartform into another internal table with the job_output_info-otfdata type, gt_otf for example, and at the end call function

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

IMPORTING

bin_filesize = file_size

  • BIN_FILE =

TABLES

otf = gt_otf

lines = lt_pdf

lt_pdf will have the pdf file. You can download with

OPEN DATASET file_hibrido FOR OUTPUT

IN BINARY MODE.

LOOP AT lt_pdf INTO st_pdf.

TRANSFER st_pdf TO file_hibrido.

ENDLOOP.

CLOSE DATASET file_hibrido.

Regards