13 Replies Latest reply on Dec 5, 2016 8:20 PM by Lee CS Young

    PDF Task – Combining files

    Craig Lalumiere

      Has anyone figured out a way to combine the PDF files to one file when executing the PDF task in EPDM? We have multiple sheets that go through the process, to be checked by another person. We like checking PDF’s because you do not need to have SolidWorks to check a file. This is key, mangers that are on the road to review and make comments on drawings. Combining them makes a checking packet of sub-assemblies and avoids the user the hassle and time of opening and saving each file individually and files getting missed. As of now we have EPDM create the PDF files and manually combine them to one file.

       

      We would like to create the PDF’s then combine them all together. Has any else done this yet?

        • Re: PDF Task – Combining files
          Tom dunn

          If I am understanding your question. You want to create a pdf file from your pdm  from a drawing which has multiple sheets? The way ours works when you hit print you select pdf and window pops up and under print range you have to hit "all sheets" then ok. The pdf is created with multiple sheets.

           

          Maybe I am way off track?

            • Re: PDF Task – Combining files
              Craig Lalumiere

              Thanks for the reply Thomas,

               

              But that is not exactly what I am looking for. We do single sheet drawings due to rev control and model size.  I would be releasing multiple single page drawings to PDF's at the same time.

               

              The feature you talk about above works great when you have multiple sheets in one drawing but not multiple drawings to one PDF.

               

              Craig

              CEPA

            • Re: PDF Task – Combining files
              Jeff Sweeney

              I've investigated doing this a few times, just never gotten around to doing it.

               

              I think it has be done with an add-in connecting to PDFSharp or other PDF creating libraries.

              • Re: PDF Task – Combining files
                Jeremiah Davis

                Just ran across this.  My apologies, but it was posted during a time when there was quite a bit on my plate.

                 

                Yes, I have done this very thing.  I had a customer that wanted a PDF packet created from an assembly file, open the assembly file, open the drawing of that file, then start navigating the tree, opening every component, sub-assembly, sub-assembly's component, all the way down.

                 

                Once the PDF's were created, we merged them with a little piece of software called iTextSharp (this is an older version, but it worked flawlessly).

                 

                For EPDM, I wrote it as a Task using the SolidWorks Task Add-In to create the PDF files, then called a stand alone program to merge them together.

                 

                If you are interested, I can dig up the code, clean out all of the customer specific information and pass it along.

                  • Re: PDF Task – Combining files
                    Craig Lalumiere

                    Jeremiah, That would be amazing!

                     

                    Right now we are doing it as a manual process. Any automation would help!

                     

                    Please let me know it there is anything I can do.

                     

                    Craig

                      • Re: PDF Task – Combining files
                        Christopher Estelow

                        Craig,

                           I use PDF Binder to combine my pdf files which is located here.  I know if uses iTextSharp that Jeremiah referred to to combine them.  As far as automating it I'd imagine there would have to be some code written.

                         

                        Chris

                          • Re: PDF Task – Combining files
                            Craig Lalumiere

                            Chris,

                             

                            We currently use PDF mate to combine ours, but it is a manual process of our engineering staff to select all the files and then combine them and check the file into the vault.

                             

                            The way I understand Jeremiah, is that he has code written (like you talk about) to do this task automatically and not waist the users time to do it manually. I dont care what program we do it with.  Just that we can save time and mistakes it EPDM does it itself

                             

                            Craig

                          • Re: PDF Task – Combining files
                            Jeremiah Davis

                            Here is the Visual Studio Project Files along with the SolidWorks Macro files.

                             

                            As setup, it requires a folder on the logged in user's desktop called "PDF Packet Print".  Inside that folder are 2 folders, "Combined" and "Output".

                             

                            The SolidWorks Macro is run on assembly files.  It starts by finding that assembly's drawing, then grabbing the components in the assembly and finding each component's drawing.  It requires the drawing for each file be in the same folder and with the same name.

                             

                            There is the .SWP SolidWorks Macro file along with a .TXT file containing the same code.

                             

                            I offer no guarentees with this code.  If you run into problems with it, I will do what I can to help out.  But I can't promise it will work in all scenarios with all systems.

                             

                            The .dll for iTextSharp is located in the \bin\Debug directory.  It should be properly referenced in the solution.

                             

                            Once the MergePDF.exe is compiled, drop it into the "PDF Packet Print" directory along with the iTextSharp.dll.

                             

                            You will also notice that the SolidWorks Macro is written in such a way that a quick switch of the comment out/in on the "Set swModel=" lines will turn it into an EPDM task using the SolidWorks Task Add-In, quick and simple.  And once it is a task, it can be run in the Right Mouse Button menu.

                             

                            Feedback is always appreciated as are suggestions for making this better.

                        • Re: PDF Task – Combining files
                          Chris Saller

                          We use Adobe Pro for combining PDF's.