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

Henrik
10-Aug-2005
[20]
does right adjustment work? it says so in the docs, but I can only 
get center to work....
Louis
10-Aug-2005
[21]
I'm using encmdface.1248031.exe
Henrik
10-Aug-2005
[22]
what would the possibilities be for adding fonts? I need access to 
use the OCR font now...
Gabriele
11-Aug-2005
[23x2]
Louis: it's possible that there is some incopatibility with the newer 
versions of rebol. I only tested it with at most 1.2.10 so far. I'll 
see if i can find so time to update it for 1.3 (the code needs to 
be changed for the new image datatype, for example; as a side effect 
it will be much faster with images, though).
other fonts: that's not really trivial. would require some work... 
i'm not sure if i can find the time for that.
Henrik
11-Aug-2005
[25]
maybe I can :-) but I'm only going to study what it takes. OCR fonts 
are necessary for printing certain types of invoices and I want that 
functionality, and that would be very nice to have in my invoice 
program.
Gabriele
11-Aug-2005
[26x4]
what you have to do is: extend the typesetter so that it can read 
font descriptions and build glyph width and kerning pairs tables 
(Volker has an AFM file parser); extend the dialect so that it can 
somehow recognize and load external fonts; study the PDF reference 
to see what you need to do to include the font in the PDF file (at 
the very least, you have to provide a font object; i'm not sure if 
this is sufficient, but i hope that the reader is able to load external 
fonts once you give it the font name and description; in theory you 
should embed the font into the PDF file, which usually means parsing 
the font file and so on)
ok, completely untested, so use at your own risk: http://www.colellachiara.com/soft/Misc/pdf-maker.r
 for View 1.3
note that it also supports alpha channel in images (requires acrobat 
reader 5)
(i'll upload it to rebol.org as soon as someone confirms it works.)
Henrik
11-Aug-2005
[30]
it created a PDF invoice om rebol/view 1.3 for OSX just fine :-) 
I use only boxes, lines, helvetica, helvetica bold and courier though. 
no images or anything
Louis
11-Aug-2005
[31x4]
Gabriele, I'll look foreward to the update.  Actually, I use pdf-maker 
all the time.  This is the only time I have experienced a problem.
Henrik, pdf-maker is great. I have one program that creates mailmerge 
letters from data in an object database.  It creates a pdf file, 
allowing me to check each letter before printing it.  I can also 
pick out just one letter in the file to print.  Or, if the printer 
jams, it is easy to begin anew printing just the remaining letters. 
And, of course, I can use the program on any operating system.  Nice.
Gabriele, thanks! somehow I didn't notice that you have already posted 
the update. You are FAST!
I'll do some testing and get back with you.  It may take me several 
days, however, as I am in the middle of several projects right now.
Henrik
11-Aug-2005
[35x3]
louis: yes, I've used it in a few apps so far with great success, 
because it's very stable and fast. the only things I miss are better 
font handling, some better docs and importing vector drawings into 
a PDF. Getting OCR fonts in will really make it useful for me.
I've also been thinking about building a very simple application 
to let you create pdf's graphically to make the process simpler. 
of course it would be no where near a DTP application, but it would 
speed up generation of more complex stuff
I think there is great potential to unifying all the tools that are 
forming now: pdf-maker, AGG, SVG input and makedoc2. Allow these 
things to talk to eachother! imagine making a drawing in AGG or import 
an SVG into a DRAW and then use the very same block with layout-pdf. 
Future versions of makedoc could print pdfs as well as HTML through 
pdf-maker. by letting these tools use eachother, the combination 
could be a very fast and powerful document creation system.
Gabriele
12-Aug-2005
[38]
AGG to PDF Maker is rather trivial for most cases; no gradients in 
PDF Maker though. i also didn't expose access to the CTM, pdf maker 
only offers higher level operations like scaling, rotations and translations.
Janeks
23-Oct-2005
[39x2]
I am interested to understand format of metrics definition blocks. 
Is it possible to use them to get language specific characters correctly 
displayed?
Are there any short documentation/description how to use pdf-tables.r?
Gabriele
24-Oct-2005
[41]
1) no; 2) no. Sorry. Supporting other charsets requires changes to 
the code AND to the font metrics data. About pdf-tables, never got 
to document it at all. i don't have any simple example either, except 
from some i provided here or on the ml long time ago.
Janeks
24-Oct-2005
[42]
Thanks for anwers!

I don't know any thing about PDF, but I did couple functions for 
encoding conversation.

Could it be a "quick hack" or it requires good background of PDF 
format ?
Gabriele
25-Oct-2005
[43]
it might be a quick hack, but i need to check the docs for PDF... 
but IIRC for an encoding different from the default you need to provide 
a char table or something like that...
Janeks
25-Oct-2005
[44]
It is probably a bit funny, but I used to put both of following head 
part in my HTML pages:

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1257">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-10">

It worked so that it was corectly displayed in M$ Exploer and Opera.

The Baltic Rim ( "Windows Baltic Microsoft code page – cp 1257") 
is the standart.

I will send to your e-mail couple of images with characters and codes.
Oldes
22-Feb-2006
[45]
Would it be possible to use PDF-maker to extract just a pure text 
from PDF files?
JaimeVargas
22-Feb-2006
[46]
I think PDF-makes is a generator not a parser.
Oldes
22-Feb-2006
[47x2]
I know, I was just thinking, if it's easily possible to use it as 
a PDF decoder, but will rather use this http://sourceforge.net/projects/pdftohtml/
and then use Rebol to parse the HTML
hm, Copying of text from this document is not allowed. :(
JaimeVargas
22-Feb-2006
[49]
Probably it has some level of security. PDF has a layered system 
of rights.
Oldes
22-Feb-2006
[50]
So I have to recompile the sources:-)
Henrik
9-Mar-2006
[51]
http://www.lerup.com/printfile/<--- would this be a good way to 
print PDFs easily from rebol under windows?
Ryan
11-Mar-2006
[52]
Can it print graphics?
Henrik
11-Mar-2006
[53]
haven't tried (don't have a printer), but if it can print postscript, 
then it can print graphics
Ryan
12-Mar-2006
[54x2]
I suppose my question should be: Can it print graphics easily? I 
want something like >>printout %//pc/printer to-image layout [title 
"TEST PRINT"]
I  can do this pretty much with html, or PDFmaker with acrobat version 
x, but I would a more exact publicly usable solution.
Henrik
13-Mar-2006
[56]
I don't think you can do that 100% within rebol, but Printfile seems 
to let you spool PS from a watched directory. Store a PDF or PS file 
in that specific directory and it will be printed. Printfile can't 
run as a service or in the background it seems.

It's easier under Linux where you can employ PDF2PS and just feed 
it to LPR, which will then print it.
Anton
13-Mar-2006
[57]
Henrik did you try using SRVANY.EXE ? (runs any program as a service).
http://support.microsoft.com/kb/q137890/
Henrik
13-Mar-2006
[58]
that's very interesting... does anything like that exist for windows 
98?
Ryan
13-Mar-2006
[59x2]
What is printfile?
Duh, nevermind, already checked it out.
Anton
15-Mar-2006
[61]
I'm not sure about win98.
Graham
3-Apr-2006
[62x4]
Just wondering if it's possible to combine an existing pdf with the 
pdf-maker.  What I need to do is draw over an existing pdf....
I'd like somehow to plot a child's growth over the top of a pdf such 
as this.
http://www.cdc.gov/nchs/data/nhanes/growthcharts/set1clinical/cj41l017.pdf
I'd hate to have to redraw this in the plot dialect just to stick 
a few points on it.
Gabriele
3-Apr-2006
[66]
it is possible, but not trivial; you don't actually need to change 
the pdf file, just append to it; however you need to parse it to 
do this correctly.
Graham
3-Apr-2006
[67]
So, given such a pdf, all I have to do is figure out where to put 
the 0, 0 and the scale, and try plotting to it?
Gabriele
3-Apr-2006
[68x2]
well, basically updating a pdf works this way:
the reader looks at the end of the file (except for linearized format, 
but this should not worry you right now) for the xref