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: 

Font size in PDF format for ABAP list report

former_member217544
Active Contributor
0 Kudos

Hi All,

Iam trying to create a PDF format for a report(list). This is the procedure I followed:

1. Get print parameters

2. submit my Zreprogram using the statement

SUBMIT sy_repid TO SAP-SPOOL WITHOUT SPOOL DYNPRO

SPOOL PARAMETERS out_parameters

AND RETURN.

3. Get the spool number

4. and use the Function module CONVERT_ABAPSPOOLJOB_2_PDF to generate PDF.

Everything is fine, except that when I open PDF from the system, the letter size is very very small. Is there any way I can control the size?

Thanks & Regards,

Swarna Munukoti.

1 ACCEPTED SOLUTION

asik_shameem
Active Contributor
0 Kudos

Hi,

I think you can achieve this by changing the layout in print parameter of the FM 'GET_PRINT_PARAMETERS'.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      .....
      line_size      = 132
      line_count     = 65
      layout         = 'X_65_132'
      .....

You can get the list of formats in the table TSP1D where TYPE = 'L' (List).

20 REPLIES 20

former_member194416
Contributor
0 Kudos

Hi,

You need to change device type in SAP . Try using different device types while generating spool (not sure but maybe also in CONVERT_ABAPSPOOLJOB_2_PDF ) or create a custom one and change its settings.

Regards,

Edited by: Gungor Ozcelebi on Jul 20, 2010 9:07 AM

0 Kudos

Hi,

Thanks for your response. What kind of settings I need to change? Also you mentioned to try different device types. Does that mean output device? (Presently I mentioned it as 'LOCL').

Thanks & Regards,

Swarna Munukoti.

0 Kudos

Hi,

Yes each output device has a device type (tcode SPAD). You can copy LOCL device (do not change it is for sure used in some other programs) and copy the device type for and you can change character sets to get better format. You may also directly try to use some device type which is created for PDF if present in your system (if not search OSS with search term "PDF device type" ) you will get many OSS notes which suggests device types settings for different configurations.

Regards,

asik_shameem
Active Contributor
0 Kudos

Hi,

I think you can achieve this by changing the layout in print parameter of the FM 'GET_PRINT_PARAMETERS'.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      .....
      line_size      = 132
      line_count     = 65
      layout         = 'X_65_132'
      .....

You can get the list of formats in the table TSP1D where TYPE = 'L' (List).

0 Kudos

Hi Asik,

Iam already using this option. But still the font size is very small. Until I zoom the PDF to 500 or 600, the letters are not visible. The same is happening even if i try to print very less columns (say 6 or 7 columns)

Thanks & Regards,

Swarna Munukoti

0 Kudos

Hi,

I just want to make sure that you have mentioned line size and count in the REPORT statement.

REPORT  zprg LINE-SIZE 132
             LINE-COUNT 65.

0 Kudos

Hi Asik,

Yes, I maintained Line-size as 1023 at the report heading. But still the same. Any other suggestions?

Thanks & Regards,

Swarna Munukoti.

0 Kudos

Hi,

Font size in PDF is not relevant at all with the line size, Have you tried using different output or character sets device (even without changing you can try other existing devices).

Regards

0 Kudos

>

>Font size in PDF is not relevant at all with the line size

It is relevant Gungor. Try to generate PDF using RSTXPDFT4 for a report using different layout. You will get the difference. Based on the layout, font size varies.

0 Kudos

Hi,

Have a look at OSS Note 1369740. It fits exactly your case.

Regards

0 Kudos

Hi Gungor,

Yes I already had a look at that snote. In that snote they mentioned an import parameter GET_SIZE_FROM_FORMAT for the function module CONVERT_ABAPSPOOLJOB_2_PDF. I didnt find this parameter for the function module. Any idea what they are pointing to?

Thanks & Regards,

Swarna Munukoti.

0 Kudos

Hi Swarna,

What is your SAP_BASIS software component release no ? Some of the correction instructions adding this parameter to FM. Also there are prerequisites depending on release no.

Regards,

Edited by: Gungor Ozcelebi on Jul 20, 2010 3:12 PM

0 Kudos

Hi,

I tried this but still with no success. Still the font size in pdf is coming very small.

Iam using line-size 1023 at report heading. and for spool parameters i tried with many formats . Is there something Iam missing?

Thanks & Regards,

Swarna Munukoti

0 Kudos

Hi Swarna,

Try reducing the line size to 132 & check.

Thanks,

Best regards,

Prashant

0 Kudos

Hi Swarna,

Try to use the new format type instead of 1023 format this depends on your report output length.

Still you are not able to convert in the exact format. fallow the below steps which will help you.

For this goto SPAD->Full Administartion->Format Types-> Create some format type.

After that Goto -> Device Type -> Select the Device Type -> Select the format -> Change the scripting part of the format :

******************************************************

Sample coding part that i did earlier for converting the PDF.

  1. THSAPWIN ZDM20

  1. SAPWIN data stream

\e%SAPWIN%

  1. change WinCharSet to 222 (THAI)

\eW222;

  1. select paper size(A4)

\ep9;

  1. Landscape-Mode

\ePP

#set font name

\eFAngsana New;

  1. Schrift 6.5 Punkt einstellen.

\eS130X

  1. set vertical spacing (8,7 lpi)

\el8.7;

  1. set horizontal spacing (17.0CPI)

\ec17.0;

  1. set top/left margin (0.5cm/1.5cm)

\eMT283;

\eML850;

  1. This Format is for PDF Printing Reports

Try as per your required format

********************************************************

While converting the output to Spool use the newly craeted format for sending to spool later convert the spool to PDF using the report RSTXPDFT4 and you will find the difference.

BR,

Rajani

0 Kudos

Hi Prashanth,

Yes I tried with less size even with 132 but the result is same.

Hi Rajani,

Let me try that option. But where are we mentioning the font size in this below code?

Thanks to both of you for your response.

Regards,

Swarna Munukoti

Edited by: Swarna Munukoti on Aug 4, 2010 12:52 PM

0 Kudos

Hi Swarna,

Goto SE38 & execute report RSTXPDF3. Check for parameters :-

FLATE_COMPR_OFF

COMPR_PAGECONT

If they are ON, change to OFF or vice-versa. Also check for other parameters. Let us know what are the values for all the parameters listed under the report.

Thanks,

Best regards,

Prashant

0 Kudos

Hi Swarna,

The font name & font size Options:

#set font name

\eFAngsana New;

  1. Schrift 6.5 Punkt einstellen.

\eS130X

Best Regards,

Rajani Kanth

0 Kudos

Hi,

I have a similar problem can you help me out pls. I have tried all these formats ex:'X_65_132'."'LEGAL'."'LETTER'."'X_65_255'. no use I could satisfy customer. Customer needs LETTER format to be as PDF. but font size is really very small. Can you please help me out with solultion approach. Thank you.

Best Regards,

Babu

0 Kudos

Hi Swarna,

I am also facing the same issue. Please let me now how could you resolve this. Thanks.