This topic contains 4 replies, has 0 voices, and was last updated by chanarbon 8 years, 1 month ago.
-
AuthorPosts
-
October 17, 2016 at 8:23 am #1678
JacksonPIs there any way in Netsuite to Concatenate PDF Files together? I have 100 PDFs in a folder, that I want to concatenate together into one large File. I wanted to create a script to easily do that to build into the file cabinet. I have a workflow that can create a bunch of pdfs easily, just not together. Any Ideas?
Code:
function(record, file, render) {function onAction(scriptContext) {
var objRecord = scriptContext.newRecord;
var invoicePdf = render.transaction({
entityId: objRecord.id,
printMode: render.PrintMode.PDF
});invoicePdf.folder = 5169576;
invoicePdf.save();
}return {
onAction : onAction
};
});
This is a cached copy. Click here to see the original post. -
October 17, 2016 at 9:07 am #1679
david.smithSave your XML to a folder. Then you can concat them together with the script and output the one file. If you still need the individual PDFs you can still save them as well.
I don’t know a way you can combine the PDF files.
-
October 17, 2016 at 9:12 am #1680
JacksonPAlright, I’ll look into that, Thanks!
-
October 18, 2016 at 12:09 am #1681
Infinet Cloud SolutionsAs per David its not possible to concatenate PDF files. Whilst not solving the problem exactly, I would like to see an extension of the file module to allow the generation of a zip file from one or more files from the file cabinet (or file objects).
-
October 19, 2016 at 1:16 am #1682
chanarbon@Infinet Cloud Solution,
For your concern, you can use JSZip for this concern to zip a a certain number of files. The only concern you can get with JSZip library is that is uses a number of instructions which makes it a lot better used in Map/Reduce
-
AuthorPosts
You must be logged in to reply to this topic.
