pdftoprinter.exe Orientation page command - vb6

I need page orientation to landscape with a command through pdftoprinter.exe, does anyone know what parameter?
Dim retval
retval = Shell(App.Path & "\PDFtoPrinter.EXE C:\_GR\VB6\TEstePDF_Printer\pdfs\teste*.pdf ", 0)

If you want to change the orientation, you can use the advise given on the documentation of using the dat-file created by PDF-Xchange viewer:
By default, this system uses these printing options as set in PDF-XChange Viewer: Scaling is set to None; Auto-rotate Sheets; Auto-centre pages in sheets; and Choose paper source by PDF-page size. If you want to change any of these, or choose any other options, download and install PDF-XChange Viewer; open a PDF file, go to the Print menu, set your desired options (and, just to be certain, print the file). Then go to the Edit menu and choose Export All Settings to Data File... Accept the suggested filename, "PDF-XChange Viewer Settings.dat", and save the file to a convenient location. Move or copy the file to the same folder with PDFtoPrinter.exe. When you next run PDFtoPrinter.exe it will use the settings saved in that file.
Found here.
Mind that:
Move or copy the file to the same folder with PDFtoPrinter.exe.

Related

How do I write a script that will change the size of text and app when opening a program?

I have a Windows 7 laptop with the size of text and apps set to small. However, one program I use needs this setting to be set on medium. I'm sick of changing this setting every time I have to use the program.
How do I use a batch file to change the size and text of this program to medium without impacting other programs and keep the resolution at 1280x960?
I have no previous experience in writing batch files.
If the program is a batch file or its cmd.exe, you can just create a shortcut to that program, go into shortcut properties, go into the Layout tab and set the window size by changing Width to the width you want the window to be and the Height to the height you want to window to be. For the text go into the Font tab and set the text size to an option already there or input a custom one by clicking in the box that tells you the size selected and type in your own. Then press enter. This will close the properties. You must do this or it will go to the nearest option to your custom size. Now simply run the shortcut instead of running said program and it should have custom size and text.

How do I drag and drop an external file to my xojo app and return the path

I wanted to drag a file (say abc.txt) to my xojo program and let it to write out the path of the dropped file, returning something like C:\\mydata\abc.txt.
How do I go about doing it? Do I need to enable some properties?
I can't find anything useful from manual or forum.
First, add a File Type Set to your project. It'll be named FileTypes1 initially, but better rename it to "DropTypes". Add file types to it that you like to accept. To accept any file, click on the center of these buttons in the IDE's File Type Set editor:
Choose special/any.
Next, add this line to the Open event of the control or window that should allow drops:
me.AcceptFileDrop DropTypes.All
Then add this code to the control's or window's DropObject event:
if obj.FolderItemAvailable then
dim f as FolderItem = obj.FolderItem
' Now you have the file reference in f.
' Get the path:
dim path as String = f.NativePath ' (in older RB versions, use *f.AbsolutePath* instead)
' Show the path:
MsgBox path
end

Take full localhost webpage screenshot (Firefox, Windows)?

I need to take a full screenshot of a localhost page I'm working on. Print Screen button offers me no solution to this nor the Alt-Print Screen does, as they take only what is displayed on the screen. I need the shot of the full page.
I tried with some online services and a couple of add-ons for Firefox to no avail since they cannot reach any localhost addess or are not compatible with FF 29.
Is there a way I can achieve this?
I'll answer my own question.
Forget about add-ons. You can do it via the browser's built-in Developer's Toolbar commands.
Press Shift+F2 and to bring the toolbar up at the bottom of the screen.
Type: screenshot file --fullpage
You will be asked for a location to sav your screenshot in .png format (e.g. file.png).
You can also omit the file name if you don't want the image to be saved and rather send it to the clipboard: - screenshot --fullpage --clipboard
Type screenshot help to see more interesting options.
The Firefox source docs tell how to take a screenshot with the developer tools
Using the screenshot icon
By default, the screenshot icon is not enabled. To enable it:
visit the Settings page
find the section labeled “Available Toolbox Buttons”
check the box labeled “Take a screenshot of the entire page”.
Using the screenshot command
Type :screenshot in the Web Console to create a screenshot of the
current page. By default, the image file will be named Screen Shot
yyy-mm-dd at hh.mm.ss.png.
Helpful params
Command
Type
Description
--clipboard
boolean
When present, this parameter will cause the screenshot to be copied to the clipboard. Prevents saving to a file unless you use the --file option to force file writing.
--delay
number
The number of seconds to delay before taking the screenshot; you can use an integer or floating point number. This is useful if you want to pop open a menu or invoke a hover state for the screenshot.
--dpr
number
The device pixel ratio to use when taking the screenshot. Values above 1 yield “zoomed-in” images, whereas values below 1 create “zoomed-out” images.
--file
boolean
When present, the screenshot will be saved to a file, even if other options (e.g. --clipboard) are included.
--filename
string
The name to use in saving the file. The file should have a “.png” extension.
--fullpage
boolean
If included, the full webpage will be saved. With this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot. When used, "-fullpage” will be appended to the file name.
--selector
string
A CSS selector that selects a single element on the page. When supplied, only this element and its descendants will be included in the screenshot.

Export Notebook as one long pdf page using Mathematica?

I need to export my notebook to show my work.
I want the pdf just to look like what I see on my screen in the same format as I scroll down through my notebook.
Is it possible ?
Edit :
New solution, new problem, thanks to Verbeia, I was able to have obtain a "1 long page" pdf out of my notebook. But there remain weird formatting behavior as below, can we fix that ?
While my notebook looks like :
This works for me under Mac OS X 10.6, Mma 8.0.1:
Select the whole notebook. This is easiest done if you have a top-level title or heading at the beginning of the document.
Choose "Save Selection As..." from the File menu (screenshot 1).
Choose PDF from the resulting dialog (screenshot 2).
You need to use "Save Selection As...", because "Save As" does try to calculate page breaks. If I understand your question correctly, you want a long "scroll" PDF with no page breaks. "Save Selection As..." does that.
EDIT in response to 500's question edit
To ensure the content goes "full width", you need to set the Printing Environment properly. I found setting the Printing Environment to the default Printing (see screenshot) and setting landscape paper in the Page Setup gave good results. Alternatively, you could go to the Option Inspector and set the Page Size or Paper Size settings for that notebook explicitly.
(on Mac OS X you get there from the Mathematica menu > Preferences > Advanced Tab > Show Option Inspector button > Notebook options > Printing options > Printing Options)
I don't know whether this will help for the this specific case. You can explicitly enter a page break into Mathematica using Insert > Page Break (appears at the bottom of the Insert menu). Try doing that before and after the image you have here.
Exporting by saving the notebook as a pdf and exporting by using the Export function often have different results as well. You may wish to try using the Export function out.

Adding new filetypes to Windows 7's New context menu

I'm trying to add CSS, PHP, JS and HTML file types to the "New" right click menu in Windows 7. I know how to add the file types to the menu with ShellNew entries in the registry. But Windows doesn't give you any control over the display names of the new items - according to this the name's always taken from whatever application you've assigned to open the doc. I've set Notepad++ to open all of these file types, so I'm going to end up with several identical "Notepad++ document" entries in the menu, like this:
Does anybody know if there's a way out of this stupid situation without installing any tweak utilities?
Thanks all!
Fred
To rename a context menu > new's item (in Windows 7, at least):
Open regedit.
Go to HKEY_CLASSES_ROOT\.%ext% and note the (Default) value. This is the file extension's ProdID.
Go to HKEY_CLASSES_ROOT\%ProdID% (usually %ext%file) using the value obtained from step two. Set the (Default) value to whatever you would like the context menu new item to display as.
Under HKEY_CLASSES_ROOT\%ProdID%, if there is a FriendlyTypeName value, rename it to FriendlyTypeName.old, as the (Default) value "is deprecated by the FriendlyTypeName entry"
I don't believe there is even a need to log out / restart, but if the changes don't take effect, log out and/or restart.
You could change the file type description for each file class manually.
Look up the prog id under HKEY_CLASSES_ROOT\.%ext% (The default value)
Under HKEY_CLASSES_ROOT\%progid%, set the default value and/or the "FriendlyTypeName" string to the string you want.
You might have to log off for it to take effect.
You should probably stay away from the Chrome and Notepad++ file type/association dialogs so they don't overwrite your strings.
Both Chrome and Notepad++ are open source, you can create a patch for them that use better names for the file types. (What is a "Chrome HTML Document" anyway, HTML5 + extra chrome juice? =) )
I was able to derive a solution from the answers above.
I replicated the particular application (JetBrains PHPStorm in my case) registry entry.
PHPStorm2019.1 -> PHPStorm2019.1.scss, PHPStorm2019.1.js.
Now I changed the Default REG_SZ of PHPStorm2019.1.scss to SCSS File and PHPStorm2019.1.js to JavaScript file.
Mapped .scss and .js to PHPStorm2019.1.scss and PHPStorm2019.1.js respectively.

Resources