[Module] pbPDF-Module

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] pbPDF-Module

Post by Thorsten1867 »

PB_Rainer wrote:PDF:ImageMemory
Beachte, dass 32Bit und Interlaced bei PNG nicht unterstützt werden.
Ich habe bisher keinerlei Informationen finden können, ob und wie BMP in PDF eingebunden werden kann.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
PB_Rainer
User
User
Posts: 80
Joined: Fri Jun 07, 2019 1:56 pm

Re: [Module] pbPDF-Module

Post by PB_Rainer »

Thorsten1867 wrote:
PB_Rainer wrote:PDF:ImageMemory
Beachte, dass 32Bit und Interlaced bei PNG nicht unterstützt werden.
Ich habe bisher keinerlei Informationen finden können, ob und wie BMP in PDF eingebunden werden kann.
Danke, ich habe jetzt einfach einen kleinen workaround gemacht.

Ich lade die BMP und sichere sie sofort als PNG 8BIT in ein Tempfile, welches sofort nach einbinden in die PDF gelöscht wird. Geht so schnell, daß man es gar nicht merkt. Also alles gut.

Rainer
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] pbPDF-Module

Post by Thorsten1867 »

Habe mich auch mal an einem Workaround (ungetestet) versucht.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
PB_Rainer
User
User
Posts: 80
Joined: Fri Jun 07, 2019 1:56 pm

Re: [Module] pbPDF-Module

Post by PB_Rainer »

Thorsten1867 wrote:Habe mich auch mal an einem Workaround (ungetestet) versucht.
Danke Thorsten, BMP läuft einwandfrei! :D

Fehlt ja nur noch ImageMemory :wink: :lol:
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] pbPDF-Module

Post by Thorsten1867 »

PB_Rainer wrote:Fehlt ja nur noch ImageMemory :wink: :lol:
Should actually work, too.
  • 1.) Catch image
  • 2.) Check whether it is PNG or BMP
  • 3.) Encode image
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
PB_Rainer
User
User
Posts: 80
Joined: Fri Jun 07, 2019 1:56 pm

Re: [Module] pbPDF-Module

Post by PB_Rainer »

Thorsten1867 wrote:
PB_Rainer wrote:Fehlt ja nur noch ImageMemory :wink: :lol:
Should actually work, too.
  • 1.) Catch image
  • 2.) Check whether it is PNG or BMP
  • 3.) Encode image
Wow!
Will try tomorrow, that would be really great!

you're great!

Thanks
Rainer
User avatar
PB_Rainer
User
User
Posts: 80
Joined: Fri Jun 07, 2019 1:56 pm

Re: [Module] pbPDF-Module

Post by PB_Rainer »

Thorsten1867 wrote:
PB_Rainer wrote:Fehlt ja nur noch ImageMemory :wink: :lol:
Should actually work, too.
  • 1.) Catch image
  • 2.) Check whether it is PNG or BMP
  • 3.) Encode image
Hi Thorsten,
Tested it with PNG, works perfect.
Thanks
Rainer

P.s. for what does it need a filename? Filename with path?
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] pbPDF-Module

Post by Thorsten1867 »

PDF needs an internal filename without path

Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
langinagel
Enthusiast
Enthusiast
Posts: 131
Joined: Fri Jan 28, 2005 11:53 pm
Location: Germany
Contact:

Re: [Module] pbPDF-Module

Post by langinagel »

Hi Thorsten,

as I was struggling with InsertTOC() I suggest an improvement in this procedure:

Code: Select all

      If PDF()\TOC()\Page >= Page 
        Page$        = Str(PDF()\TOC()\Page +1)
      Else
        Page$        = Str(PDF()\TOC()\Page )
      EndIf
Greetings
LN
https://www.doerpsoft.org

Boost. Work. Efficiency.
Skawer
New User
New User
Posts: 3
Joined: Mon Apr 27, 2020 12:57 pm
Location: Russia

Re: [Module] pbPDF-Module

Post by Skawer »

Hi Thorsten. Need help. Unicode U+0428 output a blank page.

PDF::SetFont(#PDF, "LucidaSans", "", 16)
PDF::Cell(#PDF, "Ш", #PB_Default, #PB_Default, #False, PDF::#NextLine)
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] pbPDF-Module

Post by Thorsten1867 »

Only UTF-Characters 0 - 65535 are supported.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Skawer
New User
New User
Posts: 3
Joined: Mon Apr 27, 2020 12:57 pm
Location: Russia

Re: [Module] pbPDF-Module

Post by Skawer »

Thorsten1867 wrote:Only UTF-Characters 0 - 65535 are supported.

0428 like included in 65535?:)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [Module] pbPDF-Module

Post by IdeasVacuum »

...Make sure the font supports '0428'
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Skawer
New User
New User
Posts: 3
Joined: Mon Apr 27, 2020 12:57 pm
Location: Russia

Re: [Module] pbPDF-Module

Post by Skawer »

IdeasVacuum wrote:...Make sure the font supports '0428'
I usage a standart font Windows 7 'font l_10646.ttf' - Lucida Sans Unicode
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

Moving inside the PDF File ; How to ?

Post by loulou2522 »

I don't know how to do the following:
I'm on page 2 of my PDF and would like to go back to Page One to add text at a defined position and then go back to Page Two and continue processing. Is this possible?
Post Reply