0
votes

I converted text files to PDF documents using CutePDF Writer printer in windows forms application.It's working as expected but same block of code I used in c# windows service application to convert text files to PDF files.I'm not getting any exceptions while executing the code and not generating any PDF documents.

I created the following registry key settings for CutePDF writer

Setting the display mode:

HKEY_CURRENT_USER\Software\CutePDF Writer\BypassSaveAs (0 = show Save as dialog box after spooling, 1 = do not show Save as dialog box.) (This value is of type REG_SZ, not REG_DWORD)

Setting the filename:

HKEY_CURRENT_USER\Software\CutePDF Writer\OutputFile (Use the key above to set the output file for the PDF. A full pathname (e.g. d:\your folder\your file.pdf) is required.)

1

1 Answers

0
votes

Not familiar with CutePDF Writer - but: as which user is the service running?

To clarify this: if the service runs as LocalService, the registry key HKEY_CURRENT_USER is not the same as the one from loged in user.

If that is the case, try HKEY_USERS\S-1-5-19 instead of HKEY_CURRENT_USER.