Skeletor

GUI tabs to PDF

12 posts in this topic

#1 ·  Posted

Hi Guys,

I've been reading this post ...

When I came accross the examples, non of them had what I was looking for.

I basically want to "snapshot" my GUI's multiple tabs and send them into the pdf.

A little nudge from you guys would be great.
Im really stuck with this one, therefore I have no code.
Lets discuss or point me in a right direction... thanks alot

 

2017-07-10 00_03_40-Clipboard.jpg


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites



#2 ·  Posted

Can you provide more details? Is this a one time event or something you would do on a regular basis?

Share this post


Link to post
Share on other sites

#3 ·  Posted

As my screenshot provided in the original post, I was to try capture the tabs and inset them to a pdf.. otherwise, how would you capture checkboxes, edit boxes and input boxes to pdf?


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#4 ·  Posted

I understand that you want to capture the tab and it's contents. What isn't clear is why you are doing this, how often it needs to occur, etc. If this is a one-time thing (such as creating documentation), then it's better accomplished using a screen capture tool such as Greenshot.

Share this post


Link to post
Share on other sites

#5 ·  Posted

The function in Word and Excell to save as PDF is what I'm trying to achieve.
If I tell the program to save to pdf, it would need to save the checkboxes, edit boxes, etc.

 


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#6 ·  Posted

Basically output the tabs in that format...


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#7 ·  Posted

Updating this post in case someone comes along looking for the same answers.

Found this UDF that uses a dll. 

I'll test this and see if I get the results I'm looking for.


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#8 ·  Posted

Here is an update:
In order to attempt the print, the long way round is to create your gui in html...

Like I said, its not the solution but a work around...


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#9 ·  Posted

Found a script that will turn a webpage to PDF. 
 

 


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#10 ·  Posted

You might want to consider using this:

It isn't free (the PDF library) as far as I recall, but it does contain a lot of functions like inserting images into PDFs. You can use _ScreenCapture_CaptureWnd to capture your window

1 person likes this

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#11 ·  Posted

This is brilliant. Thank you @TheDcoder for this post. I'll look into this for sure. 


Kind Regards
Skeletor

"I need coffee to turn me back to a normal human"

Share this post


Link to post
Share on other sites

#12 ·  Posted

I was also going to recommend QuickPDF, but was beaten to it...

Conceptually, I would capture each tab as a separate image, and insert into a separate PDF page, for simplicity sake.

Post a screenshot with mission accomplished?

Skysnake


Skysnake

Why is the snake in the sky?

Share this post


Link to post
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

  • Similar Content

    • Skeletor
      By Skeletor
      MS Splash Screens
      The office 2016/17 office suite has made many people turn heads with its functions and especially their splash screen.
      I now present to you, the MS Style Splash Screen. For Rookies, Novices and anyone who wants a ready made splash screen for your gui application.

      You can now download it and also try it out yourself.
      You have three colors to choose from:
      Blue
      Red
      Green
      All three colours are from the famous programs.
      I also included the KODA form to you can have freedom with this splash screen.
      Note: the KODA form does not have the three colours as well as the correct blue. 

      Have fun and enjoy.
      Note:
      I will update the splash to add the automated 3 dots animation at a later stage. 
       
       
    • Skeletor
      By Skeletor
      A gui splash screen. Themed after the famous MS Office Suite.
      Three colours to choose from, Red, Blue and Green.
      You can change the labels to your own application.

      Also bundled with this is the KODA form. So you can open up and see the basic structure of this splash screen.
       
      Splash Screen GUI.zip
    • BlazerV60
      By BlazerV60
      Hello all,
      I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods:
      ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried:
      ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried:
      RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir)  
      But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? 
      Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com
       
      Thank you,
      Brian
    • SteveJM
      By SteveJM
      I have a working program currently driven largely through menu selections. I would like to add a toolbar where most of the tollbar button actions are basically the same as menu items, but quicker to access. I have been wading around in toolbar examples, MSDN pages etc, it's clearly going to be a bit of a slog to get everything right, including tooltips etc. I thought I would start with something simple to prove the principle.
      Using bits from the help file examples I have a small program that successfully displays a toolbar. However, what seemed like the most elegant way to deal with the button commands does not seem to work. My understanding was that a toolbar button fires a WM_COMMAND message, with the command Id set by the second parameter in the call to
      _GUICtrlToolbar_AddButton ( $hWnd, $iID, $iImage)
      so I though it would be a good idea to set this Id to the same value as my menu item Id; then it would run the same task which is what I wanted. This did not work. I am using message loop mode and would like to stick with this because some of my scripts run hardware at the same time as the gui; it is easier if I don't have to worry about code being interrupted with the hardware in an unknown state . So I added a handler for WM_COMMAND, with some cribbed display code to try and see why. The toolbar button defintely fired a WM_COMMAND message and the Id looked the same, so no explanation there.
      I guess the issue is with GUIGetMsg() which may be constructed to ignore all but a limited number of control handles, i.e. those made with the GuiCtrlCreate... commands; this is speculation.
      I would dearly love to find a tidy way to get around this. Having some controls handled in the message loop and some in a WM_COMMAND handler, performing the same task, feels ugly. I would be very grateful for further insight from someone experienced with handling a toolbar. Perhaps I should be trying to fire the menu item. I have attached a code snippet to try and illustrate the issue.
       
       
       
      ToolbarTrial.au3
    • mLipok
      By mLipok
      Here:
      https://github.com/nachbar/TRichViewToPdfUsingDebenu/blob/master/Unit1.cpp
      I found a code in C++ for file format conversion from RTF to PDF with using Debenu QuickPDF.
      I know how to use Debenu QuickPDF in AutoIt .
      My question is about RTF part of this code:
       
      HDC hdcNew = debenu->GetCanvasDC( RTFPRINTINGDOTSPERINCH * RTFPAGEWIDTHININCHES, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight);  
      First there is hdcNew declaration , and this is not the problem.
      My problem is in converting the following code snippet, to AutoIt
      canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight);
      If you remember, I created RTFPrinter sometime ago. But it was some time ago , and created by trial and error, rather than in-depth analysis.
      Also, it was just a modification of another script, not my own work from scratch.
      So now I'm looking for help how to adapt this code snippet to AutoIt.
      Any tips ?
       
      Regards,
      mLIpok