[Module] pbPDF-Module
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Bugfixes
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
Hi,
I found other bugs:
1. Line 3664: PDF()\Page\Y = PDF()\Margin\Right
I think, that the Y coordinate should be set with the Top Margin and not the Right Margin.
2. In the docs it says for SetOpenAction 'Zoom in Prozent (z.B. "50%")'
Setting Zoom var to "100%" gives me a PDF with 6400% view scale and "50%" gives me 5000%, setting Zoom simply to "1" shows the PDF in 100% view scale, so I think percentage is the wrong unit.
Greetings, Hoerbie
I found other bugs:
1. Line 3664: PDF()\Page\Y = PDF()\Margin\Right
I think, that the Y coordinate should be set with the Top Margin and not the Right Margin.
2. In the docs it says for SetOpenAction 'Zoom in Prozent (z.B. "50%")'
Setting Zoom var to "100%" gives me a PDF with 6400% view scale and "50%" gives me 5000%, setting Zoom simply to "1" shows the PDF in 100% view scale, so I think percentage is the wrong unit.
Greetings, Hoerbie
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Bugfixes
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
Thanks, but with your fix of the % bug, now you killed the use of at line 442ff predefined settings of SetOpenAction:
The reworked lines 4560ff
should be changed to something like this (untested):
Code: Select all
;{ ----- Zoom: SetOpenAction() -----
#PageTop = "PageTop"
#FullPage = "FullPage"
#PageWidth = "PageWidth"
;}
Code: Select all
Factor = Val(RTrim(Zoom, "%")) / 100
PDF()\Catalog\OpenAction\Zoom = StrF(Factor, 2)
Code: Select all
If Zoom = #PageTop Or Zoom = #FullPage Or Zoom = #PageWidth
PDF()\Catalog\OpenAction\Zoom = Zoom
Else
Factor = Val(RTrim(Zoom, "%")) / 100
PDF()\Catalog\OpenAction\Zoom = StrF(Factor, 2)
EndIf
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Bugfix
@hoerbie
You're right, I changed it in the wrong place. Please try it again.
@hoerbie
You're right, I changed it in the wrong place. Please try it again.
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]
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Update: PDF::GetStringHeight() added
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
Thorsten...
I took your pbPDF help file pbPDF-Doku_DE.pdf and converted it to English..
1 - I dropped the document unto: https://pdf2docx.com/
2 - I dropped this converted document unto: https://www.deepl.com/Translator
3 - I opened the document in Microsoft Word and saved it as a PDF.
Now I have an English version of a German Help file... cool.
I took your pbPDF help file pbPDF-Doku_DE.pdf and converted it to English..
1 - I dropped the document unto: https://pdf2docx.com/
2 - I dropped this converted document unto: https://www.deepl.com/Translator
3 - I opened the document in Microsoft Word and saved it as a PDF.
Now I have an English version of a German Help file... cool.
- It was too lonely at the top.
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: [Module] pbPDF-Module
Thorsten,
Just noticed that the command PDF::HeaderProcedure() is missing in the manual.
Just noticed that the command PDF::HeaderProcedure() is missing in the manual.
- It was too lonely at the top.
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Update: Conversion of incompatible PNGs
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
Hi Thorsten,
great piece of work, I tested it today. Unfortunately I cannot print a BMP, not as PDF:IMAGE, nor as PDF:IMAGEMEMORY. Do you see any chance to do that in future. In my programs I am working only with bmp-files (it's a MUST in the textile-industry)
Regards Rainer
great piece of work, I tested it today. Unfortunately I cannot print a BMP, not as PDF:IMAGE, nor as PDF:IMAGEMEMORY. Do you see any chance to do that in future. In my programs I am working only with bmp-files (it's a MUST in the textile-industry)
Regards Rainer
Re: [Module] pbPDF-Module
Hi Thorsten,
need your help with
PDF:ImageMemory
In the manual there is something not clear: What is FileName.s and what is Name.s?
in the params there is only Name.s! What is Name.s really? Is it Name.s or FileName.s
For what are Name.s and/or FileName.s used if the image is already loaded into the memory?
I tried it with this without success.
Please give a help
regards
Rainer
need your help with
PDF:ImageMemory
In the manual there is something not clear: What is FileName.s and what is Name.s?
in the params there is only Name.s! What is Name.s really? Is it Name.s or FileName.s
For what are Name.s and/or FileName.s used if the image is already loaded into the memory?
Code: Select all
from your manual PDF
PDF::ImageMemory
Syntax
ImageMemory(ID.i, Name.s, *Memory, MemSize.i, Format.i, X.f, Y.f, Width.f, Height.f, Link.i)
Beschreibung
Platziert an den angegebenen Koordinaten ein im Speicher abgelegtes Bild auf der Seite.
FileName
Dateiname (und Pfad) des entsprechenden Bildes
Name
Dateiname für das Bild im Speicher
*Memory
Pointer auf die Speicheradresse des Bildes
MemSize
Größe der Bilddaten im Speicher (Bytes)
Format
#Image_PNG
- 32 -
Befehlsübersicht
#Image_JPEG
#Image_JPEG2000
X [Default: #PB_Default]
Horizontale Position der Linie. (#PB_Default = aktuelle Position)
Y [Default: #PB_Default]
Vertikale Position der Linie. (#PB_Default = aktuelle Position)
Width [Default: #PB_Default]
Breite des Bildes festlegen. (#PB_Default = Orginalgröße)
Height [Default: #PB_Default]
Höhe des Bildes festlegen. (#PB_Default = Orginalgröße)
Link [Default: #False]
Von Links, Annotations oder Actions zurückgegebene LinkID.
Code: Select all
DataSection
TestImageMemory_Start:
IncludeBinary "C:\Program Files\PureBasic\MySources\DiagonalRugs\Images\Designs\45_PP_90_DES_4.png"
TestImageMemory_End:
EndDataSection
PDF::ImageMemory(#PDF, "MyPicture", TestImageMemory_Start, TestImageMemory_End - TestImageMemory_Start, PDF::#Image_PNG, 30, 30,100, 150, PDF::#NoLink)
regards
Rainer
Re: [Module] pbPDF-Module
PB_Rainer wrote:Hi Thorsten,
need your help with
PDF:ImageMemory
In the manual there is something not clear: What is FileName.s and what is Name.s?
https://www.purebasic.fr/english/viewto ... 30#p540281
Re: [Module] pbPDF-Module
Thanks Thorsten.
Do you think you will fix it someday, and add BMP-format too?
Regards Rainer
Do you think you will fix it someday, and add BMP-format too?
Regards Rainer
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Module] pbPDF-Module
Filename ist die Bilddatei, die geladen wird.Paul wrote:PB_Rainer wrote:Hi Thorsten,
need your help with
PDF:ImageMemory
In the manual there is something not clear: What is FileName.s and what is Name.s?
https://www.purebasic.fr/english/viewto ... 30#p540281
Name ist der interne Name für das Bild, da er ohne den Filename bei Memory nicht ermittelt werden kann.
Gesendet von meinem BAH2-W19 mit Tapatalk
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]