04-15-2009 6:57 AM
Hi All Technical/Functional Masters,
We are developing some transactional reports in ISU. this report has 20 columns to be printed. On screen, display is not a problem but client has a requirement to download this report in PDF format and wants to print on A4-paper in Landscape. Although we have managed to accommodate all the columns on A4 paper but have to compromise with font size that are very small and not visible. If we download the report in excel format we are able to maintain the font size 8 and accommodate all columns after little format but same in PDF is a problem.
Can anyone tell whether we can increase the font size and change font type(from SAP standard to 'Arial') before sending the output in PDF ? Is there any property or utility that can be changed or used for this purpose.
04-15-2009 7:44 AM
Useful link for converting report to PDF.
http://www.cutepdf.com/Products/CutePDF/writer.asp
Regards,
Siva
04-15-2009 8:17 AM
Thanks Siva, but my question is different.
We are using two FM in SAP convert_abapspooljob_2_pdf and gui_download to create spool and download/convert in PDF.
We want to change font size and font type before sending data in spool.
Regards
Ghanghor Singh
04-15-2009 2:14 PM
Hi,
The font size is unique as customized in SAP. You can't change it based on the requirement.
However, If it be a smartform or SAP script, you could have done it. But Its a report so no.
Thanks,
Jyoti
04-16-2009 11:25 AM
Hi G.Singh
Its is posible with the help of PRINT-CONTROL statement.
check this link: http://sap.ittoolbox.com/groups/technical-functional/sap-dev/can-we-change-the-font-in-abap-report-2...
check this : http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba62335c111d1829f0000e829fbfe/frameset.htm
check this forum: https://www.sdn.sap.com/irj/scn/forums
plz check all the links and take help how it is work.
Thanks & Regards
Mandeep Kaur
04-27-2009 8:08 AM
04-28-2009 5:50 AM
Thanks for your help Mandeep...............but we are still not able to increase the font size in pdf file.
Actually one function module is creating spool and second is converting this spool into pdf file. We tried your solution but it did not work. We changed the printer and format type many times but all in vain.
Thanks again..
06-02-2009 9:40 AM
Dear SING,
If you want to convert spool to PDF (ABAP List) and modify font size. I suggest you looking for FM: CONVERT_ABAPSPOOLJOB_2_PDF and mofdify form pdfcnv_convertlist in "LSTXWFPL" or "LSTXWFPD" for OTF to PDF.
Page format type "ANY" (X_65_80,X65_255, etc..) will be convert to size A4 width (8.27") x LETTER height (11"). You can change page format via
1. Change page format out (Calculate size by TWIP)
for pageformat ANY, use A4 width, LETTER height
if pdfcnv_listinfo-orient = 'L'.
pageformat ANY, use A4 8.27" width
pdfcnv_listinfo-pageh_tw = 11906.
pageformat ANY, LETTER 11" height
pdfcnv_listinfo-pagew_tw = 15817.
pageformat ANY, LETTER 14" height
pdfcnv_listinfo-pagew_tw = 20160.
else.
pdfcnv_listinfo-pageh_tw = 15817.
pdfcnv_listinfo-pagew_tw = 20160.
pdfcnv_listinfo-pagew_tw = 11906.
endif.
and
if pdfcnv_listinfo-pageformat = pageformat_any.
for pageformat ANY, use A4 width, LETTER height
if pdfcnv_listinfo-orient = 'L'.
pageformat ANY, use A4 8.27" width
pdfcnv_listinfo-pageh_tw = 11906.
pageformat ANY, LETTER 11" height
pdfcnv_listinfo-pagew_tw = 15817.
pageformat ANY, LETTER 14" height
pdfcnv_listinfo-pagew_tw = 20160.
else.
pdfcnv_listinfo-pageh_tw = 15817.
pdfcnv_listinfo-pagew_tw = 20160.
pdfcnv_listinfo-pagew_tw = 11906.
endif.
endif.
2. Seek keyword fontsize=120 and reduce it to < 100
3. change calculate fnt size
*fontsize = ( charwidth_tw * 120 ) div fontcharw_tw.
fontsize = ( charwidth_tw * 100 ) div fontcharw_tw.
Best Regads,
Suwatchai
06-12-2009 8:57 AM
Function Module : CONVERT_ABAPSPOOLJOB_2_PDF
Include : THSTXWFPL
*----
for modify font size
decrease fontsze foncharacter will increase
fontsize = 120. <-- Change
fontsize = 100. or fontsize = 80
Depend on your logon lang. My case logon 'TH' or 2. I modified font ZCORDIA (refer CordiaNEW thai font)
*----
if is_cascading is initial.
case language.
when '0'. "Serbian
font = 'COURCYR'. devtype = 'SAPWIN'.
when '1'. "simpl.Chinese
font = 'CNHEI'. devtype = 'CNSAPWIN'. cjklang = 'X'.
when '2'. "Thai
font = 'THDRAFT'. devtype = 'THPDF'.
font = 'ZCORDIA'. devtype = 'ZMTHSWNU'.
font = 'THANGSAN'. devtype = 'ZPDFUC'.
when '3'. "Korean
font = 'KPSAMMUL'. devtype = 'KPSAPWIN'. cjklang = 'X'.
when '4'. "Romanian
font = 'COURIER'. devtype = 'I2SWIN'.
when '5'. "Slovenian
font = 'COURIER'. devtype = 'I2SWIN'.
when '6'. "Croatian
font = 'COURIER'. devtype = 'I2SWIN'.
when '8'. "Ukranian
font = 'COURCYR'. devtype = 'SAPWIN'.
*----
Add font Cordia Thai
SE73 --> Fon familia --> ZCORDIA
Load Font Cordia thai to system
SE38 --> RSTXPDF2UC
load CORDIA.TTF
SE73 --> printer font --> 'ZMTHSWNU'
Add ZCORDIA font and copy AFM Metric from = 'THDRAFT'. devtype = 'THPDF'.
Modify AFM
example
*----- OLD--
StartFontMetrics 2.0
sapFamily ZCORDIA
sapHeight 000
sapBold false
sapItalic false
StartCharMetrics 0183
WX 0500 ; N space ;
WX 0500 ; N exclam ;
WX 0500 ; N quotedbl ;
WX 0500 ; N numbersign ;
WX 0500 ; N dollar ;
WX 0500 ; N percent ;
WX 0500 ; N ampersand ;
*--
StartFontMetrics 2.0
sapFamily ZCORDIA
sapHeight 000
sapBold false
sapItalic false
StartCharMetrics 0183
WX 0375 ; N space ;
WX 0375 ; N exclam ;
WX 0375 ; N quotedbl ;
WX 0375 ; N numbersign ;
WX 0375 ; N dollar ;
WX 0375 ; N percent ;
WX 0375 ; N ampersand ;
Result : decrease space between character. Then Your PDF will have BIGGER FONT.
Rdgs,
Suwatchai
10-14-2013 11:51 AM
We customized a report. To download a report Its taking more than 15 minutes . Due to that its creating ABAP Runtime Error.