Generate PDF file of html in Node.js - node.js

I have a customer detail form page in which customer will enter his/her detail and click submit button.
After clicking, data is submitting in mongodb using node.js. Now I want to generate the PDF file of the entered data at the same time when click on submit button.
Can anyone suggest me how to generate PDF file when click on button.

You can use PDFKit if you want to make your own formatting or node-html-pdf if you just need to convert your HTML into PDF

Related

Need to create a column in sharepoint that has attachments

I have created the below list in sharepoint with attachments enabled. When i add a new item I see the attachment option but I dont see a column for it.
enter image description here
And I want to sent an email to the approver to approve along with the file attachment that was added while creating the item. I added the link item and the item link decription dynamically as in the pic below. But it sends the whole list item instead of the document alone. So when the link is clicked the complete list items are displayed along with the attachment. I then have to click the attachment and then it will take me to the file. But I want the link to take me directly to the file.
enter image description here
I checked youtube videos and they have the beginning column as a document file column with a document icon with upload option on the top. But I dont find any upload option in my sharepoint. The below image was taken fro a youtube video which has upload option
enter image description here
I have made certain column inputs mandatory while adding a new item. Will that make a difference?
Please following steps:
Add Attachments on the list
1.You can click on + Add column and select Show/hide columns
2.On the Edit view columns panel, find and check the Attachments checkbox
3.Click on Apply
Send email with attachments
1.Create Microsoft Flow
2.Save and Test it

Send Selected File Information to SharePoint Form in Dialog Box

I currently have a custom button in my SharePoint 2013 ribbon which should open a dialog box with a form. The button is only enabled when two or more files are selected. I would like to know how to send information about the selected files to the form.
You can send the selected files/item information to the form using query string parameters.
When u add custom action, in element.xml there is CommanUIHandler element in which you can define tokens as query string parameters to be replaced when custom action is clicked.
{SelectedItemId} and {ItemId} tokens can be your use.
Refer http://msdn.microsoft.com/en-us//library/ff458385.aspx

Javascript Calendar popup from ribbon button

Does anyone have any examples of a calendar popup that can be triggered using a ribbon button on a form?
I'm looking to have a popup where the user can select a date from the calendar which will then pass the value back to the javascript that launched it. I've seen that this can be done from a html popup but my efforts to create this so far haven't really been successful, so was hoping someone could advise me on the best solution.
Thanks
I've managed to find a good calendar that I have used for this solution. It can be found at https://github.com/dbushell/Pikaday
With this I put it into a html popup that had a text box on it (which would store the selected date) and had the javascript on my ribbon button show the popup.
The download includes the js files for the calendar to function and with a little tweaking of these you can make the calendar appear immediately on opening of the popup and not hide when a date is selected. Plus the text box can have its options changed so that it isn't visible to the user.
All put together this creates a rather pleasant looking calendar popup
You can use the date parameter type from html without using javascript
<input type=date >

Convert only 1st Word document page to PDF

I'm using Office 2010 interop and C# 4. How can I convert just the 1st page of a word document to PDF? This question ("How do I convert Word files to PDF programmatically?") helped me to get started but it only shows me how to save the whole document as PDF.
Is there a way:
to save just the 1st page as PDF? (most ideal option)
delete all remaining pages and then save as PDF?
How do I go about doing it?
You can click on Save As, change the type to PDF, and above the "save" button, you have an option button. Click on that, and you should have the choice to select which pages you want to convert to PDF.
Use the SaveasPdf option and save the entire document to Pdf.
To get the first page you can use PDFSharp opensource library for processing PDF using C#.
Here is an example to split pdf documents.
In case it's helpful for someone, in Word 2016, select Save As option, choose PDF as the file format, on this same window once you've done this a new button 'Options' then will appear to the left of the OK button, click on this and choose the page range that you want save.
Using Document.ExportAsFixedFormat is more like it -> MSDN
Then you simply write something like this:
doc.ExportAsFixedFormat(path, WdExportFormat.wdExportFormatPDF, Item: WdExportItem.wdExportDocumentWithMarkup, CreateBookmarks: WdExportCreateBookmarks.wdExportCreateHeadingBookmarks,
Range: WdExportRange.wdExportFromTo, From: 1, To: 1);

Missing data in Text box in a infopath 2010 form

I have a infopath 2010 form with a table and couple of text boxes and this form is configured to submit a email with the form in the body of the email.
The form is opened in a browser and I am able to add text and submit the form and I see the email. But the form ( with data ) in the body of the email has lost formatting and the text field on the form was set to a width of 100% and as a 'Multi line ' text and I see that the data in the text field as we see on the email body is chooped off.
I am having issues controlling the format of the form as we seen in the browser and they way it shows up on the email body.
Any help is appreciated.
Sri
I have had this problem to. The way that I got around this is by creating another view for the form and then having the exact same layout but changing all the controlls so that they are calculated fields this then seems to give you the values.
thanks, Jack

Resources