Activation Error -30

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
aroncox
Posts: 36
Joined: Fri May 15 2009

Activation Error -30

Post by aroncox »

I have one customer, who is on a 64-bit Windows 2008 Terminal Server, that is getting Activation Error -30 in code that's working for everyone else. I have Amyuni PDF Creator 4.0.1.2 installed, and a small test program I've written works with no issues. What causes a -30 error, and any ideas on what I can look at next?

Thanks!

Aron Cox
aroncox
Posts: 36
Joined: Fri May 15 2009

Re: Activation Error -30

Post by aroncox »

Hmm, I've been experimenting and I can get a -30 error if I pause between printer activation and print for a while, and on the PC in question is does seem to take a long time to print, in fact it feels like Amyuni is getting slower on all my PCs. Is it possible to get an Amyuni 4 with a longer activation time? Is there anything I can do to speed up the printing? Sometimes we have to convert very long documents, hundreds of pages.
aroncox
Posts: 36
Joined: Fri May 15 2009

Re: Activation Error -30

Post by aroncox »

I've been kindly sent a new activation code by Amyuni that changes the activation period from 20 seconds to a minute. I'll test it tomorrow. Thanks Amyuni!
aroncox
Posts: 36
Joined: Fri May 15 2009

Re: Activation Error -30

Post by aroncox »

Okay, I tried the new activation code, kindly supplied by Amyuni, and I found a report that was only one page long, but I am still getting "Printer not activated, error code -30" in a Windows Terminal Server 64-bit environment. My application is a Powerbuilder 32-bit one. As I said before I wrote a small test app, that uses the same library to convert the report to PDF via Amyuni, and that works just fine.

As more and more of our users are working to 64-bit I now need to decide whether to keep Amyuni, and therefore buy support and upgrade, or switch to something else, assuming I can find something.

Anyone have any ideas of what I can do to get this working? Here are some things I've read on these forums:

1. Don't lock SPLWOW63.exe by checking Amyuni events in your 32-bit app. I'm not doing anything with Amyuni events, I have no idea what else I can try to mitigate this
2. -30 can be caused by an activation timeout. I've updated from a 20 second timeout to a 60 second one, and my report is now 1 page long. The print appears to hang, and the error occurs approximately 2mins 5 secs after calling print
3. Upgraded to the latest version of Amyuni and now connect to CDIntfEx.CDIntfEx.4.5. Connect okay, just can't print to the Amyuni printer
4. Check for duplicate Amyuni dlls on the server. Couldn't find any
5. Check to make sure you have write access to the folder for the new PDF file. Checked, full access granted

Here is my code in case there's anything silly I am doing, it's powerbuilder code calling Amyuni PDF Converter ActiveX:

// Set output PDF file name
iole_amyuni_app.DefaultFileName = as_output_pdf_file_name

li_ret = iole_amyuni_app.EnablePrinter(is_AMYUNI_NAME,is_AMYUNI_KEY)
If li_ret <> 0 Then
If ab_display_error_messages = TRUE Then
ls_error_msg = iole_amyuni_app.GetLastErrorMsg()
MessageBox("PDF Handler", "Error in EnablePrinter: " + ls_error_msg)
End If

return ii_SAVEASFAILED
End If

// This is important is sets the printer the datawindow will print to!!!!
ads.Modify ("DataWindow.Printer='" + is_pdf_printer + "'")

// Note: There are a number of options that can set here, to handle embedded fonts, margin sizes etc.
// Not sure what to use, but these appear to work, especially with Unicode data
iole_amyuni_app.FileNameOptionsEx = idec_NoPrompt + idec_UseFileName + idec_EmbedFonts + idec_MultiLingualSupport + idec_FullEmbedFonts

// Print the list
li_ret = ads.Print()
If li_ret <> 1 Then
If ab_display_error_messages Then
ls_error_msg = iole_amyuni_app.GetLastErrorMsg()
MessageBox("PDF Handler", "Error in Print: " + ls_error_msg)
End If

// Go back to the original printer
ads.Modify ('DataWindow.Printer="' + ls_current_printer + '" ')

return ii_SAVEASFAILED
End If

// Go back to the original printer
ads.Modify ('DataWindow.Printer="' + ls_current_printer + '" ')

// Reset options to zero
iole_amyuni_app.FileNameOptions = 0

// Clean Up
iole_amyuni_app.DriverEnd()
aroncox
Posts: 36
Joined: Fri May 15 2009

Re: Activation Error -30

Post by aroncox »

I have finally tracked this down, changing this


FileNameOptionsEx = NoPrompt + UseFileName + EmbedFonts + MultiLingualSupport + FullEmbedFonts

to this (i.e. removing the FullEmbedFonts)

FileNameOptionsEx = NoPrompt + UseFileName + EmbedFonts + MultiLingualSupport

Makes it all work again on Windows Server 2008 R2 (it was working just fine everywhere else). I will email Amyuni support with this information in case its helpful to them, luckily we don't really need to fully embed fonts.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: Activation Error -30

Post by Jose »

Hello,

I would also like to mention that if you are using MultiLingualSupport, it is advisable not to use FullEmbedFonts. MultiLingualSupport will internally turn-on partial font-embedding. If you also set FullEmbedFonts, this will just make the document size larger (file size).


Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Post Reply