Page 2 of 9

Re: [Module] pbPDF-Module

Posted: Thu Feb 21, 2019 3:42 pm
by Thorsten1867
Version 2.0

I completely changed the internal structure of the module and adapted it to the structure of PDF documents (individual objects). Instead of taking the detour through countless LinkedLists, (most) data is now written directly into the objects.
The sourcecode has not only become more logical, easier to understand and clearer, but can now also be extended much more easily.

New:
  • Support of form fields (e.g. text field, checkbox, radio button & combo box)
  • AddGotoLabel() for navigation in the PDF document. (e.g. jump from the command overview via link to the corresponding page)

Re: [Module] pbPDF-Module

Posted: Thu Feb 21, 2019 4:29 pm
by luis
Interesting, thanks for sharing it.

Re: [Module] pbPDF-Module

Posted: Sat Mar 16, 2019 5:57 pm
by morosh
thanks for sharing, really useful
I tried to put some arabic characters, it's got transformed to ??????, unicode isn't supported?

Re: [Module] pbPDF-Module

Posted: Sat Mar 16, 2019 6:57 pm
by Thorsten1867
At the moment only Unicode characters up to 65536 are supported. Accessing characters above 65536 is very complicated.

Gesendet von meinem BAH2-W19 mit Tapatalk

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 10:52 am
by infratec
Hi,

I just tested your module for the first time and ... failed.

Because I always use #PB_Any for creations. (PDF = PDF::Create(#PB_Any))
I don't know exactly why it fails, but the document is empty when I use this.
Maybe it is not allowed to use 0 as ID. And when I use the code above PDF is 0.

Here is my small addition to your code:

Code: Select all

  Procedure.i Create(ID.i, Orientation.s="P", Unit.s="", Format.s="")  ; [*]
    Define objRes.i, Result.i
    
    If ID = #PB_Any
      Repeat
        ID = Random(99999, 1000)
      Until Not FindMapElement(PDF(), Str(ID))
    EndIf
With this small addition and ID as return value (or 0 if AddMapElement() fail) I'm able to use my normal coding style.

And thanks for your many coding stuff during the last months.

Bernd

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 1:26 pm
by Thorsten1867
You can add following code after 'Define ....'.

Code: Select all

If ID = #PB_Any : ID = MapSize(PDF()) + 1 : EndIf

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 1:42 pm
by infratec
Yes, of course.
But in my version, like in PB, the lower numbers are still free for 'normal' use :mrgreen:

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 4:41 pm
by Thorsten1867
infratec wrote:Yes, of course.
But in my version, like in PB, the lower numbers are still free for 'normal' use :mrgreen:
They are not gadget numbers and the numbers are used exclusively for pbPDF.

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 4:46 pm
by infratec
A file is also no gadget.
But if you not want to include it: simply write 'I don't want to do this in my code'

Re: [Module] pbPDF-Module

Posted: Mon Mar 25, 2019 10:01 pm
by Thorsten1867
infratec wrote:A file is also no gadget.
But if you not want to include it: simply write 'I don't want to do this in my code'
No, I just meant that pbPDF doesn't use gadget numbers or file numbers and you don't have to care about it.

Re: [Module] pbPDF-Module

Posted: Tue Mar 26, 2019 8:20 am
by Thorsten1867
Added: #PB_Any

Code: Select all

If ID = #PB_Any
  ID = 1 : While FindMapElement(PDF(), Str(ID)) : ID + 1 : Wend
EndIf

Re: [Module] pbPDF-Module

Posted: Thu Mar 28, 2019 5:25 pm
by loulou2522
Hi all,
Can someo one know how to generate PDF/X-3 with this excelent programm or with Gs (ghostscript) ?

Re: [Module] pbPDF-Module

Posted: Thu Jun 20, 2019 11:29 am
by Thorsten1867
Bugfix: Embed PNG images

Re: [Module] pbPDF-Module

Posted: Tue Jun 25, 2019 7:19 pm
by Thorsten1867
Bugfix: AutoPageBreak

Re: [Module] pbPDF-Module

Posted: Thu Jun 27, 2019 8:05 am
by Thorsten1867
Update:
  • Bugfix: Preferences for footer (AutoPageBreak)
  • Bugfix: AddPage (Fonts)