Managing Adobe PDF printer- How to force off the option to rely on system fonts - pdf

I am running a Citrix-driven environment, and I have a vital piece of software that creates a PDF repository of all reports as they run. The problem I have is that the users' printers must populate into the environment (Not just the default printers- ALL of them), and a number of the computers have Acrobat 9 or X on them. The software that creates the reports REQUIRES that the Rely On System Fonts is turned off, but some users have it turned on when it comes to the PDF printer on their computers. Sometimes, when user x goes to create a report, it will grab the printer from user y's session that may not have the option properly unset- Then user x's irreplaceable report is lost. The application is a Dexterity application, and I don't have access to the source. Is there a way, in Citrix or in AD, to script this one option to be unset properly? Any idea if there is a registry key or some kind of hook I can activate with a powershell script to fix this headache? I appreciate any help.

I have been researching for weeks to figure this out for myself, and I was looking for one more answer and found your question. To fix your problem I was able to find that the registry key found here:
[HKEY_CURRENT_USER\Printers\DevModePerUser]
Contains all of the current printer properties. If you export it, you can run a script to add the reg key during login. Just make sure that you restart the spooler after words, just to make sure that the changes apply. Also the settings will only apply to the printer with the same name, so you have to have a different reg key for each different printer name, if you have several. I just esported the key after I had changed the printer settings to how I liked them, and then edit the .reg file to remove any data about other installed printers to make sure that the .reg file wouldn't affect any other printers.

Apparently, this problem is a common problem. Microsoft has acknowledged that the PDF creation issue I am trying to avoid is an issue in GP, starting in (Think it was version) 7. The Microsoft-recommended workaround is to open the PDF Printer properties and uncheck the Use System Fonts box. Adobe does not support this configuration, so they will not provide a clear way to implement it at a network level with clients in many locations and 4 different major versions of Acrobat. The closest I came was a post that identified an incredibly long string I have to hexedit that seems to change in specific minor versions of Acrobat. Way to go M$ and Adobe. So, in other words, no support on major product lines from two major companies. I have nowhere else to go at this point. If anyone else has a solution to this problem, I'd love to hear it. Thanks!

Related

Ace-editor - Can't copy and paste from editor to external application (e.g. Notepad)

I have the Ace editor embedded within a .NET application (Target Framework is set to 4.6) and some users are not able to copy and paste content from within the editor to an external document (e.g. to Notepad). Copying from Notepad/any other application to the embedded Ace editor is fine.
I have absolutely no issues on my Windows 8 machine, either with custom Internet options or with the default. Some of my colleagues can't copy and paste, whilst others can. I think it may be a Windows 10 issue because the copy and paste functionality works for all of my colleagues using Windows 8, but it's hit and miss for colleagues using Windows 10.
If I install a fresh copy of Windows 10 on a virtual machine I experience the same problem. I've updated the Internet options (In Internet Explorer - Version 11.162.10586.0) on the virtual machine to match the Internet options on my Windows 8 machine with no luck.
In the Security Settings, I have the following enabled:
Active Scripting
Allow Programmatic clipboard access
On the affected computers, when copying the content into Notepad, I see just a square, which I'm assuming is ASCII? On Notepad++ I get the text "SOH", only it isn't text as I can't highlight the individual characters. This is the case when copying any content from the editor.
There are no other Internet Options (as far as I can see) that would be affecting the Ace editor. If you know of any setting that may help, please let me know. Also, there are no Application errors in the event log.
This is not technically a programming question, but I still feel it's relevant to StackOverflow. I wasn't sure where else this question would be appropriate. If mods believe this should be on one of the other Stack Exchange sites, feel free to move it.
If you need any more information, please let me know.
UPDATE:
#a user pointed me in the right direction. If you're using the Ace editor in an IE only context, changing the MIME type in the main ace.js file from "text/plain" to "text" should resolve your issues. This work-around won't be suitable for situations where the editor is used in other browsers. In my situation, the editor has been embedded in a .NET application and it's unlikely that it will be used outside of this context.
this can be related to https://github.com/ajaxorg/ace/issues/2913, try updating to the latest version

Protect source code at delopment time in tfs

I use TFS , My question is how can i sure about that developer who work on a project can not copy source file and evict or extract them from office by Email,flash memory,USB,... ?
Is there any solution with TFS?
Can anyone help me?
TFS has no ability to do this, once a file has been retrieved from TFS it is just another text file on your computer you will have to use other tools to do what you want.
Opening it up to tools outside of TFS it is extremely difficult to do what you want to do but it is possible. Your best option is contact a security firm that often works with government defense contractors and have them set up your network IT security, some government defense contractors have the same requirements as you list and they would know all the things you would need to do.
Off the top of my head some of the things you will likely need to do is:
Use group policy to block writeable media from being used to block flash drives and CD-Rs.
Block internet access to stop webmail.
Block printing to stop people printing out the source then using a scanner and OCR software on another computer to turn it back in to code.
Not allow any device that can take photographs in areas where source code may be on screen as the same OCR procedure could be done with photographs.
This list is no where near complete and I would recommend contacting a security firm to get a complete list.

What are my options to print an email to TIFF from Outlook via an addin?

We have a process at our company that processes TIFF images. I have a project where I want to be able to capture emails that people have received and let them pass it on to our imaging process. Right now forwarding an email isn't really an option but our initial thought was that we could create an Outlook addin that would create and send an image of the email to our internal webservice and it would just work.
I'm developing on Windows 7 with VS2010 and Outlook 2007.
I have the basic addin framework setup - that seems to work OK. The addin is there, popping a regular Windows form where I can do my stuff. But now I'm running into problems. First I was going leverage the built-in Microsoft Office Document Image Writer which can write to TIFFs. However, this doesn't appear to be installed as part of Office 2007 on Windows 7. Then I found some references that it didn't work on Win7 64bit in the first place, and that Microsoft was phasing it out in favor of their XPS printer anyway.
Then I moved on to thinking I could maybe use PDFCreator. This sort of works, except it looks like I have to actually have PDFCreator installed on the client machine, too. I was really hoping I could just bundle the dll and PDFCreator could natively "print", but it seems rely on you setting the active printer to "PDFCreator" and still printing to that. I was already maybe going to run into problems pushing a custom addin out to users in the first place; I don't know if I could get a new printer rolled out as a requirement, too.
On top of that, you apparently can't set the active/default printer in Outlook once it's running. So my plan to run the addin, change the default printer to PDFCreator, print it, then change it back isn't going to work after all anyway.
We really wanted to be able to capture emails as if the user had printed them out and scanned them, which is what they have to do now. I would really not like to rely on copying/pasting into another application if I can help with it.
Sooooooo, what other options might I have? Is there any close to native functionality in Windows or Office that would let me print to something and eventually get a TIFF? Does it look like I'm going to have to try and string together a bunch of 3rd party tools or something? It looks like the only way to "print" an email is to do the MailItem.PrintOut() command, which is just going to go to whatever the current default printer is. Are there any other TIFF-printing things available that wouldn't involve installing a new virtual printer on the end user's machine? Any other ideas? Thanks for any help!
Although you ruled it out at the start of the question...
Assuming you need those tiffs at a central location and not at the employee desktop.... I'd still advise you to have your addin forward the respective mail to a central location (as an attachment to a automated mail, or perhaps just write it to a queue folder on some network location), then have a central process pick it up and print it out to tiff files.
Unless you have exact control over the client machines at your company (which from the sound of it, you don't), you really want to move some fickle as 'switching printers in Outlook' away from the clients.
That doesn't mean this approach doesn't require hacks as well, because that central process will be running outlook to do the work.
I assume it is important that your tiffs look like they were actually printed from Outlook, if not please add that as extra information to your question, as it opens new routes. Like capturing the email-screen rendering and putting that inside a tiff file, which can all be done on any desktop machine.

Creating PDF file in PowerBuilder

I am new to PowerBuilder. I got an assignment to create a PDF file using PowerBuilder. How can I do that?
Our organization used to use Ghostscript, but has instead moved to Amyuni.
as suggested by Alberto Megia, download PDF creator, but dont use SAVE AS.
After you install pdf creator it will install a printer, use that printer to save the
datawindow with the print function.
after call print function, you will see a "Save as" dialog.
If you use "saveas" function, the pdf will not have the format that the datawindow shows.
What version of PowerBuilder are you using? The most recent versions have PDF capability built in (using Ghostscript).
Install Ghostscript.
Get PDFCreator for free there and install it.
Then you can save as PDF any datawindow or datastore with the statement:
dw_1.saveAs(path_where_to_save_with_name_of_file.pdf, PDF!, true)
Third parameter is for override if the file exists with that name. I hope it works for you.
Regards,
Alberto
We just use Ghostscript. I wrote Ghostscript setup instructions earlier. We also print Word documents we've filled in to PDF from our app by printing them to 'Sybase DataWindow PS' printer then running Ghostscript to make the PDF.
Good Question - There really isn't an easy way other than finding a third party tool. I've tried the prior method mentioned and it does work but not without headaches and you are left with deployment headaches, deploying ghost script and having to make sure Post Script drivers are on the client.
I ended up trying many PDF converters, both free and paid, the one that worked most seamlessly was one that installed as a "printer" such as if you have Adobe installed on the PC, but you need to dynamically verify existence of the printer via RegistryGet and if it doesn't exist ask user to install or install it dynamically via code, and registry entries (not fun).
After several headaches mostly related to deployment issues I ended up going with a server solution, but it requires having a server that you can have a process (distiller) running that grabs post script files and distills them to PDF. I used a response window with progress bar, the PB app printed post script file to server location upon which the distiller grabs and converts. My PB app polls the server until it finds the PDF, or the user cancels whichever comes first. With a good distiller the process is fast (< 5 seconds) which was acceptable to our users.
Upon existence of the PDF, we'd attach it to an email and send via Oracle (mapi). This solution limits the requirements on client to post script driver which in most corporate environments is there, but you need to check it via Registry. Maybe there is a better solution out there since I did this last, around 2008.
fyi- I usually don't make vendor recommendations but will in this case because there was one that stood out in ease of use and quality, it was called PDFCreator which installs as a windows printer. It looks to be open-source right now but I recall that we would have had to pay to use it in corporate environment.
Good Luck.
Use the tutorial How to use PowerBuilder to create PDF file?.

How to tell Windows Explorer not to request file details and thumbnails in certain folder?

Is there a way (via shell extension or registry setting) to tell Windows Explorer that it shouldn't read files in the folder being shown in order to extract metadata or create thumbnails?
The problem is that when the user navigates to the folder, Windows Explorer attempts to read all files in the folder and extract certain metadata from them. If the medium is slow, this takes ages and causes unnecessary load on the file system. This is especially true in case of thumbnails, when the whole graphic file is read.
I am looking for ways to do this (restrict Explorer) in code, so "don't use Thumbnail mode" is not an acceptable answer :).
Upd: per-user settings won't work unfortunately cause we as a disk provider can deal only with our own disk (and the user might want to have separate settings for regular disks and virtual disks). I believe there must be some way to "explain" the OS that the drive is slow.
Maybe there's some IRP on driver level that we need to handle to tell the OS that the medium is slow?
Is there a way (via shell extension or
registry setting) to tell Windows
Explorer that it shouldn't read files
in the folder being shown in order to
extract metadata or create thumbnails?
Not that I know off, but depending on the priorities regarding the use case details you outlined there might be two options still to approximate the desired result:
Via group policy
Note that this essential expands/details the network folder related aspect of Freds answer, which you dismissed in your update; however, you claim to be able to deploy shell extensions or registry settings and the following two group policies simply execute the latter by administrative means:
User Configuration -> Administrative Templates -> Windows Components -> Windows Explorer:
Turn off the display of thumbnails and only display icons **on network folders**
Turns off the caching of thumbnails in hidden thumbs.db files.
This boils down to the following registry settings:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"DisableThumbnailsOnNetworkFolders"=dword:00000001
"DisableThumbsDBOnNetworkFolders"=dword:00000001
Of course this is still not per folder, but at least limited to network folders and ignores regular disks and virtual disks.
Via hackish workaround
Given your statement we as disk provider can deal only with our own disk there might be a hackish workaround, though I'm afraid it lacks the last mile (untested by myself).
Starting from Chris W. Reas own answer to How can I suppress those annoying Thumbs.db files in Windows Vista and Windows 7?:
Also worth knowing: In Vista and Windows 7, Thumbs.db applies to network folders only. For local folders, Vista and Windows 7 instead save thumbnail cache information to a database in a local folder at "%userprofile%\AppData\Local\Microsoft\Windows\Explorer"
Continuing from there, Wil claims the following potentially clever solution to work on a per folder basis:
Go to the drive and create a file called thumbs.db (in notepad or anything), then change the permissions on the file for everyone (including SYSTEM) to deny all.
Unfortunately, aside from the automation requirements to create the dummy thumbs.db in each folder, the outcome depends on how Explorer will react on the inaccessible file - because caching is optional as per group policy, it might as well display thumbnails without caching them, making the bandwidth issue even worse in turn ...
Good luck!
I'm not sure if you can disable thumbnail generation/display for certain folders but this article talks about a script which could quickly disable it via context menu.
The script modifies a value in the registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\. I suppose you could find something similar in that key for the other metadata. ShowInfoTip sounds promising. There might be relevant information in other nearby keys.
This may be a complete non-answer depending on your needs, but how about storing the files without file extensions that the OS wants to make thumbnails of? Call it file.jpg.abc and it won't be reading thumbnails, for sure.