forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with Creating Pdf frm cLear win and...

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Adinoyi



Joined: 23 Oct 2017
Posts: 2
Location: Kano, Nigeria

PostPosted: Tue Oct 24, 2017 2:22 pm    Post subject: Help with Creating Pdf frm cLear win and... Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger
Kenneth_Smith



Joined: 18 May 2012
Posts: 183
Location: Glasgow, Scotland.

PostPosted: Tue Oct 24, 2017 7:44 pm    Post subject: Reply with quote

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.

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
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Tue Oct 24, 2017 8:48 pm    Post subject: Reply with quote

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. Sad

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.


Last edited by DanRRight on Thu Oct 26, 2017 1:36 am; edited 1 time in total
Back to top
View user's profile Send private message
Adinoyi



Joined: 23 Oct 2017
Posts: 2
Location: Kano, Nigeria

PostPosted: Thu Oct 26, 2017 12:21 am    Post subject: Reply with quote

Thanks Kenneth and Dan!!..I will try the code and get back to you.
Back to top
View user's profile Send private message Yahoo Messenger
John-Silver



Joined: 30 Jul 2013
Posts: 914
Location: Aerospace Valley

PostPosted: Thu Oct 26, 2017 1:27 am    Post subject: Reply with quote

Dan, what program do you use to convert to/from .pdf ?
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Thu Oct 26, 2017 1:37 am    Post subject: Reply with quote

John,
Lately only Microsoft Office
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 914
Location: Aerospace Valley

PostPosted: Thu Oct 26, 2017 1:57 am    Post subject: Reply with quote

Adinoyi,
your question about creating a .pfdf file is a bit vague.
Are you trying to create it from within a fortran program ?

You may be disappointed.
ftn95 doesn't have (as far as I'm aware) a module to write any results to a .pdf file .
That leaves you with 22 options -
try to integrate code which calls a 3rd party specialised program to write a pdf or write one yourself.
Of course the latter requires knowledge of the format.
Try this:
http://forums.silverfrost.com/viewtopic.php?t=3631
If you get past the shock first of the almost 800 pages !!!!!

Depending on what you want to do it may be simply to output in other formats and leave the conversion as a seperate activity for the user.

As Dan Sinatra once sang .... " ... that 'ol Devil called lov- ... err pdf ..."
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 467
Location: Morrison, CO, USA

PostPosted: Thu Oct 26, 2017 8:49 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message Visit poster's website
John-Silver



Joined: 30 Jul 2013
Posts: 914
Location: Aerospace Valley

PostPosted: Fri Oct 27, 2017 2:29 am    Post subject: Reply with quote

Dan - try Foxit Phantom , I use it all the time and have never had any 'missing' or screwed up content in the generated pdfs.
It will also integrate a toolbar into Office programs for easy access.
I'm stuck on that since I use Office 2003 (tried, trusted and perfect for 99.9% of what I do) and the newer versions of Foxit stop putting the toolbar there !!!! (only in the ater versions). The toolbar allows to create the pdfs WITH HYPERLINKS still working !
I've found as a workaround also that Open Office does that niely too.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Fri Oct 27, 2017 3:24 am    Post subject: Reply with quote

Thanks for the info, John.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1844
Location: Yateley, Hants, UK

PostPosted: Fri Oct 27, 2017 11:37 am    Post subject: Reply with quote

Is there any reason that you don't just invoke the Microsoft print to pdf 'printer' driver? It's what MS Office uses.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Fri Oct 27, 2017 1:28 pm    Post subject: Reply with quote

Yes, in my case it is bad quality on my computer (like everything else controlled by the same devilry Smile. 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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group