[Module] pbPDF-Module
Re: [Module] pbPDF-Module
Hi!
First of all I'm still using PurePDF V2.26 (Normeus) with PurePDF-A3.pb.
https://www.purebasic.fr/english/viewto ... 82#p573182
I now have to switch from Win7x64 (RIP) to Win11x64 and got a lot of trouble.
One thing is that I now get an IMA in PurePDF-A3.pb in
Procedure.i ipdf_TTF_SearchTagName(*TTF_Memory.TTF_Header,TagName.s)
where
Version = ipdf_EndianL(*TTF_Memory\sfnt_version)
gives that error.
Debugging *TTF_Memory shows that the adress is not zero.
I used on my older machine Win7 with PB 6.10x64 and C backend. There the
code is still compiling and running without any problem.
Now I have the same setting but on Win11x64.
The in structure TTF_Header sfnt_version is defined as long. I changed it
to integer but that didn't help.
Any ideas what changed from win7 to win11 that can cause this error?
A change to another PDF-modul or the new PDF-functions in PB is not
an alternative. My program is only for my private use and has over
the years grown to more than 20000 lines of code (without the includes).
Please help.
Lord
First of all I'm still using PurePDF V2.26 (Normeus) with PurePDF-A3.pb.
https://www.purebasic.fr/english/viewto ... 82#p573182
I now have to switch from Win7x64 (RIP) to Win11x64 and got a lot of trouble.
One thing is that I now get an IMA in PurePDF-A3.pb in
Procedure.i ipdf_TTF_SearchTagName(*TTF_Memory.TTF_Header,TagName.s)
where
Version = ipdf_EndianL(*TTF_Memory\sfnt_version)
gives that error.
Debugging *TTF_Memory shows that the adress is not zero.
I used on my older machine Win7 with PB 6.10x64 and C backend. There the
code is still compiling and running without any problem.
Now I have the same setting but on Win11x64.
The in structure TTF_Header sfnt_version is defined as long. I changed it
to integer but that didn't help.
Any ideas what changed from win7 to win11 that can cause this error?
A change to another PDF-modul or the new PDF-functions in PB is not
an alternative. My program is only for my private use and has over
the years grown to more than 20000 lines of code (without the includes).
Please help.
Lord

Re: [Module] pbPDF-Module
Still need help.
But a first success in finding the problem(s).
In Procedure ipdf_Get_Font() line "PokeL(*Buffer,Mem)" is wrong.
This should be a "PokeI(*Buffer,Mem)".
This bug caused the IMA in Procedure ipdf_TTF_SearchTagName()
because *TTF_Memory here was invalid (32bit instead 64 bit).
Now I get an IMA in ipdf_GetStringWidth():
Glyph=ipdf_EndianW(Fonts()\cidtogidmap\segment[Char])&$FFFF
I don't know, why all this wasn't a problem in Win7.
Any ideas?
But a first success in finding the problem(s).
In Procedure ipdf_Get_Font() line "PokeL(*Buffer,Mem)" is wrong.
This should be a "PokeI(*Buffer,Mem)".
This bug caused the IMA in Procedure ipdf_TTF_SearchTagName()
because *TTF_Memory here was invalid (32bit instead 64 bit).
Now I get an IMA in ipdf_GetStringWidth():
Glyph=ipdf_EndianW(Fonts()\cidtogidmap\segment[Char])&$FFFF
I don't know, why all this wasn't a problem in Win7.
Any ideas?

Re: [Module] pbPDF-Module
The memory management has changed. Memory pointers should always be defined as integers or pointers.
Before the old OS or compiler had the pointer fit into a long. With the new safe memory management this is no longer possible.
Many had taken the type long (when there was only 32bit or did not pay attention).
Before the old OS or compiler had the pointer fit into a long. With the new safe memory management this is no longer possible.
Many had taken the type long (when there was only 32bit or did not pay attention).
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
I can hardly correct errors in procedures that do not exist in my module.
You should post your problems at PurePDF and not at pbPDF.
As mk-soft has already described, the code must be adapted to 64Bit, as I have done with pbPDF.
You should post your problems at PurePDF and not at pbPDF.
As mk-soft has already described, the code must be adapted to 64Bit, as I have done with pbPDF.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Re: [Module] pbPDF-Module
Besides, you are in the wrong post and has nothing to do with the pbPDF module, but with the PurePDF.
The pbPDF does not have this error.
The admin should separate this from here.
The pbPDF does not have this error.
The admin should separate this from here.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: [Module] pbPDF-Module
Thanks to both of you for your answers.
I copied the still on my old sytem stored PB-installer for 6.10 to my new machine, also the source code.
So the difference is only the Windows version.
OK, but why does it happen? I use the same PBv6.10x64 on Win7 and Win 11.Thorsten1867 wrote: Sun Jun 09, 2024 10:05 am I can hardly correct errors in procedures that do not exist in my module.
You should post your problems at PurePDF and not at pbPDF.
As mk-soft has already described, the code must be adapted to 64Bit, as I have done with pbPDF.
I copied the still on my old sytem stored PB-installer for 6.10 to my new machine, also the source code.
So the difference is only the Windows version.

Re: [Module] pbPDF-Module
@Lord
The OS memory management has changed too.
Have you already run pbPDF ? Not PurePDF
The OS memory management has changed too.
Have you already run pbPDF ? Not PurePDF
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: [Module] pbPDF-Module
Yes, I tried to switch the PDF part of my program.
As I already mentioned, my program has more than 20k of codelines
and more than 3k for the pdf part. I tried to rewrite it but had
no success. To many changes.

Re: [Module] pbPDF-Module
@lord, This is the pbPDF-Module thread, you should post on the PurePDF thread. Anyway since pbPDF was running fine on w7 and it fails now on windows 11, I would assume is a missing font error ( the procedure you mentioned deals with fonts ). check to make sure the fonts you used on windows 7 are installed in windows 11 and also install fonts systemwide otherwise they will be installed on your personal folder. pbPDF and also PurePDF will not be able to find the font there unless you specify the full path of the font.
Norm.
P.S.
If I do not reply within a couple of days send me a PM. Sometimes I miss posts.
Norm.
P.S.
If I do not reply within a couple of days send me a PM. Sometimes I miss posts.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Re: [Module] pbPDF-Module
Hi Normeus!
I'm happy to tell you that I got my program working again.
I have tried some fonts that are available on my Win7 and Win11 computer.
All turned out to produce the same error except one font.
It turned out that only Helvetica and Arial seem to work without producing an IMA.
Arial is present on only some locations in my program. Mostly I used MS Sans Serif Standard.
After switching from MS Sans Serif Standard to Helvetica everything is working.
My first tought was, that for any reason only Fonts are available wich are defined PurePDF-A3.pb,
but Arial is there not mentioned, only Helvetica.
Anyway. As I said, I'm happy that my 'little' program is running again.
Thank you for giving me the right direction.
I'm happy to tell you that I got my program working again.
I have tried some fonts that are available on my Win7 and Win11 computer.
All turned out to produce the same error except one font.
It turned out that only Helvetica and Arial seem to work without producing an IMA.
Arial is present on only some locations in my program. Mostly I used MS Sans Serif Standard.
After switching from MS Sans Serif Standard to Helvetica everything is working.
My first tought was, that for any reason only Fonts are available wich are defined PurePDF-A3.pb,
but Arial is there not mentioned, only Helvetica.
Anyway. As I said, I'm happy that my 'little' program is running again.
Thank you for giving me the right direction.

Re: [Module] pbPDF-Module
normeus Thank you for your answer. Only now, from Apr 07, 2024 10:50 am. I looked at this post - hence my delay in thanking you.