r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[PDF-Maker] discuss Gabriele's pdf-maker

Gabriele
26-Sep-2006
[422]
but i guess i'm not so lucky that compress is compatible...
Maxim
26-Sep-2006
[423]
you could use edgar's image-magic examples and use image magic if 
pro licence and image magic is found... its going to be Extremely 
fast.
Gabriele
26-Sep-2006
[424]
max: sure but you still have to parse the resulting jpeg data
Maxim
26-Sep-2006
[425]
(embed jpg file saved from rebol and converted to jpeg with image-magic)
Henrik
26-Sep-2006
[426]
it would be nice if compress had more modes that are "strategically" 
made to be compatible with various types of binaries where such compressed 
data is embedded.
Gabriele
26-Sep-2006
[427x2]
also every image to jpg is not a good idea (users may not want that, 
if the image is not a photo but a drawing for eg)
i will eventually have a look at this... for now, i'm happy with 
them being uncompressed :)
Maxim
26-Sep-2006
[429x2]
yes!  compress/RLA  compress/ZIP  compress/GZIP  compress/JPEG   
 compress/MP3
(and compress/TAR)
Henrik
26-Sep-2006
[431]
isn't the current compress, a gz compression lacking some headers?
Maxim
26-Sep-2006
[432]
I seem to remember someone building a wrapper around compress to 
cope with this issue... yes... but its sooo long ago... maybe it 
was something else.
Henrik
26-Sep-2006
[433]
maybe a compression group would be in order...
Gabriele
26-Sep-2006
[434]
i think compress is from zlib
Anton
27-Sep-2006
[435]
Oldes made a zlib compressor/decompressor. I found it in my cache:
	public/box.lebeda.ws/~hmm/rebol/zlib/latest/zlib.r

but it's not there on the web, apparently. Try check for his latest 
website.
Oldes
27-Sep-2006
[436x2]
But it's Rebol?pro version (using a dll) http://oldes.multimedia.cz/rebol/zlib_latest.rip
And yes, Rebol's compress is some older version of zlib compression 
- I use Rebol's compress function to create compressed SWF files, 
but in some cases Rebol is not able to decompress zlib binaries (so 
I use the dll)
Gabriele
27-Sep-2006
[438]
thanks oldes, i'll probably ask you more when i get to this :)
Oldes
29-Sep-2006
[439x3]
I'm embedding JPGs into SWF files without problem, there is not required 
any special operation on the JPG's data to embedd. With the other 
formats I have to count pallete and use Rebol's compress (zlib) to 
embedd such an image (gif or png). It's not so fast, but it does 
what I need (and I don't mind if it takes a second more time to compile)
Is the PDF format so different? SWF and PDF are now in the same stable 
= Adobe
(I mean embedding images into the PDF, to make it clear, the format 
is different of course)
Gabriele
29-Sep-2006
[442x2]
pdf wants the dct data, not the whole jpg binary, afaik. the data 
in the jpg header go to the image object dictionary.
hmm, rereading the spec, it may work just putting the jpg file there. 
i will try that, eventually. :)
Gabriele
4-Oct-2006
[444]
update: changes to tables, now can calculate the column widths automatically. 
(it does so *much* better than web browsers.)
Anton
5-Oct-2006
[445]
I see your embedded image. Very nice. Can you explain briefly how 
the column width calculation is better ?
Gabriele
5-Oct-2006
[446x5]
classic example: you are doing a definition list with a table, so 
you have a column with words and a column with the description.
this means that the description is usually long, while the first 
column only has a word or two.
what you get in web browsers is that if you have two words in the 
first column, they are very likely to be broken into two lines
i.e. the first column is forced to be very small by the second column 
having long text
in the pdf maker, two words in the first column would not be broken, 
since shrinking a column with text that is already more that one 
line is better than shrinking a column with text which can fit in 
one line.
Anton
5-Oct-2006
[451x2]
Ah.. I have experienced this problem. That is a good improvement.
I'm looking for a definition-list example in the test document ...
Gabriele
5-Oct-2006
[453]
it's not there, but the pdf-emitter for qml creates them :)
Anton
5-Oct-2006
[454x2]
.. but doesn't appear to be one. Maybe you could add it ?
Ok.
Gabriele
5-Oct-2006
[456]
let me add one for you...
Anton
5-Oct-2006
[457]
You want to show off your technology don't you ? :)
Gabriele
5-Oct-2006
[458x2]
:) it's uploading...
...done. last page of test.pdf.
Anton
6-Oct-2006
[460]
Looks great. Good work.
http://www.colellachiara.com/soft/PDFM2/test.pdf
Oldes
6-Oct-2006
[461x2]
The link above just crashed my Firefox
But it's working now, strange
james_nak
6-Oct-2006
[463]
Maybe the acrobat driver wasn't running. In any case, nice work Gabriele.
Oldes
8-Oct-2006
[464]
It must be related to acrobat as I have same problems with other 
PDF documents sometimes if I open them in Firefox - I must say that 
I don't like PDFs at all
Henrik
8-Oct-2006
[465]
oldes, depends on the viewer. I use PDF's under OSX all the time. 
:-)
Oldes
8-Oct-2006
[466]
Of course, PDF is the main format for everything on Mac:-)
Henrik
8-Oct-2006
[467]
so you shouldn't hate PDF, but the viewer :-)
Oldes
8-Oct-2006
[468x2]
I know people who are able to send me PDF where is only one image 
(they are Mac users of course)
But maybe you are right.
Henrik
8-Oct-2006
[470]
some day someone will write a PDF viewer for REBOL that will rival 
Preview.app for mac, so things will be good. :-)
Anton
23-Nov-2006
[471]
Gabriele, I have patched pdf-maker.r  1.27.1  of  3-Aug-2006  to 
make the dialect a little easier with images.
Starting at line 1051, the changed lines are commented: