Jump to content

PDF To Clipboard...


Recommended Posts

I have been successful in my endeavors to get a thumbnail of a PDF, but we do not have image manipulation functions in AutoIt. I basically am interested in any code that could be shared (even if I need to make a plugin) that will take information (picture object) from the clipboard resize to 50% oringinal size. I can get it to the clipboard, I just cant get it off without the dirty methods.

Maybe if Lazy cat could share how his works internally or if it just uses the DLL/Plugin he created. I really would love to be able to have these PDF's as a thumbnail so the person using my program will know which is which.

I have tried just using GUICtrlCreateObj() and including the Acrobat in there, but that isnt working out as planned.

Someone let me know if they know of a solution. I have been googling for a bit, and searching through the different screen capture functions I have seen on the forum. All of them are the entire solution, not just the second half :D.

Edit: Found _ClipPutFile() which is the exact opposite of what I need. :P

Thanks :D,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

If you are not opposed to third-party programs, I'd normally say IrfanView http://www.irfanview.com/main_what_is_engl.htm

However, it appears to lack a resize by percentage--I only see /resize=(w,h)

Maybe imagemagick would work--I have not tried.

http://www.imagemagick.org/script/binary-r...ses.php#windows

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

However, it appears to lack a resize by percentage--I only see /resize=(w,h)

I agree with Cyberslug about simply using IrfanView. As to resize by percentage you can simply do this with AutoIT code (imagewidth/X = desired percent reduction) solve for X and plug it into the run command that you launch irfanview from.
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Link to comment
Share on other sites

I agree with Cyberslug about simply using IrfanView. As to resize by percentage you can simply do this with AutoIT code (imagewidth/X = desired percent reduction) solve for X and plug it into the run command that you launch irfanview from.

I have thought about Irfan View. I have it installed on my system (always have and always will :D), but I have been unable in my searches to find the command line options for it.

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Command line options allow you to set some functions of IrfanView before the viewer is launched.

These command line options are supported in IrfanView:

/one - force 'Only one instance'

/fs - force Full Screen display

/bf - force 'Fit images to desktop' display option

/title=text - set window title to 'text'

/pos=(x,y) - move the window to x,y

/convert=filename - convert input file to 'filename' and close IrfanView

(see Pattern page for additional options)

/slideshow=txtfile - play slideshow with the files from 'txtfile'

/slideshow=folder - play slideshow with the files from 'folder'

/thumbs - force thumbnails

/killmesoftly - close all IrfanView instances

/closeslideshow - close slideshow and close IrfanView after the last image

/page=X - open page number X from a multipage input image

/crop=(x,y,w,h) - crop input image: x-start, y-start, width, height

/print - print input image to default printer and close IrfanView

/print="Name" - print input image to specific printer and close IrfanView

/resize=(w,h) - resize input image to w (width) and h (height)

/resample=(w,h) - resample input image to w (width) and h (height)

/capture=X - capture the screen or window (see examples below)

/ini - use the Windows folder for INI/LST files (read/save)

/ini="Folder" - use the folder "Folder" for INI/LST files (read/save)

/clippaste - paste image from the clipboard

/clipcopy - copy image to the clipboard

/silent - don't show error messages for command line read/save errors

/invert - invert the input image

/dpi=(x,y) - change DPI values

/scan - acquire the image from the TWAIN device - show TWAIN dialog

/scanhidden - acquire the image from the TWAIN device - hide TWAIN dialog

/batchscan=(options) - simulate menu: File->Batch Scanning, see below for example

/bpp=BitsPerPixel - change color depth of the input image to BitsPerPixel

/swap_bw - swap black and white color

/gray - convert input image to grayscale

/rotate_r - rotate input image to right

/rotate_l - rotate input image to left

/filepattern="x" - browse only specific files

/sharpen=X - open image and apply the sharpen filter value X

/contrast=X - open image and apply the contrast value X

/hide=X - hide toolbar, status bar, menu and/or caption of the main window (see examples below)

/aspectratio - used for /resize and /resample, keep image proportions

/info=txtfile - write image infos to "txtfile"

/append=tiffile - append image as (TIF) page to "tiffile"

/multitif=(tif,files) - create multipage TIF from input files

/jpgq=X - set JPG save quality

/tifc=X - set TIF save compression

/wall=X - set image as wallpaper

/extract=(file,ext) - extract all pages from a multipage file

/import_pal=palfile - import and apply a special palette to the image (PAL format)

/monitor=X - start EXE-Slideshow on monitor X

They are in the Irfanview help file.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

They are in the Irfanview help file.

Yea... I finally found them there. I had checked every where, including there, but didnt type in command line. I didnt think through all the options that it could be under in the helpfile :D

Thank you everyone!

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...