cancel
Showing results for 
Search instead for 
Did you mean: 

PDF generation error(Interactive form)

Former Member
0 Kudos

Hello expert,

I got below error while clicking one button "Export PDF"

com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: IOException occured while creating template stream from the TemplateSource : ./temp/webdynpro/public/pasteur.com/ilots~app~evtqal/webdynpro/Components/com.pasteur.ilots.app.evtqal.component.ilotscomp.IlotsComp/V_PDF_Files_SynthesANO_Lot.xdp (No such file or directory)

Code in onaction button

public void onActionShowPDF(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

  {

    //@@begin onActionShowPDF(ServerEvent)

            // Permet de masquer tous les PDF de la vue V_PDF_Files

            wdThis.wdGetCust_IlotsController().setPDF_Visibility();

            // Gestion de l'affichage

            if (wdContext.currentDesignElement().getSearchType() == 5) {

                  wdContext.currentPDFElement().setRechTW_Ano_Anomalie(

                        WDVisibility.VISIBLE);

            } else {

                  wdContext.currentPDFElement().setRechTW_Ano_Lot(

                        WDVisibility.VISIBLE);

            }

            //    Ouverture de la PopUp des fichiers PDF         

            IWDWindowInfo pdf =

                  wdComponentAPI.getComponentInfo().findInWindows("WPDF");

            IWDWindow pdf_Window =

                  wdComponentAPI.getWindowManager().createModalWindow(pdf);

            pdf_Window.setTitle("Export PDF");

            wdContext.currentPopUp_PDFElement().setWindow(pdf_Window);

            pdf_Window.setWindowPosition(20, 10);

            pdf_Window.show();

    //@@end

  }

Can anyone please help me

Thanks in advance

Regards,

Fayaz Shaik.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello ,

Issue hasbeen resolved .

Problem is XDP file is removed from SRC folder.

Regards,

Fayaz Shaik

Former Member
0 Kudos

Hello Experts,

Can anyone please help me.

Error is saying :  IOException occured while creating template stream from the TemplateSource

I have seen template source is exist in folder.

Can anyone please tell me the possible reasons for the error.

Thanks in advance

Regards,

Fayaz Shaik.

Former Member
0 Kudos

Hi,

Above action code is setting the Visibility and creating window for PDF display.

Check the code in the view attached to WPDF window.

Check the Template Source directory, if it is maintained seperately as the per the RunTime Exception.

Former Member
0 Kudos

Thanks for your reply.

In view there are many interactive forms cretead and one visibiity attribute  for each.

In our case below visibility is set it is visible.

wdContext.currentPDFElement().setRechTW_Ano_Lot(

                        WDVisibility.VISIBLE);


Can please tell me where can i check template source directory because as it is saying no file or directory found

Regards,

Fayaz Shaik.