The default setup when using this PDF feature is that it creates a separate PDF file for each label page. For instance, if I have 45 labels, it generates 2 PDF files: Label_page_1.pdf and Label_page2.pdf.

I would like to create 1 PDF file with two documents inside. For instance, All_pages_of_Labels.PDF.

The Public Notification widget uses the Download_Avery.js file which uses the jsPDF library, to help generate the PDF files. After a spending several hours on this, I was able to create a configuration setting that allows me to toggle the PDF settings to allow each page to generate as its own PDF file or have multiple pages of labels inside one PDF file.

The code in the Download_Avery.js does not allow for this. So some small changes had to be made to accommodate for the toggle option. On another note... I'm really impressed with how the web app builder operates behind the scene.

The Public Notification widget uses the Download_Avery.js file which uses the jsPDF library, to help generate the PDF files. After a spending several hours on this, I was able to create a configuration setting that allows me to toggle the PDF settings to allow each page to generate as its own PDF file or have multiple pages of labels inside one PDF file.

The code in the Download_Avery.js does not allow for this. So some small changes had to be made to accommodate for the toggle option. On another note... I'm really impressed with how the web app builder operates behind the scene.

Yes, there is a Print Settings to Export the map as a PDF, that uses esri print web services. But there is also a built-in Avery Label generator that generates PDFs and that uses the jsPDF library. It was my fault for not being clear.

Thank you for posting this find. Any possibility that you could share this bit of code? At the very least, could you point me to where in the JS file that I could just hard code it to only use multiple pages as an option, even though there may only be one page? I'm trying to move to this widget from the old javascript app and I keep finding these little things that make it less likely for the end user to switch over because you are asking them to do more work.

Here's a snippet of code to get you started. Below is at the beginning of the Download_Avery.js code. If you read my comment in the snippet, it explains more. The 'labelMultiPagesPerPDF' you won't see in your copy because I created this parameter to be set in the config.json file, so I could turn the multi-page on or off. Basically, the 'pagesPerDoc' controls this. My comment also says, to set 'useVectorFonts' to true. This is a default setting in the config.json file under the 'notificationSettings' then the 'labelPageOptions' json nodes. You don't need to add the parameter to the config, feel free to hard code the changes.

Hey Mike, this is a great start. First I was thrown off because the JS file that I was seeing is from the latest release. The code is completely different now. I was doing a search for those parameters (like "labelsPerPage", "pagesPerDoc", etc.) but they do not exist. Fortunately, I found an older copy of the JS file that has the same code structure has your screenshot. Just so you are aware. Also, I'm not using the Developer Edition. I'm creating the app through web appbuilder inside of Portal and, after creating the initial app, I'm downloading so I can use it on straight from the server. I'm not sure if this is part of the difference in the code or not.