Word to PDF conversion speed

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
dmjung
User
Posts: 102
Joined: Mon Oct 23, 2006 6:54 pm

Word to PDF conversion speed

Post by dmjung » Fri Dec 15, 2006 9:15 pm

I'm using OfficeInside to convert Word documents to PDF. This is currently taking about 10 seconds per document which isn't too bad except when you have to do several hundred (or over 1,000 like I'm waiting on now.)

Any ideas/tips on how to speed the conversion process up. I'm sure most of the time is spent fooling around with MS Word and outside our control, but thought I'd ask.


--David

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Sat Dec 16, 2006 7:31 am

Hi David,

Most likely this is going to be a question better asked of Capesoft - rather than us - although we will of course take a look.

I suspect much of the delay is caused opening the file in Word.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Sat Dec 16, 2006 2:47 pm

Hi David!

I concur with John.

Our PDF-XChange Driver PDF generation is usually pretty fast.

Keep in mind that Office Inside is a COM interface to MS-Word and is bound by what Word can do and how fast it can do it, and Word is not a speedy product.

HTH!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

dmjung
User
Posts: 102
Joined: Mon Oct 23, 2006 6:54 pm

Post by dmjung » Wed Dec 20, 2006 3:46 pm

Tracker - Clarion Support wrote:...and Word is not a speedy product.
Why, whatever would make you think that? :)

In a similar situation using OI for Word mailmerge, I ended up making a mailmerge "service" thread so that the init of Word was done once at my program startup. Similarly, Sean thinks reorganizing this code into a single process that only does the init once, converts all the docs and then kills the word object would be cleanest.

--David

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Dec 20, 2006 6:10 pm

Hi David,

Yes - initialising Word at startup and processing all files before closing does seem like a good work around - though possibly a little resource hungry - hope all goes well :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

dmjung
User
Posts: 102
Joined: Mon Oct 23, 2006 6:54 pm

Post by dmjung » Fri Dec 22, 2006 9:13 pm

OK, I've merged all the code into a single procedure and it almost works. :)

I can't seem to get rid of a Save As file dialogue for the PDF. Attached is the generated code for the procedure.

ABC report template, no report, uses a queue as the source.

At procedure init, I load up the queue with a DIRECTORY() command, then for each queue entry, I do some fiddling around and eventually call a Doc2Pdf routine. This routine's code is cribbed from a hidden button that generates the pdfxchange code for me.

Any ideas would be appreciated...

--David
Attachments
Impor009.zip
(5.51 KiB) Downloaded 139 times

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Sun Dec 24, 2006 2:22 am

Hi David!

I don't see anything wrong in detail with what you have sent us. However I am concerned that what you are doing may be causing a synchronization issue with the PDF-XChange Driver, and therefore the registry codes may not being set and the driver is using default values, one of which is to call the Save As file dialogue.

You are running a loop using part of the PDFXCDriver30 class, with the Init and Kill for the class outside the loop. We never intended for the class to be used in this fashion, and I cannot say for certain that this will or will not work as intended.

But unless you take care to use EVENT:PDF3DRV_DocSaved to control the actual processing you may be creating the conditions for sync failure. Remember, there is a time delay between the time that Word finishes prinitng to the spooler, and the time that the PDF file generation is complete. OI knows nothing of this, nor should it.

Your loop has to read a queue record, begin the print process, WAIT for EVENT:PDF3DRV_DocSaved to signal that the PDF file has been created, and THEN proceed to save the output.

HTH!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Sun Dec 24, 2006 1:11 pm

Hi David!

One other thing - please check our demo pxcwoi36.app on the PC showing the problem and see if that is functioning properly, with no the Save As file dialogue and no demo watermarks.

Thanks and Happy Holidays!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

dmjung
User
Posts: 102
Joined: Mon Oct 23, 2006 6:54 pm

Post by dmjung » Tue Jan 02, 2007 4:06 pm

Back now...I'll chew through your responses this week and see what shakes out. Thanks.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Jan 02, 2007 5:59 pm

ok - thanks David.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Post by marisoft » Fri Jan 05, 2007 10:20 am

Hi David,

I am strugling with a similar job (see this post: http://www.tracker-software.com/forum/v ... php?t=2437).

I have tried using the Office Inside demo-program but are stuck when converting multiple docs.

If you get a solution I would very much like to hear about it.

Cheers,
.::Poul Jensen::.

Clarion developer

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Jan 05, 2007 10:30 am

Hi Poul/David,

Is it possible one of you could provide a complete small sample app that demonstrates the issues you are experiencing with some sample .doc files and I will have this checked here and see if we can get to the bottom of this once and for all ?

The more we get from you - the better, in terms of a ready to run app (of course we do need source) .

please also confirm specifically the version of Clarion and Windows on which you are testing when you send the app.

If its too big or private to post here - you can of course send to me direct (zipped) : johnv@tracker-software.com

Many thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Post by marisoft » Fri Jan 05, 2007 1:21 pm

Hi,

Here is a simple app.
For some reason I could not remove the FM3 3rd-party template. I hope this is no problem.

Cheers,
.::Poul Jensen::.

Clarion developer

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Jan 05, 2007 5:21 pm

Thanks Poul,

received by email.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Post by Tracker - Clarion Support » Sun Jan 07, 2007 8:37 pm

Hi Poul, David!

I dug through the class files and did find a bug with some old code that was suppressing the messages and hence "jamming" the app. That's been fixed.

Poul: I added ONE line of code in your PrintDocPdfA procedure:

Code: Select all

  if g:BatchRun = 1
    0{PROP:Hide} = True
    post(event:accepted, ?ButtonDanPdf )
  end
It hides the procedure window when doing a batch run.

I'll email the zip files to you both and to John V; I cannot seem to upload the attachment.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Post by marisoft » Mon Jan 08, 2007 7:29 am

Hi Craig,

Fantastic - it now works as expected.

Thanks.
.::Poul Jensen::.

Clarion developer

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Jan 08, 2007 9:30 am

Excellent - thanks Poul ;)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply

Return to “PDF-Tools SDK (DLL Libraries Only) - Clarion For Windows Developers Only Please”