19 Replies Latest reply on Jan 4, 2014 3:15 PM by Lee CS Young

    map PDF custom prop to variable?

      I am trying to map existing custom property values from legacy pdf files to variables within epdm via a data card but so far I am unable to get the mapping to work. I have tried this morning to do this using every standard Block Name provided in the epdm Edit Variables UI but nothing seems to work.



      Unfortunately I found a similar post here on this forum where another person was having this exact same problem and there did not seem to be a solution at that time (2009).


      How are other people doing this? This seems pretty simple and straight forward and I would ASSume would be a very common task faced by organizations moving to epdm.



      Thanks for any help you may be able to provide.


        • Re: map PDF custom prop to variable?
          Michael Dekoning

          Since it is not possible to map variables to PDF properties we make our users fill them out in the data card. Looking at the What's New in EPDM 2011, it appears that the ability to do this is still not being implemented.



          EPDM 2010 SP2

          • Re: map PDF custom prop to variable?
            Charley McGowan

            Any updates on this? I've been having the same problem. None of our data is saved on the data card and I feel it's because the variables are mapped incorrectly.



            • Re: map PDF custom prop to variable?
              Charley McGowan

              Well I have a small step in the right direction, I found that if you have these settings, the description will stay! (or whatever variable you want it to be. Make sure Block = description, and Attribute = Title


              description title block.jpg

                • Re: map PDF custom prop to variable?
                  Charles Culp

                  So I'm digging up an old thread, but I am trying to use a Task to export a PDF outside the vault and pass some variables with it.


                  Based on this post, I assumed it was possible, but so far I have been unsuccessful. With my tests I save it to a location in the test vault. I use a Task, it pulls the variable from the existing slddrw, then saves it to the Destination Variable. The destination variable shows up on the card, but does not show up inside the PDF.


                  Now, the above post was about pulling IN the description field, so is that the problem? Is anyone else doing this?

                    • Re: map PDF custom prop to variable?
                      Brian Dalton

                      Has anybody contacted SolidWorks (through their VAR) and asked them directly whether there's any way to map a PDF or not?  Seems like the speculation is getting nowhere, time to just ask the folks who are responsible for the product.

                        • Re: map PDF custom prop to variable?
                          Wayne Marshall



                          It isn't possible as there is no File Format Plugin for PDF files within EPDM. We have one for Office files, Outlook msg files, XML and ini files. For CAD SolidWorks, DWG (and other CAD plugin supported files) plus we can grab some limited information from certain image files (e.g. CALS Raster files). There is not currently a File Format Plugin for Adobe PDF which uses 'PDF Properties' as it's Custom Property container.


                          There is an 'Open' SPR (Enhancement Request) for this functionality. I would love it to be implemented so would urge anybody asking for this capability to ask their VAR if they can be added to the notifictaion list for it (and increase it's weighting as a result). The SPR number and description is as follows:


                          SPR # 384114: Should have a PDF plugin that can read and write custom properties in PDF files


                          Fingers crossed!


                          Wayne Marshall

                          Solid Solutions Management

                            • Re: map PDF custom prop to variable?
                              Charles Culp

                              So, with MS Office 2010, I can export the Title, Author, Subject, and Keywords, as shown below. These are not Adode PDF "Custom Properties", which are a different tab.




                              Since MS Office can write to this, is there a way to do this with a custom script in the Task, or just with the EPDM variables? I have attached the PDF. If you do a text search in this PDF (open in WordPad) you can see that these are object markup entries. There must be a way to make this work...


                              Specifically, if I can use the "keywords" field, just like above, I can just dump out the variables I need in that single field as semi-colon separated values.



                              7 0 obj

                              <</Title(Title1) /Author(Charles Culp;Author2) /Subject(Subject1) /Keywords(Tag1;Tag2;Tag3) /Creator(þÿ M i c r o s o f t ®   W o r d   2 0 1 0) /CreationDate(D:20140103111102-06'00') /ModDate(D:20140103111102-06'00') /Producer(þÿ M i c r o s o f t ®   W o r d   2 0 1 0) >>



                              Here is something that SolidWorks outputs:


                              3 0 obj

                              <</Author(ESSEXHQ\\cculp \(FP2QFQ1\))/CreationDate(D:20131217141158-06'00')/Creator(SolidWorks 2014 SP1.0 \(2013317\))/ModDate(D:20131217141158-06'00')/Producer(SolidWorks PDF Publisher)/Title(460305_deleteme)>>


                              So what gives? More reading: http://stackoverflow.com/questions/2850671/why-do-custom-file-properties-set-using-the-dsofile-library-not-persist-after

                                • Re: map PDF custom prop to variable?
                                  Charles Culp



                                  For the record, the PDF document properties (left) have nothing to do with the SolidWorks Summary Information (right).

                                    • Re: map PDF custom prop to variable?
                                      Josh Brady



                                      After a brief investigation, it appears that PDF metadata (custom properties) is stored in an XML format called "XMP", created by Adobe and later turned into an ISO standard.  Office custom properties are stored differently, accessible using dsofile (and office, of course). Dsofile can add similar custom properties to a PDF (tested and confirmed), but they will be stored the way Dsofile can read them.  Adobe reader can't see those properties.  When Word saves a doc as a PDF, it puts the document properties into the XMP format, so Dsofile can't see them in the PDF file.


                                      I did a very quick search and didn't see any .dll type tool similar to Dsofile for reading/writing XMP metadata.  However, I'm pretty sure it could be figured out/implemented.


                                      I'm not sure I completely understand the workflow you were going for, possibly because I'm not so familiar with EPDM... Are you wanting to (ideally) hit a button in PDM and spit out PDFs based on the checked-in .slddrw, with the PDF's custom properties filled out per the EPDM info?  Not having EPDM, I'm not sure I could do anything to achieve the ideal although since (I think) there's an API for EPDM I imagine it would be possible.


                                      Stepping down a bit from the ideal, it may be possible to get a "one-more-button" type solution. You said that the "destination variable is on the card" or something like that.  Does that mean that the data gets "created" somewhere outside of EPDM in some sort of text file report, or is this "card" still only in EPDM?  If there is some sort of text file or something that is generated, it should be possible to use an external script to parse the text file and add the info to the PDF.


                                      Sorry, this may not be any help at all...

                          • Re: map PDF custom prop to variable?
                            Andrew Dvorak



                            I too would like to place legacy info on a PDF datacard that I have already vault, but I don't see how either. You will find that a PDF data card can be filled out automatically if it's created using the Convert task. The task allows you to map properties from the source to the destination, so anything in the drawing properties can be picked up.


                            Andy Dvorak