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

Louis
11-Aug-2005
[32x3]
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
[68x8]
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
the xref contains the location in the file of any pdf object (such 
as pages, fonts, and so on)
the xref might just be an update to an older xref present earlier 
in the file
in this case, it only contains references to changed objects, and 
to the old xref
each object has an id and a generation number; the generation number 
must be incremented when you update the object, that is when you 
append a new object to the file that should actually replace the 
old
so if page 1 has id 123 (for e.g.) and generation 1, you can append 
an object with id 123 and generation 2 to replace the original page 
object that comes earlier in the file
you need to provide a new xref for this new object and referring 
to the old xref
Graham
3-Apr-2006
[76]
And this is not trivial?
Gabriele
3-Apr-2006
[77x3]
so what you need to do is: 1) determine what objects need to be replaced 
2) append their replacements to the file 3) append new xref
it depends on the source pdf file
because you need to parse it to figure out what objects need to be 
updated and how
Graham
3-Apr-2006
[80]
this one contains a lot of binary
Gabriele
3-Apr-2006
[81]
stream objects are usually compressed; so you may need to decompress 
them too