Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Export as HTML, RTF, ...
rickg22:
--- Quote from: utelle on October 27, 2005, 04:46:14 pm ---Regards,
Ulrich
(Developer of wxPdfDocument)
--- End quote ---
Wow! :shock: It is an honor having you here! :) Welcome!
utelle:
--- Quote from: thomas on October 27, 2005, 05:28:39 pm ---I would be very very careful about embedding fonts or font-related information in a PDF.
--- End quote ---
It is common practice to embed fonts in PDF files. There is nothing special about that. Almost all tools for creating PDF files allow this. For example Adobe Acrobat, or the commercial libraries PDFLib and CPDFLib, or open source libraries like libharu, or FPDF to name just a few. Neither Adobe nor PDFLib GmbH nor FastIO nor any developer can control the user. They can't stop him to embed fonts he doesn't own or which are not freely available. Nevertheless these products/libraries are sold resp. distributed.
--- Quote from: thomas ---Certain companies can be get very nasty if you do that. Remember some companies even regard adjusting character stem widths or the mere drawing of cubic bezier curves as a violation of intellectual property.
--- End quote ---
Certainly a user has to respect the font licences. wxPdfDocument will not provide any font metric files, instead there will be a tool to create special wxPdfDocument font metric files (containing only the information needed to properly use a font with wxPdfDocument). To create these files the user has to provide an AFM or UFM file for the font he wants to embed. It is assumed that the user owns the right to use the fonts, as each of the companies named above assumes, too. For TrueType fonts the tool checks the font file whether the licence allows to embed the font file and respects this information.
Regards,
Ulrich
Ceniza:
--- Quote from: rickg22 on October 27, 2005, 06:08:02 pm ---
--- Quote from: utelle on October 27, 2005, 04:46:14 pm ---Regards,
Ulrich
(Developer of wxPdfDocument)
--- End quote ---
Wow! :shock: It is an honor having you here! :) Welcome!
--- End quote ---
Ditto.
The question is: there will be a way to embed the fonts just by calling a class method and providing the font face name without calling external utilities?
Oh, could I also suggest wxPdfDocument's makefile allow static compilation using dynamic wxWidgets? I've got a working one already and seems to be working just fine.
utelle:
--- Quote from: Ceniza on October 29, 2005, 05:55:03 pm ---
--- Quote from: rickg22 on October 27, 2005, 06:08:02 pm ---Wow! :shock: It is an honor having you here! :) Welcome!
--- End quote ---
Ditto.
--- End quote ---
Thanks. :D
--- Quote from: Ceniza ---The question is: there will be a way to embed the fonts just by calling a class method and providing the font face name without calling external utilities?
--- End quote ---
To use a non-standard font (i.e. oher than Courier, Times, Helvetica=Arial, Symbol, ZapfDingBats) wxPdfDocument needs some information about these fonts - for example the width of each character provided by the font, the underline position etc. In the next release of wxPdfDocument there will be a small utility (MakeFont) which allows to create a wxPdfDocument specific font metric file and to prepare the font for embedding. An application using wxPdfDocument needs only these generated files at runtime. To make such a font known to wxPdfDocument, the application has to call the method AddFont (see the font embedding example of the wxPdfDocument distribution).
Although it would be possible to extract the needed font information on the fly I do not plan to implement such a feature. The reasons are efficiency (it makes no sense to extract the font information again and again each time the application runs) and legal issues (it may not be allowed to embed a specific font).
--- Quote from: Ceniza ---Oh, could I also suggest wxPdfDocument's makefile allow static compilation using dynamic wxWidgets? I've got a working one already and seems to be working just fine.
--- End quote ---
Do you mean to compile wxPdfDocument as a static library while using wxWidgets as a shared/dynamic library?
I use bakefile (also used by wxWidgets) to generate the makefiles for wxPdfDocument. As far as I know bakefile currently supports only the combinations "static library + static wxWidgets library" and "dynamic library + dynamic wxWidgets library", but I'll investigate this issue.
Of course you always could simply add the wxPdfDocument source files to your own project.
Regards,
Ulrich
Ceniza:
--- Quote from: utelle ---Do you mean to compile wxPdfDocument as a static library while using wxWidgets as a shared/dynamic library?
--- End quote ---
Yep, that's what I mean.
--- Quote from: utelle ---Of course you always could simply add the wxPdfDocument source files to your own project.
--- End quote ---
That's what I did :P
I've been working on the PDF exporter and it's... exporting, but I've been unable to allow text background to be drawn correctly, if any.
--- Code: ---pdf.Cell(pdf.GetStringWidth(text), 4, text);//, wxPDF_BORDER_NONE, 0, wxPDF_ALIGN_LEFT, 1);
--- End code ---
That's my current text drawing call (ugly hack to get it working). If I enable the commented piece, some of the previous text will be also painted white (or should I say erased?).
Any idea?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version