This topic contains 3 replies, has 0 voices, and was last updated by TheUsualSuspect 6 years, 10 months ago.

  • Author
    Posts
  • #18192

    dceraso

    All,

    I am trying to create a script (suite script 2.0) that uploads a file via html 5 form file attachment. During the upload process I would need the script to auto-insert a watermark logo (will utilize a java script plugin for this) and then upload the image to the sca_images directory in my file cabinet. Does anybody have any example or can they point me in the right direction on this process? I wrote a script but i dont think it is going to hit the mark.

    Also a question I had is the HTML 5 form would be is the form on the web (live site) or would it be only available on the back end net suite side which would authenticate with net suite login info?

    Sincerely,

    Dominic.
    This is a cached copy. Click here to see the original post.

  • #18193

    TheUsualSuspect

    You could upload the files to a directory in the file cabinet then using a scheduled process utilize the advanced PDF tool to create a pdf that uses this image as its sole content with a watermark. Would this work? I could find sample code if it’s in the right ballpark.

  • #18194

    dceraso

    If you could find some sample code – I would be interested to see that process. It sounds like it is right there where I need to be. Thank you very much.

  • #18195

    TheUsualSuspect

    Sorry this is the best I can do for the moment

    For the watermark:

    http://bfo.com/products/report/docs/tags/

    Go to macro on the left under the heading tags

    Code:

    My Watermark Text

    The Document Body

    For the image:

    I found this sample from a NetSuite SuiteAnswers page: 28432

    Code:
    // –Get the URL of the PDF file
    // –Escape characters for XML
    var pdf_fileURL = nlapiEscapeXML(‘/core/media/media.nl?id=5860&c=TSTDRV570139&h=b525d5f23455ee07 cc24&_xt=.pdf’);

    xml += “”;
    The page is actually about making a pdf with multiple pdf’s enclosed but one of the examples is a pdf with an image source

    You’ll definitely need to play around with these and figure out how to combine them but it should work.

You must be logged in to reply to this topic.