Solved

Save As PDF Error


Badge +7

Hi,

 

i'm using Save As PDF control to save a pdf file of my veiw on k2 cloud trial but i got this error below

 

The PDF could not be saved.
 
  • Type:
    SourceCode.SmartObjects.Client.SmartObjectException
  • Message:
    Failed to convert HTML to PDF. Failed to convert URL to PDF. Could not render the PDF document. Array dimensions exceeded supported range.. 
  • Source:
    SourceCode.Forms.Controls.Web
  • Method Base
    • Member Type:
      Method
    • Name:
      ExecuteSaveAsPDFMethod
    • Module
      • Scope Name:
        SourceCode.Forms.Controls.Web.dll
    • Declaring Type
      • Full Name:
        SourceCode.Forms.Controls.Web.SaveAsPDFRequest
  • Stack Trace:
    at SourceCode.Forms.Controls.Web.SaveAsPDFRequest.ExecuteSaveAsPDFMethod(SaveAsPDFRequest request)at SourceCode.Forms.Controls.Web.SaveAsPDFHandler.ProcessRequest(HttpContext context)

 

Kindly assist with this.

 

Thank you

icon

Best answer by DMI 11 May 2020, 10:49

View original

3 replies

Badge +7
Issue resolved!
Userlevel 4
Badge +13

Hi  @DMI007 ,


 


That's great to hear! Would you care to share how you managed to resolve the issue?


 


 


Cheers,


Kimberly 

Badge +7

Hi  @lkimberly ,

 

My apology for not sharing how i resolved this and also thanks for bringing this to my remebrance.

 

Resolution.

 

I have two rules, one is an unbound rule and the other is a control rule.

Steps

1. Drag in the Save As PDF control on the View

2. Drag a textbox contol and file attachment control on the View

3. i have an unbound rule named as Get PDF.

4. Select Excute a control's method, pick Save As PDF control, method save PDF. Image attached

5.  Put in your input parameters. Image attached.

6. Out put the Save As PDF control into the textbox you have on the view (item 2). Image attached

7 Add another rule "When Save As PDF is Complete". Image attached

8 Excute a SmartObject Method, Pick the PDF SMO excute a load method. Image attached.

9. Input ID  parameter is the Save As PDF control

10. Ouput the File Attachement on a file attachment control on the view (Item 2).

11. Call the rule "When Save As PDF is Complete" in Get PDF (item 7 in item 3).

12. When button is click rule then call the Rule Get PDF rule

 

 








Reply