cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Drawings as PDF - Quick way to download them?

SteveVinyard
1-Newbie

Drawings as PDF - Quick way to download them?

I have my drawings being published as a PDF by my Pro/e CAD worker. This is fine but in the end my users really need to be able to quickly download or email the PDF. Currently the only way to get the PDF out is to do the following:
1- Go to Drawing Details Page
2- Select "Display Representations List"
3- Click Actions>Save Representation
4- Save Representation out as .zip file to desktop
5- Extract PDF from .zip file and email etc

WAY to much work...does anyone know of a more efficient way to do this?
96 REPLIES 96

Hi Steve

In collaboration with NaJaNaja we came up with a product by name "Content
Collaborative Framework" for meeting requirements as yours. The product has
numerous potential features in content collaboration space. Please refer the
attached document for salient features of the product. Please let us know if
you need more details or a live demo.



Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect

973 216 0456(M); 973 324 2729(W); 866 908 6561(F)

swamy.senthil@swasen.com

Swasen Inc (

Somehow the message became hyperlinked & the attachment wasnt attached (unless my browwer went IE crazy), so I attached again. L Jett

Awesome thanks Lawrence. Its one of the things where we need basic users to be able to search or browse for an object, pull up its details page and then download the PDF viewable that was published for it (drawings are published as pdf).

Ideas?

I imaginesome onecould createa jsp that would take the object & download its associated drw pdf, plt, etc.

It would need to prompt the user for download location & thendownload.

You then have to add the jsp to the details page action menu.

Most the code in the java that I provided could be used, with more code for download location selection, etc.

But it would be lengthy time to generate this code, then update details page to insert (which I have done, but surely have forgotten & would have to search for my notes on it).

Lengthy for me, where some of the gurus on here can probably do it in a few hours/minutes.

If there is no urgency, I can break out my vmware & work on it.

But as I said, I am starting a new project/job & will probably be heavily intrigued with it for now.

But I always enjoy the wc dev side more than anything, so I might work on it at night & see what I can come up with.

Let me know your urgency. If its not real urgent, then I can play with it. If it's urgent, maybe one of the gurus can grab the code (or some of their own for representations) & adjustthe details page actions menu.

Let me know (Steve or gurus who want to help).

L Jett
cadjett@aol.com,datajett@aol.com

I did some research on actions menu xml & gather info from good resource, so I will try to pull time for this.

Mainly because I think it would be a very functional tool, because I have had multiple requests to have pdf downloable tool.

The java class was the easy way out, but the epmdoc details page actions menu option is a far better option.

It will just take more work than the original java did. I will probably update the jave, then have the jsp point to it.

Then figure what & where to insert proper actions xml into custom actions xml file.

Only problem I have is that my vmwares dont match wc9 & proe, so I might have issues getting a pdf associated to a drw.

I'll see how that goes, but I might need help with a drw/pdf to import.

More later.

L Jett

Started New Project, so I have had little time to work with this, since I have been spending evenings with new work.

Then after I finally had time to play with PDF download from details page, my vmwares gave me issues.

So now I am good with time & vmware, I can work on this tool.

Tasks:

Java to download PDF or other representation.
JSP to run java class/method with args.
actions xmladd for epmdoc detail page or elsewhere.

Hopefully, I can make good progress & post the download tool, soon.

Sorry I lapsed on this effort.

L Jett
datajett@aol.com,cadjett@aol.com

cc-2
6-Contributor
(To:SteveVinyard)


Hi Steve,

We do not have the need in our organisation but if we had we would use the system we have in place. It is a third part software called PSW from etrage. Amoung other things it creates pdf outside Windchill of drawings. The creation happens either on demand or at triggered events. In our use we create pdf everytime a production drawing is released. They are saved automatically on a shared folder on a window based server. I imagine your need are slightly different and you do not want to transfer the issue when your users will have to browse hundreds or thousands of pdf. PSW can also be used on the client and each user could have it. Therefore a user could ask his PSW to create pdf on his harddrive of a drawings. PSW can read text file. So you could create the list of drawing you need and ask PSW to read it.

We are using this piece of software and are very please with it. If you want more information please do not hesitate to ask. It took us some time before finding the right application for us.

Thanks

Best regards

In Reply to Steve Vinyard:

I have my drawings being published as a PDF by my Pro/e CAD worker. This is fine but in the end my users really need to be able to quickly download or email the PDF. Currently the only way to get the PDF out is to do the following: 1- Go to Drawing Details Page 2- Select "Display Representations List" 3- Click Actions>Save Representation 4- Save Representation out as .zip file to desktop 5- Extract PDF from .zip file and email etc WAY to much work...does anyone know of a more efficient way to do this?

Hey Steve (ALL),

I think I finally have it. At least I have it working for me on my vmware.

Now the wc dev gurus on ptcuser.org will find issues with how I did it, but they know the system well, so I am open to all comments, suggestions, etc.

This customization will now allow download of pdf or plt form empdoc details page, along with product/library folder/page.

So you dont even have to go to the details page. Just 2 clicks for Actions menu of any DRW & you can download PDF or PLT.

I made it open to PDF or PLT, because some firms might not have PDF putput set up.

But the jsp is set for PDF & you only need to change the conType string in jsp, from "pdf" to "plt".

I will attach a zip to this message & include links to zip & readme form my web site.

I will show full readme in message, so others can search & find this type content for future use.

Basically, here are the steps:

1) create repsave folder & copy jsp there
2) insert/append WVSactionsResource.rbInfo file & run ResourceBuild
3) edit/insert custom-actions.xml & custom-actionsModels.xml files
4) copy java/classes to ext folder.

The downloads are:

readme: http://www.datajett.com/windchill/wc_dev/saverep/saverep_readme.txt
zip download: http://www.datajett.com/windchill/wc_dev/saverep/saverep.zip

Of course stop/start method server, etc.

There might be a better rbInfo file to inset into.
There might be a better choice than <actionmodels> & <model name="epmdocuments" details=" page=" actions&quot;=" menufor="wt.epm.EPMDocument">, but all effort was on free time, so the reasearch time was limited.

But I am very oopen to suggestions, opinions on what is proper or would work better, because thats how I learn & improve.

If you dont want to post here, just email me @ datajett@aol.com or cadjett@aol.com

The download location is set in jsp to "C:\\TEMP", but that can easily be changed. Up to you on how tomcat recompiles the jsp.

I might work further & have drop downs for content type options (PDF/PLT) or actually have code read what representation is associated to DRW(PDF/PLT) & download what it finds.

I might also have text entry field for download location, or have it read a properties file. But its hard to find time, since its after hours & for free...ha..ha

Larry Jett
datajett@aol.com, cadajett@aol.com

This does not convert to PDF right? Just downloads the plot (HPGL/2) or
PDF if they exists as representations. Correct?


Correct, it only downloads an existing representation of the selected DRW.

I imagine something could be written to convert a plt to pdf, but then there are so many abobe installations for plt2pdf out there, it would be hard to write for any or all.

But then again, some one in the past sent me code to use PDFCreator & convert plt. I think command line also.

Let em go look for that code. PDFCreator is an easy one to download & install. Then maybe they add a site.xconf entry for PDFCreator install location, etc

Letme look into that. Of course when free time allows...ha..ha

L Jett

Back to the drawing board. I went to a windchill page outside the vmware & ran the download PDF & it placed it on the windchill server "C:\temp" & not the machine where wc web page was ran from. I should have seen that coming, but you cant see it all, until you get more time to test & error check. No errors, but poor functionality.

But this might be an easy fix, but its not coming to me right now.

Otherwise, now the code is only good if there is a shared drive used to download to.

I probably need to use the same code in wc that allows user to select local drive:/folder. Like "download primary content", etc.

Unless some one has ran into this & knows the code adjustment. I do have some old java code for file/folder chooser, but that probably wont work in here.

But I didnt want to spend too much more free time. So I did the quick route.

But then again, I gota small buzz when it actually worked last night. So maybe I can run on that & keep the drive going to find out how to download to local drive:/folder.

Any ideas?

L Jett
datajett@aol.com, cadjett@aol.com

Larry this is cool stuff. How does it work? Can you send a screenshot of it.

Steve Vinyard
Application Engineer

[cid:image001.gif@01CB33BB.05E1DBE0]

Hey Steve (ALL),

I have attached a doc that has a few screen captures, along with a little explanation.

But the program still needs to be changed to offer the user to select the download location.

Now if certain networks have a user share/mapped drive, the JSP can be changed to drop the PDF/PLT to that shared/mapped drive & users can pull the PDF's from there. Now simultaneous downloads will overwrite each other, but thats an issue that is resolved by obtaining the PDF/PLT as you download it.

But I hope to update the code over the week end or sooner.

L Jett
cadjett@aol.com,datajett@aol.com

Wow, imagine if you are an everyday user of the system and not an engineer. Plenty of people really need access to PDF's of things so they can send them out or archive them somewhere. As of now there is just no way to do it.

How hard would it be to have the PLT's automatically converted into a PDF? I know you can setup drawings to automatically convert to PDF but then I think you lose the markup abilities of the plot file unless you have the "PDF Markup" license and software from PTC. Anyone else have ideas on that?

Steve Vinyard
Application Engineer

[cid:image001.gif@01CB3477.868E5AE0]

Hey Steve (ALL),

I now havethe codewhere it will save to client machine. I have had several email suggestions & code& they were great.

2 suggested stream to client & 1 of those sent code. Thanks.

I will probably update my code to provide that option later, but for now my code allows 2 options: Drop to SERVER or client side.

The client side drop is through hyperlink in JSP page, after selecting EPMDoc actions menu option.

To control which is used, you mainly change JSP String value:

dlLoc = "URL";
String conType = "pdf";

URL (for dlLoc) can be changed to server side folder (such as C\\:TEMP) or shared folder (accessible by user & their client machines,such asshared Z:\\PDFs or ???).

dlRep.java contains: URL url = data.getViewContentURL(holder);

This gathers wc string to open in web browser through hyperlink (href), which in turn prompts user (save window) for location to download the DRW representation.

I like this option because its allows user to place pdf/plt where they want. If they dont want that extra step, the wc admin can set dlLoc string to folder. The admin could actually have 2 actions drop downs, 1 for client, 1 for server.

"pdf" or "plt" can be set as value for String conType, depending on whether your firm publishes DRW to PDF or default HPGL/PLT.
I can maybe later have code to run PDFCreator convert plt to pdf & dump in set or determined location. But not right now. I need a break &/or different task.

I have attached an updated zip with new readme, jsp, java & class.

It probably does not do enough error checking, but please contact me if you see what I should add.

If you can, Steve or ALL, please add to your dev/test server & let me know if it works or not. Then any suggestions are welcome.

I do appreciate the emails, suggestions & code & will probably update the code to offer many options later:

Server, shared, browser or direct to client machine with stream. Either by properties or jsp page selections.

L Jett
cadjett@aol.com,datajett@aol.com

This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:


String conType = "pdf";
URL (for dlLoc) can be changed to server side folder (such as C\\:TEMP) or shared folder (accessible by user & their client machines, such as shared Z:\\PDFs or ???).

dlRep.java contains: URL url = data.getViewContentURL(holder);

This gathers wc string to open in web browser thr...


















This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:


String conType = "pdf";
URL (for dlLoc) can be changed to server side folder (such as C\\:TEMP) or shared folder (accessible by user & their client machines, such as shared Z:\\PDFs or ???).

dlRep.java contains: URL url = data.getViewContentURL(holder);

This gathers wc string to open in web browser thr...


















This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:


String conType = "pdf";
URL (for dlLoc) can be changed to server side folder (such as C\\:TEMP) or shared folder (accessible by user & their client machines, such as shared Z:\\PDFs or ???).

dlRep.java contains: URL url = data.getViewContentURL(holder);

This gathers wc string to open in web browser thr...


















Guess I am hooked on this program. I didsome error checking.

Current attachment has updated jsp to throw error response for non Cad Doc that is DRW.

L Jett

This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:

This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:

This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:

This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.

If this email is from an unknown source, please simply delete this email.

If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.

+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".

Additional instructions and options on how to receive these attachments can be found at:

2 things:

1) Sorry about the zip attachment errors. I am sureI have seen or added zips to this site before, so I dont know why the errors are occurring. Its a possibility that it is because the zip contains a word doc, so I will switch to a pdf, after I update with the latest images strored with in.

It is of course related to Raytheon, so maybe ptcuser.org needs to check why Raytheon's email service rejecting zip attachments is causing errors to be directed & posted to the forum message area.

If they do review the reasons why, maybe they could remove those errors from this message/post.

2) I found a couple errors &/or added error checking jsp/java code again, so I have just attached the actual code/class.

From now on, I will just link the zip from my site:

http://www.datajett.com/windchill/wc_dev/dlRep_REPSAVEAS.zip

L Jett
cadjett@aol.com,datajett@aol.com

Questions for the folks experimenting with this application:

1) What version of Windchill are you running ? (I'm running 9.0 M050)

2) In step 2, there is no existing WVSactionsResource.rbInfo file in the respective folder. There are just two files in the specified folder: actionsResource.rbInfo and wvsActionsRB.rbinfo

I triedcreating a WVSactionsResource.rbinfo filewith the lines specified, however I get a "Build Failed" error message when executing the ResourceBuild command, any ideas ?

This looks like a really neat application,Looking forward to trying it out.


Question, are you checking for the WVSactionsResource.rbInfo file in the src
or wtcustom folder. I edited the one in the src folder, where some wc gurus
might suggest on using the wtcustom area. Maybe its in src & you copy to
wtcustom. I am not sure.

But I am on wc 9.1 M040 (I think on my vmware) & I am pretty sure I edited the
.rbInfo file in the src & it compiled, so I was happy there.

Maybe WVSactionsResource.rbInfo might only be wc 9.1, but you might be able to
place the resource bundle insert into any .rbInfo file, as long as you
reference that .rbInfo file in the
<wt_home>\codebase\config\actions\custom-actions.xml file:

But maybe in the wvsActionsRB.rbinfo file, add/insert/append:

repsave.REPSAVEAS.title.value=Download DRW PDF or PLT
repsave.REPSAVEAS.icon.value=download.gif
repsave.REPSAVEAS.tooltip.value=Download DRW PDF or PLT
repsave.REPSAVEAS.description.value=Download DRW PDF or PLT
repsave.REPSAVEAS.moreurlinfo.value=height=400,width=700, scrollbars=yes

wvsActionsRB.rbinfo might not be the right .rbInfo file, it could be the other
file you mentioned.

Then to test, from wc shell, run:

ResourceBuild com.ptc.windchill.enterprise.wvs.wvsActionsRB

But back up all your files before editing.

But a wc guru on here might know if that is the wrong thing to do or not.

=====================================================================

Then in the custom-actions.xml adjust the insert:

Original insert that I specified:

<objecttype name="repsave" class="wt.epm.EPMDocument" resourcebundle="com.ptc.windchill.enterprise.wvs.WVSactionsResource">
<action name="REPSAVEAS">
<description>Download DRW PDF or PLT</description>
<command windowtype="popup"" url="wtcore/jsp/repsave/REPSAVEAS.jsp"/">
</action>
</objecttype>

Instead Change to:

<objecttype name="repsave" class="wt.epm.EPMDocument" resourcebundle="com.ptc.windchill.enterprise.wvs.wvsActionsRB">
<action name="REPSAVEAS">
<description>Download DRW PDF or PLT</description>
<command windowtype="popup"" url="wtcore/jsp/repsave/REPSAVEAS.jsp"/">
</action>
</objecttype>

Hope this helps.

=====================================================================

Also, I just updated the zip on my site with latest jsp/java updates:

http://www.datajett.com/windchill/wc_dev/dlRep_REPSAVEAS.zip

The zip now contains a pdf for screen captures, instead of a doc.

L Jett
cadjett@aol.com,datajett@aol.com

More further thoughts on what .rbInfo file to place the download PDF/PLTresource bundle insertinto.

Swamy Senthil had info about a customRB file (in past post: http://portal.ptcuser.org/p/fo/st/topic=16&post=87065)

He mentions adding insert like our new download insert:

repsave.REPSAVEAS.title.value=Download DRW PDF or PLT
repsave.REPSAVEAS.icon.value=download.gif
repsave.REPSAVEAS.tooltip.value=Download DRW PDF or PLT
repsave.REPSAVEAS.description.value=Download DRW PDF or PLT
repsave.REPSAVEAS.moreurlinfo.value=height=400,width=700, scrollbars=yes

His post shows "hm" folder with his custom-actions.xml insert:

<objecttype name="hm" class="" resourcebundle="hm.customRB">
<action name="baselinereport">
<command windowtype="popup"/">
</action>
</objecttype>

so maybe his customRB.rbInfo would be placed in folder: <wt_home>/src/hm

So if we have to create a customRB.rbInfo file & place it in an appropriate folder path, it might be:

<wt_home>/src/repsave (since our objecttype name is repsave).

The customRB.rbInfo contents would include:

repsave.REPSAVEAS.title.value=Download DRW PDF or PLT
repsave.REPSAVEAS.icon.value=download.gif
repsave.REPSAVEAS.tooltip.value=Download DRW PDF or PLT
repsave.REPSAVEAS.description.value=Download DRW PDF or PLT
repsave.REPSAVEAS.moreurlinfo.value=height=400,width=700, scrollbars=yes

Then change custom-actions.xml insert to:

<listofactions>
<objecttype name="repsave" class="wt.epm.EPMDocument" resourcebundle="repsave.customRB">
<action name="REPSAVEAS">
<description>Download DRW PDF or PLT</description>
<command windowtype="popup"" url="wtcore/jsp/repsave/REPSAVEAS.jsp"/">
</action>
</objecttype>
</listofactions>

Then maybe to compile, you would run from Windchill shell:

ResourceBuild repsave.customRB

Swamy Senthil, if you are viewing, let me know if I am off.
Or anybody else that knows this area better.

L Jett

Top Tags