Page 4 of 9
Re: [Module] pbPDF-Module
Posted: Thu Dec 05, 2019 8:04 am
by Thorsten1867
Bugfixes
Re: [Module] pbPDF-Module
Posted: Thu Dec 05, 2019 4:56 pm
by davido
@Thorsten1867,
Thank you.
Re: [Module] pbPDF-Module
Posted: Mon Dec 16, 2019 8:49 pm
by hoerbie
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
Re: [Module] pbPDF-Module
Posted: Tue Dec 17, 2019 1:04 pm
by Thorsten1867
Bugfixes
Re: [Module] pbPDF-Module
Posted: Wed Dec 18, 2019 9:58 am
by hoerbie
Thanks, but with your fix of the % bug, now you killed the use of at line 442ff predefined settings of SetOpenAction:
Code: Select all
;{ ----- Zoom: SetOpenAction() -----
#PageTop = "PageTop"
#FullPage = "FullPage"
#PageWidth = "PageWidth"
;}
The reworked lines 4560ff
Code: Select all
Factor = Val(RTrim(Zoom, "%")) / 100
PDF()\Catalog\OpenAction\Zoom = StrF(Factor, 2)
should be changed to something like this (untested):
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
Re: [Module] pbPDF-Module
Posted: Wed Dec 18, 2019 12:44 pm
by Thorsten1867
Bugfix
@hoerbie
You're right, I changed it in the wrong place. Please try it again.
Re: [Module] pbPDF-Module
Posted: Thu Jan 30, 2020 9:43 am
by Thorsten1867
Update: PDF::GetStringHeight() added
Re: [Module] pbPDF-Module
Posted: Sun Mar 15, 2020 2:43 pm
by blueb
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.
Re: [Module] pbPDF-Module
Posted: Sun Mar 15, 2020 3:02 pm
by blueb
Thorsten,
Just noticed that the command PDF::HeaderProcedure() is missing in the manual.
Re: [Module] pbPDF-Module
Posted: Sun May 03, 2020 1:42 pm
by Thorsten1867
Update: Conversion of incompatible PNGs
Re: [Module] pbPDF-Module
Posted: Sun May 03, 2020 7:18 pm
by PB_Rainer
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
Re: [Module] pbPDF-Module
Posted: Mon May 04, 2020 12:23 pm
by PB_Rainer
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?
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.
I tried it with this without success.
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)
Please give a help
regards
Rainer
Re: [Module] pbPDF-Module
Posted: Mon May 04, 2020 2:56 pm
by Paul
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
Posted: Mon May 04, 2020 4:52 pm
by PB_Rainer
Thanks Thorsten.
Do you think you will fix it someday, and add BMP-format too?
Regards Rainer
Re: [Module] pbPDF-Module
Posted: Mon May 04, 2020 5:50 pm
by Thorsten1867
Filename ist die Bilddatei, die geladen wird.
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