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.

Create PDF from office files without Adobe LiveCycle (Generic Worker)

RenatShaimardan
5-Regular Member

Create PDF from office files without Adobe LiveCycle (Generic Worker)

Hi,

 

Creating PDF files is impossible without "Adobe Leve Cycle".
Therefore, "Worker" was written. Windhill sends assignments to WorkerServer and receives a PDF from there.
The WorkerServer requires the installed MS Office

 

https://bitbucket.org/renatsun/wc_genericdocumentworker/src

 

Best regards

 

23 REPLIES 23

New version:

- Change Shapetype to OFFICE.

- Parse xml file (wcdti.xml) to update attributes of Word a document

 

https://bitbucket.org/renatsun/wc_genericdocumentworker/src

Hello Renat,

 

I tried to use your script in Word 2010 , but I've got a script error when vb script execute updating document properties (Word) . I've got security error 80004005 when i tried to set windchill properties. I can update any other properties except windchill attributes.

What do you think about this?

rpike
5-Regular Member
(To:IrynaBykovskaya)

Not sure what version we're discussing here but from Creo 5.0 F000 and Windchill 11.1 you can publish as PDF without Livecycle/AEM. Just have to set the 'Use Office for PDF' recipe option.

But as far as I know, this needs a PTC license!

gcevallos
6-Contributor
(To:rpike)

Thanks, it was a solution 

 how to update CustomDocumentProperties in excel files too??

Hello Renat,

 

First off, thanks much for this great resource! I've hit a wall trying to implement this where the script stops after launching the MS Office application, probably because I haven't been able to do the first step you mention in your "Read Me" document.

 

You mention to "Run the windows service as a user who has permissions on excel". Could you provide the Service names that need to be configured?

 

The service in which you want to assign the user is called "GS Worker Daemon". Do you have problem with script? Have the correct path to Java SE (workerstart.bat)? Try to enable debugging in the script (workeroffice.vbs) "Debug=true" and watch debug file in directory C:\PTC\GenericDocumentWorker\tmp\GenericWorker.log Best Regards Renat

Hi Renat,

 

Thanks for the clarification and tips! The issue was actually with the script caused by the line I added to make the MS Office application visible. It worked fine when testing the script by feeding the file input and output path, but didn't work when the job was triggered by the worker agent.

 

All is working now. Thanks again for sharing this!

 

Daniel

I've gotten this to work perfectly on a laptop install of 11.1 but so far can't get working on our 11.0 servers - case open on it.

The PDF gets generated but is not allowed to go into the vault.  Likely something in our security preventing.  This is using the same CAD Workers that are publishing Creo and SolidWorks perfectly.

 

Looking forward to getting this working and in use.

One downside (we understand - not completely sure yet) is that you can't watermark PDF's created this way in Creo View.

The PDF gets generated suseccful, but is not update fields into metedata document. If some field have inserted into document content - this field not update when attribute have corrected in Windchill and documen have  got new PDF publication.

HJ1
15-Moonstone
15-Moonstone
(To:IrynaBykovskaya)

I'm looking at finally getting Office documents published to pdf and saved as an attachment to wtDocument and came across this thread. I'm curious to know whether it still would be an issue to get the embedded attributes on a document to update correct to pdf.

 

Attributes are updated through Desktop Integration when the document is downloaded and opened, e.g. State is very important. How would this be with the worker machine? I'm looking at using the Creo View Adapter for PDF with MS Office only.

MikeLockwood
22-Sapphire I
(To:HJ1)

Since earlier posting, we've gotten this to work perfectly - has been in routine use w/o issue for many months now.  Works same in 12.0.

TomU
23-Emerald IV
(To:MikeLockwood)

@MikeLockwood,

Are you using the built-in stuff from PTC (with the extra license) or the custom code at the top of this thread?

MikeLockwood
22-Sapphire I
(To:TomU)

See attached install / config document that I created on this.

TomU
23-Emerald IV
(To:MikeLockwood)

@MikeLockwood,

Does the approach in your Word document require any additional licenses from PTC?  Last time I checked, Creo View Adapter for PDF was $8,190/yr and Creo View Adaper for MS Office was $2,580/yr.  I was under the impression that the solution posted at the top of this thread did not require these licenses, but I may be wrong.

MikeLockwood
22-Sapphire I
(To:TomU)

We're not aware of any additional license cost.

TomU
23-Emerald IV
(To:MikeLockwood)

@MikeLockwood,

This is what I was going by.  See note 2.  It's from the Creo View 7.0 Adapters Software Matrices:

TomU_0-1600705238469.png

 

I'm not opposed to going through the steps to test it out, but I'd rather not waste the time if it really does need a separate dedicated license to even function.

BrianToussaint
19-Tanzanite
(To:TomU)

Because we put a lot of documents into Windchill, I checked on this with my VAR a couple of years ago.  Unless things have changed, it did require a license and as far as I remember, said license was not cheap.

HJ1
15-Moonstone
15-Moonstone
(To:TomU)

I got a word from our VAR that in note 2. the mentioned license refers to MS Office license required on the worker machine, not any Adobe thingies which cost a fortune a couple of years ago.

HJ1
15-Moonstone
15-Moonstone
(To:MikeLockwood)

Great stuff, thanks a lot!

It says for now DTI is not possible... so would the workaround to get for example the wtDoc State update correctly to pdf be that the user should download and update the Word/Excel doc to have the State-attribute updated, then checkin to update the file on wtDoc and that would be then published to pdf with the appropriate State..? In other words, you still need to allow iteration of an Approved / Released document, as is now with manual pdf creation.

MikeLockwood
22-Sapphire I
(To:HJ1)

No problem using DTI with this in general.


My strong feeling though is that state specifically should not be mapped using an attribute with DTI - instead, it should direct which watermark is overlaid when viewing in Creo VIew.  From Creo View, one creates a PDF including that watermark.

HJ1
15-Moonstone
15-Moonstone
(To:MikeLockwood)

For us I think it would be ok, but what do you possibly mean with "state specifically should not be mapped using an attribute with DTI"?

I just set this up and first tests show that State & other attributes mapped with DTI are updated to the published pdf. For example, just using Set State on wtDocument triggered publish and the resulting pdf shows the correct state, both Word and Excel.

 

Now what I'm puzzled about is what exactly triggered the publish as I didn't touch WVS configurations... which leads to another requirement: How can I direct the published pdf to wtDocument Content - Attachments instead of it only being found in Representations?

Top Tags