Silverfrost Forums

Welcome to our forums

Help with Creating Pdf frm cLear win and...

24 Oct 2017 1:22 #20541

Hello Everyone,

Please can anyone help me on these two issues really troubling me?

  1. creating and Saving a .PDF File(the Pdf file would also include some drawings) in clearwin+

  2. To Create a format window in which has multiple windows(pages) that will be shown as just one format window but with buttons so that one can go to the next page(format) window and or back to the previous page

Thank you

24 Oct 2017 6:44 #20543

Using property sheets may give you the functionality that you are looking for in your second question.

Here's my standard building block for starting new code.

program main
include<windows.ins>
integer i
integer,save:: h1, h2, h3

!---1st sheet
i = winio@('%sh&',h1)
i = winio@('%fn[Tahoma]&')
i = winio@('%ca[Sheet 1]&')
i = winio@('%bg&',rgb@(250,250,250))

! MAIN BODY OF SHEET 1 GOES HERE
         i = winio@('%tc[red]&')
         i = winio@('%ws&','Sheet 1')

! END OF MAIN BODY OF SHEET 1
i = winio@(' ')

!---2nd sheet
i = winio@('%sh&',h2)
i = winio@('%fn[Tahoma]&')
i = winio@('%ca[Sheet 2]&')
i = winio@('%bg&',rgb@(250,250,250))

! MAIN BODY OF SHEET 2 GOES HERE
         i = winio@('%tc[blue]&')
         i = winio@('%ws&','Sheet 2')

! END OF MAIN BODY OF SHEET 1
i = winio@(' ')

!---3rd sheet
i = winio@('%sh&',h3)
i = winio@('%fn[Tahoma]&')
i = winio@('%ca[Sheet 3]&')
i = winio@('%bg&',rgb@(250,250,250))

! MAIN BODY OF SHEET 3 GOES HERE
         i = winio@('%tc[green]&')
         i = winio@('%ws&','Sheet 3')

! END OF MAIN BODY OF SHEET 1
i = winio@(' ')

!---Display the combined sheets
i = winio@('%mn[Exit]&','exit')
i = winio@('%ca[Property Sheet Example]&')
i = winio@('%bg&',rgb@(250,250,250))
i = winio@('%3ps[hot_track]&',h1,h2,h3)
i = winio@(' ')

end program main
24 Oct 2017 7:48 (Edited: 26 Oct 2017 12:36) #20545

I hate PDF and glad Steeve Jobs started few years back an 'open war' about expelling it from the practice, at least from Apple products. Hopefully something else will take its place.

/* Fun is that PDF also hates me via what I call 'devilry' I'm permanently experiencing with all types of my computing (sophisticated or way too stupid bugs and problems appearing at wrong time which on the first glance are simply impossible. The goal of devilry is to take the only valuable thing - our time). I convert sometimes DOCX files to PDF and this was one second not noticeable job for decades. Recently though when I convert the files to PDF something is always gets wrong and the reason and solution is almost impossible to find (totally messed up fonts abruptly changing size, or fonts look like they are drunk by packing together which is barely noticeable but at the end of reading this gives very bad impression unconsciously). Worst of all, this always happening in the most important moments when every minute counts and the bad result is completely unacceptable like meeting some grant application deadlines etc. 😦

On your second question you can first create frame window with %fm or %fr, forgot the % control abbreviation as I rarely do that, and now writing from my cellphone. Then you can place any amount of other types of windows on it with their own controls. Property sheet, I agree with Ken, is also very nice option separately or within the frame.

25 Oct 2017 11:21 #20555

Thanks Kenneth and Dan!!..I will try the code and get back to you.

26 Oct 2017 12:37 #20557

John, Lately only Microsoft Office

26 Oct 2017 7:49 #20564

I have written the interfaces to produce a PDF from FTN95 using formatted write for plain text. It is a basic report generator in its simplest form. It does honor the carriage control characters defined in the Fortran standard.

The PDF library (libHaru) is written in 'C' and compile-able using a Plato project.

In addition, there are interfaces in the library to produce line-based drawing (Calcomp Compatible calls) and the library has a number of functions that can be used to add images, etc.

For my application, I do not need a number of optional PDF features (like font changes in mid stream, images, etc.) and the FORTRAN interface is pretty simple because of that.

If you'd like, I can zip up the library, the FTN95 driver, and a sample of how to use it. You can take it farther from there.

Just let me know. Creating your own PDF library from scratch would be a daunting task!

27 Oct 2017 2:24 #20567

Thanks for the info, John.

27 Oct 2017 10:37 #20575

Is there any reason that you don't just invoke the Microsoft print to pdf 'printer' driver? It's what MS Office uses.

27 Oct 2017 12:28 #20578

Yes, in my case it is bad quality on my computer (like everything else controlled by the same devilry 😃. I can post sample here so that all will believe. My colleagues use Apple and there is no such problems. Not sure about Apple but I'd probably leave Microsoft long ago if there existed version of FTN95 for Linux

Please login to reply.