PDF Viewer DLL?

Moderator: Rathinagiri


edk
Posts: 114
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 27 times
Been thanked: 53 times

Post by edk » Thu Apr 20, 2017 9:06 pm

mol wrote:
Thu Apr 20, 2017 8:43 pm
Dzięki!
+1

User avatar
Pablo César
Posts: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Fri Apr 21, 2017 2:29 am

KDJ wrote:
Thu Apr 20, 2017 8:39 pm
New version of PdfView for HMG 3.4.4.
It doesn't work with earlier HMG versions.
Very good to make mention in the posted message. :)
SumatraPDF as library 32-bit:
SumatraPDF_lib_32bit.zip
Nice ! :P

Excellent work, Krzysztof !

I liked that you left in "Settings" the option "Open PDF at once" (GRID event ON CHANGE) and other options as well. Availability in a correct and objective manner in my POV.

I would like to add how directives could be done for those who use the IDE and/or want to still use the batch file for compilation and still maintain the settings that you include in the HBP (project file).

I have noted that you use directives in the hbp file very often. But this when is being used the IDE for compiling, is completely lost. You can check the Build.log file and see in it (not recognize these directives.
I clarify this because there are some colleagues who use the compilation (as well as me) and could find some difficulty.

Harbour and more precisely the IDE allows you to do the compiler directives through the HBC file.

I read about each one of them and I even tested and removed each one of them but I think maybe they are not necessary because (I believe) Harbour defaults these directives:

Code: Select all

#harbour options:
-a
-m
-n
-v
-w3

#hbmk2 options:
#-compr
I know this last line, you let it as comment, just for who want to compress compiling

All this is still new to me (hbc use), if you believe so needed, could you please explain why these "harbour options" are used for in your project ?

I have done (please revise it if it's correct) the following changes:
  1. I have created a sub-folder named lib at current project's folder and placed your libSumatraPDF.a file lib.
     
  2. For PdfView.hbc:

    Code: Select all

    libpaths=lib
    libs=SumatraPDF
    prgflags=-w3
    #compr=min
    Please note this is the right way to be used when wish to compress it or using max flag option.
    prgflags can be added (with space character between each "harbour options").
     
  3. For PdfView.hbp:

    Code: Select all

    pdfview.prg
  4. For PdfViewBuild.cmd:

    Code: Select all

    call C:\hmg.3.4.4\build.bat PdfView.hbp PdfView.hbc
    Please note that PdfView.hbc was added. So it's going to work by IDE and by batch file in building process.
     
  5. And renamed a typo in name of SumatraPDFLibBuild32.cmd.
    It also good to say that HMGPATH is needing for change folder name according with our HMG installation.
I only wished to add my comments, in order to let this project and example workable for both: batch file and IDE.
I am in doubt if these directives are so necessary but be that any case, these changes that I indicate may be useful for the future.

However I want to clarify that your batch files files work very well.
Given the other way of compilation in Harbour and consequently in HMG.

Thank you very much Krzysztof for this brillant work.

Dzięki!
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
bpd2000
Posts: 926
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 90 times
Been thanked: 29 times

Post by bpd2000 » Fri Apr 21, 2017 4:16 am

mol wrote:
Thu Apr 20, 2017 8:43 pm
Dzięki!
+1
BPD
HMG Convert Dream into Reality

User avatar
serge_girard
Posts: 1745
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 225 times
Been thanked: 44 times
Contact:

Post by serge_girard » Fri Apr 21, 2017 6:41 am

Thanks Krzysztof !

KDJ
Posts: 159
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 140 times

Post by KDJ » Fri Apr 21, 2017 7:55 pm

Hi Pablo

I do not use HMG IDE.
For compiling I use .cmd (.bat) and .hbp files.
In .hbp you can place all options for compiler and linker, so .hbc file is unnecessary.
And you can place libSumatraPDF.a library in HMGdirectory\lib.

User avatar
Pablo César
Posts: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Sat Apr 22, 2017 2:03 am

Hi Krzysztof,
KDJ wrote:
Fri Apr 21, 2017 7:55 pm
In .hbp you can place all options for compiler and linker, so .hbc file is unnecessary.
Yes but to work properly with the IDE must be present hbc. It's what I already said.
Otherwise all directives that you put in hbp file will be lost and in hbc file is not the say way as you do in hbp.

What I tried to say is this project have been done ready to be compiled by batch file and not for IDE. But even losing those directives in IDE, will compile anyway because those directives are not so necessary be setted (I guess).

You do not use IDE to compile, but there are many who use it a lot. And to meet those users I've clarified how to make it workable without losing the settings options for IDE building. So I asked to you for an explanation of these directives. ;)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Sat Apr 22, 2017 2:33 am

If you make a test opening this project at IDE and after you builded, will run ok but check again the hbp file you will see all those setting will be lost.
This is the main reason of .hbc files. At least important for whom use IDE on compiling process.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

KDJ
Posts: 159
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 140 times

Post by KDJ » Sat Apr 22, 2017 1:36 pm

OK, Pablo. Check whether this will be good:

PdfView_source.zip
(12.9 KiB) Downloaded 16 times

However I do not understand why IDE changes .hbp file content.
It also changes .rc content.
And how to create library (eg. libSumatraPDF.a) via IDE?

User avatar
Pablo César
Posts: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Sat Apr 22, 2017 3:38 pm

I think it's great ! :)
However I do not understand why IDE changes .hbp file content.
It also changes .rc content.
Unfortunately, IDE always changes these files.
I think the IDE should only write when they are changed through the IDE.

But what I think is still very bad is when the DBF files are not lberados even leaving the table manager, HMG Report Builder and also occurs with the project folder, which even closing the project does not release. This was pointed out in: viewtopic.php?p=47543#p47543
And how to create library (eg. libSumatraPDF.a) via IDE?
In POV I do not think so necessary. Because it's make it at once.

I have no difficulty in compiling other projects unless at least some of the files are missing.

Sorry to bother you, I just wanted you to know why I've noticed that in your previous projects you used to do that (not that this could be wrong in Harbour) but and some colleagues could find the same problem at missing directives.

Thank Krzysztof.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest