Closed

Native Text to PDF Converter

This project was awarded to tulebaev for €30 EUR.

Get free quotes for a project like this
Employer working
Awarded to:
Skills Required
Project Budget
€30 - €250 EUR
Total Bids
11
Project Description

This project requires native code to be written to convert an arbitrary text with "\n" or "\r\n" line endings into a simple PDF file. Native means a C/C++ source code is required which makes it all without using platform specific (or PDF specific) libraries. C Standard Library is of course allowed (if required at all). Basically the required code can be regarded a one single function like this (prototype):

text2pdf (textFile, pdfFile, encoding, pageFormat, textFrame, fontFace, fontSize, fontColor)

- textFile is the name or handle (doesn't matter) for the source text file
- pdfFile is the name or handle (doesn't matter) for the PDF file to be generated
- encoding specifies the character encoding the text file uses
- pageFormat and textFrame: prototypes required to control page format and the borders (default is A4 format with a 20mm border)
- fontFace, fontSize, fontColor are required to be definable. But they are specified in the PDF to control face, size and color, but no embedding of fonts is required!
- additional specifications for the document (view when opening) would be an additional plus, but are not required.

The resulting file must be generally compatible with any PDF viewer. The function to be developed should be able to take care of line wraps and page wraps, meaning no characters should be lost or cut. The function prototype above is just to explain the requirements. The solution should be a function or class with just that functionality, but the exact number of parameters or how they are passed may vary as to the abilities provided and the final implementation (a solution in C++ may be different from a solution in C).

Attached is an PDF example from this project description as a text source, showing a result with font "Courier", font size "16pt" and font color "black". Additional taking care of words not to be split, removong leading spaces after a line wrap and converting tabs would be a plus.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online