This website is not affiliated with, sponsored by, or approved by SAP AG.

Wrong layout converted from sapscripts to PDF

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Wrong layout converted from sapscripts to PDF

Postby vilks » Mon Nov 22, 2010 8:28 am

Hello SAP guru.

1. I have sapscript Z layout and I was required to convert and download this sapscript layout to PDF file. ( Not SPOOL !!!! )
2. To approach this I have used FM
Code: Select all
CALL FUNCTION 'CLOSE_FORM'
   TABLES
   OTFDATA = DATAB[]

and then
     CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
                FORMAT = 'PDF'
     IMPORTING
          BIN_FILESIZE = BINFILESIZE
     TABLES
           otf = DATAB[]
           lines = PDFTAB[]
and

CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = binfilesize
FILENAME = 'D:\myfile.pdf'               (   here, instead of D: I download the file into network system - not local PC )
FILETYPE = 'BIN'.


the file has been created successfully, BUT

there are number of problems in created PDF file:
1. font differs from sapscripts font
2. data has been slided out of PDF form
3. lines slided out of PDF form

Please, advice how I can solve the problems.
Thanks,
regards,
Daniel
Last edited by Baz on Mon Nov 22, 2010 8:49 am, edited 2 times in total.
Reason: code blocks added.
vilks
 
Posts: 5
Joined: Wed Mar 17, 2010 11:46 pm

Re: Wrong layout converted from sapscripts to PDF

Postby sapfans_user » Mon Nov 29, 2010 10:13 am

Its been a while, but I think whenever I used to get problems with PDF conversion,
I used to resort to program RSTXPDFT4.
I let SAP Script or Smartform generate a spool without immediate output,
and then program RSTXPDFT4 converts the spool to PDF.
sapfans_user
 
Posts: 200
Joined: Thu Oct 05, 2006 12:50 pm

Re: Wrong layout converted from sapscripts to PDF

Postby YuriT » Mon Nov 29, 2010 10:28 am

Hi,

As a wild guess I would check ITCPO printer settings while calling OPEN_FORM and make sure those are the same when you do it without actual output. Could be that printer is what makes your form look good on printout.

Yuri
YuriT
 
Posts: 885
Joined: Fri Feb 03, 2006 6:40 am
Location: Basel/Riga


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 2 guests



cron


This website is not affiliated with, sponsored by, or approved by SAP AG.