Page 22 of 32
Re: PurePDF Version 2.0
Posted: Tue Oct 01, 2013 7:22 pm
by ABBKlaus
Hi IdeasVacuum,
i have no idea how to solve your feature request in an easy way. Maybe you should intercept the linebreak like in Tutorial04 Pagebreak.pb.
Hi Loopingstar,
please have a look at Tutorial07 Images.pb it uses pdf_Addlink() and pdf_SetLink() as you need it. You can also have a look at Tutorial08 Bookmarks.pb which uses Bookmarks as refences for Navigation inside the document.
Regards Klaus
Re: PurePDF Version 2.0
Posted: Tue Oct 01, 2013 7:31 pm
by Loopingstar
Thank you ABBKlaus...
But i don't understand the mechanics...
I have another question : There is not "pdf_Free" or "pdf_Close" ?
Because, when i call two times "pdf_Create", his not kill the last...
Re: PurePDF Version 2.0
Posted: Tue Oct 01, 2013 7:38 pm
by ABBKlaus
an adequate command for pdf_close() would be pdf_Save("") without filename nothing is saved on disk

Re: PurePDF Version 2.0
Posted: Tue Oct 01, 2013 7:40 pm
by Loopingstar
Okay folks, here my solution (thank you IdeasVacuum for idea):
I create my PDF one time (without saving) and i put in a LinkedList the Y position and the Page number of each chapter "title".
Then, i create second PDF and for each chapter number link (in chapter text), i search in my LinkedList the good one...
ABBKlaus, thank you for the tips, but i lost Bookmarks!
Here the PDF file with links working
http://loopingstar.fr/abc/demo2.pdf
Re: PurePDF Version 2.0
Posted: Tue Oct 01, 2013 7:57 pm
by IdeasVacuum
Hi guys
Oh page breaks are so much fun - not!
Currently, working on a solution where the multi-line cell height is calculated first, then all cells of that row are passed the height.
Edit: Yup, tested a 43-page document, works fine.
Re: PurePDF Version 2.0
Posted: Wed Oct 02, 2013 7:45 am
by Loopingstar
I solved the problem of bookmarks.
When creating the first pass, I do not create bookmarks. I created bookmarks in the second pass, otherwise it bug.
See PDF with links and bookmarks working
http://www.loopingstar.fr/abc/demo3.pdf
Re: PurePDF Version 2.0
Posted: Wed Oct 02, 2013 8:58 am
by IdeasVacuum
...working very nicely Loopingstar

Re: PurePDF Version 2.0
Posted: Wed Oct 02, 2013 11:17 am
by Loopingstar
I have another problem wirth PurePDF 2.08...
When i use pdf_Image(), it does not work with JPEG images.
The file "Tutorial07 Images.pb" dont work in the same manner.
Only PNG file is showing, the last page is blank. TEST >
http://loopingstar.fr/abc/Tutorial07%20Images.pdf
Can anyone help me please ?
Re: PurePDF Version 2.0
Posted: Thu Oct 03, 2013 9:21 am
by Loopingstar
Please, anyone can help me ?
i have Purebasic 5.20 TLS X64 (on Windows Seven Pro 64 bits)
pdf_Image() don't work with JPEG pictures.
I have declared UseJPEGImageDecoder() and UseJPEGImageEncoder() without success
I have another problem wirth PurePDF 2.08...
When i use pdf_Image(), it does not work with JPEG images.
The file "Tutorial07 Images.pb" dont work in the same manner.
Only PNG file is showing, the last page is blank. TEST >
http://loopingstar.fr/abc/Tutorial07%20Images.pdf
Re: PurePDF Version 2.0
Posted: Fri Oct 04, 2013 11:15 pm
by IdeasVacuum
Well, personally I only work with PNG images - the quality is superior to JPG for similar file size, especially so if the image has to be re-sized. Why not simply convert your original JPG's to PNG?
irfanview image converter
Re: PurePDF Version 2.0
Posted: Sat Oct 05, 2013 8:40 am
by Loopingstar
Because the PDF is generated on the fly by the user.
And, in the software, is accepted PNG and JPEG images (PNG format is not widely known by users in general)
and they mostly use the JPEG.
Re: PurePDF Version 2.0
Posted: Sat Oct 05, 2013 7:17 pm
by ABBKlaus
It was a bug !
Code: Select all
;Check JPEG / PNG
Select PeekL(vData\pData) & $FFFFFFFF
Thanks for reporting
Its fixed now :
http://www.purebasicpower.de/?download= ... B52X86.zip
Re: PurePDF Version 2.0
Posted: Sat Oct 05, 2013 9:13 pm
by IdeasVacuum
Because the PDF is generated on the fly by the user.
Well, you have a fix now from Klaus
In your code though, you will produce a better PDF using PNG if the image has to be resized. So even if the original image is JPG, your code can internally use PNG before resizing.
PNG format is not widely known by users in general
That used to be true, but it's the defacto web standard now. Practically everyone that uses a computer should be aware of PNG these days - certainly, you could recommend PNG to your Users for best quality.
Re: PurePDF Version 2.0
Posted: Sun Oct 06, 2013 3:36 am
by StarBootics
Hello everyone,
A simple technical question : Is there a limit in size for a picture that can be inserted into a pdf file ?
I ask this because I'm trying to replace a the original logo of 102 X 46 pixel used in the "Tutorial07 Images.pb" by a logo 438 X 200 pixel but it's not working.
Regards
StarBootics
Re: PurePDF Version 2.0
Posted: Sun Oct 06, 2013 7:43 am
by Loopingstar
Thank you for this change, ABBKlaus.
I installed the new version of the lib.
But I found a new bug:
According to my tests, if the size (width, height) of the JPEG image is less than the page size, it works.
But if the size of JPEG image is larger than the page size, the image is not displayed.
This problem does not exist with PNG images.