Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: Dynamic Output Path setting - Not changing? Post Reply Post New Topic
Author Message
Cheese
Newbie
Newbie


Joined: 13 Jan 08
Posts: 2
Quote Cheese Replybullet Topic: Dynamic Output Path setting - Not changing?
    Posted: 13 Jan 08 at 7:14AM
Hi there,
I have just purchased the PDF reDirect Pro v2 component.

Via code, I am trying to programmatically change the .Settings_Output_Path property, depending on the code running within a live/development type environment (asp.net).

The steps I took are (based on your examples):
  1. Call .Batch_Printer_Load_Settings
  2. Set the property .Settings_Output_Path is one to either development or live
  3. Call .Batch_Printer_Save_Settings
From testing, subsequent calls to change the .Settings_Output_Path doesn't seem to work, as it stays as the path which was created initially.

Am I missing something?

The coding from my end:

Dim sPDFPrinter As String = "PDF reDirect Pro v2"
Dim oPDF As New PDFR_PRO_Batch_RC.PDF_reDirect_Pro_Tool

If oPDF.Batch_Printer_Is_Installed(sPDFPrinter) = False Then
    oPDF.Batch_Printer_Install(sPDFPrinter)
End If

oPDF.Batch_Printer_Load_Settings(sPDFPrinter)

oPDF.Settings_Output_Path = sTempFolder
<snip snip>

If oPDF.Batch_Printer_Save_Settings(sPDFPrinter) = True Then
    <snip snip>
End If

oPDF = Nothing



Thanks in advance,
Cheers,
Chee
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 13 Jan 08 at 9:41AM
Hi,

    It looks like you are are trying to change the path of the main PDF reDirect Pro printer. Your code says:

Dim sPDFPrinter As String = "PDF reDirect Pro v2"

    The ActiveX component allows you to create and control "Batch PDF printers" which you can name whatever you would like. However the ActiveX component should not be used to try to control the main PDF reDirect Pro printer.

    For your reference, go look in the following folder, and you will see what I mean:

C:\Documents and Settings\[YourLoginName]\Application Data\PDF reDirect

    Inside, you will see a settings file called "Prefs_v2.ini" which contain all the settings for the PDF reDirect Pro printer. These are not changed by the ActiveX component. Now, go one folder deeper into the "Batch Printers" folder. Inside, you will see the settings files for the Batch printers.

    In your case, you might see a file for "PDF reDirect Pro v2.ini" since you tried to treat the main printer as a Batch printer. Please delete it as it may even cause my program to confuse the main printer for a batch printer in some parts of the code, but not others - leading to inconsistent results.

    For your next step, please re-try using a printer name other than "PDF reDirect Pro v2", something like "Batch PDF", or "PDF Cheese". Smile

    I hope that helps. If you continue having problems, please let me know, and we'll take it from there.

    Cheers!

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Cheese
Newbie
Newbie


Joined: 13 Jan 08
Posts: 2
Quote Cheese Replybullet Posted: 14 Jan 08 at 2:55AM
Hi Michel,
You responded extremely quickly! Tongue

Thanks for your response. It led me to a solution for the printer switching problem I had between the live and development environment.

What happens is that when I compile the 'release' code of an asp.net application, the INI files are stored in the C:\Documents and Settings\SERVER\ASPNET\Application Data\PDF reDirect\Batch_Printers folder instead of the current user folder. I just had to duplicate the .INI files appropriately.

What I am encountering now is that when I assign a custom file name to the .Settings_Output_FileName property, it is picked up correctly within the development environment, but when running it under the 'live' (ie. the /ASPNET/ user) environment, the property seems to be ignored. Any ideas?

I'm still trying to grasp the architectural concept of pdf batch printing.

Otherwise, your component is impressive. Clap

Thanks in advance,
Chee
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 15 Jan 08 at 12:30AM
Hi,

    Hmm... no ideas unless the Windows API funtion I use internally does not return the right path for the "Application Data" folder of the user.

    If you can't seem to find the problem, then turn on the "logging" feature inside PDF reDirect Pro >> Preferences >> Generate Log Files, then close PDF ReDirect. Finally, try a couple of times to run your program. and send me the log files located in the folder here:

C:\Documents and Settings\[USERNAME]\Application Data\PDF reDirect\Bug_Reports

    My e-mail address is exp [at] exp-systems [dot] com.

Cheers!

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum