Find Jobs
Hire Freelancers

Write javascript script prototype-class to generate files of custom binary based format

$30-5000 USD

Cancelled
Posted about 12 years ago

$30-5000 USD

Paid on delivery
The project's goal is to write javascript script prototype-class to generate files of custom binary based format References for use of this file format, sample source code to show how to create files of this format will be provided The script will include functionality: 1) encode images into given format 2) generate binary buffer with the given binary format 3) functions to encode text and form binary file format **PLEASE DETEAILED SPECIFICATION BELOW FOR MORE INFORMATION** ## Deliverables BRIEF: Javascript prototype class to generate PDF files LANGUAGE: Javascript NEED TO IMPLEMENT: 1) functionality to generate PDF with font options (using predefined fonts in PDF), text, PNG and JPG images (with most basic flate compression) 2) html+js samples demonstrating the implemented javascript in work USAGE OF 3RD PARTY CODE PARTS: not allowed REQUIREMENTS: 1) code implemented as one single .js file 2) comments for every function implemented 3) compatibility with Firefox 1.6, Chrome, Internet Explorer 8 or higher on Windows, Mac and Linux platforms REFERENCES on PDF format: PDF format reference: [login to view URL] Open source projects: iText (java): [login to view URL] iTextSharp (c#): [login to view URL] Open source [login to view URL] JS CLASS IMPLEMENTATIOn .pageSetSize(int pageSizeType); // pageSizeType is integer to set predefined page size, like 0 for A4 (default), and maybe some other .pageSetOrientation(bool IsPortrait); // bool isPortrait defines (if true) if we should use portrait or landscape orientation for current page .pageAdd(); // adds new page and uses new page for the output (while saves previously created pages) .propertiesSet(string title, subject, keywords, author, creator); // sets info for the current PDF document .fontSetCurrentName(string fontName); // set name for on of base 14 fonts (predefined fonts in PDF files), default font should be Arial .fontSetSize(int fontSize); // set font size for the selected font .fontSetStyle(bool bold, bool italic, bool underline); // set style for the selected font .fontSetColor(byte R, byte G, byte B); // defines the font color by RGB components possible variation is to implement .fontSetColor(int ColorIndex); // where ColorIndex sets one of 12 predefined colors like black, blue, green etc.. .textAddLine(int x, int y, string textString); // output text at given coordinates in PDF (x, y). Y coordinate is inverted in PDF (y starts from bottom left) but this function should accept Y coordinate if defined using zero point from left top corner .imageLoadFrom(string imageSrc); // loads new image for use in PDF .imagePlace(int x, int y); // places current image at given x, y coordinates .generate(); // generates PDF and returns as a buffer .generateToOutput(); // generates PDF and encodes as Base64 and returns to the browser (so it will be opened automatically in a browser) (by using [login to view URL] = "data:application/pdf;base64," + base64 encoded buffer .generateAsAttachment(string fileName); // generates PDF and returns as an attachment (by using [login to view URL] = "data:application/pdf;name=fileName;base64," + encoded buffer fileName parameter defines filename to use for the attachment NOTE: interface can be discussed if you feel it needs to be changed for better use from js
Project ID: 2709889

About the project

3 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $3,979 USD for this job
User Avatar
See private message.
$935 USD in 45 days
4.8 (137 reviews)
7.8
7.8
User Avatar
See private message.
$10,800 USD in 45 days
4.9 (32 reviews)
7.6
7.6
User Avatar
See private message.
$200.60 USD in 45 days
4.9 (24 reviews)
3.2
3.2

About the client

Flag of RUSSIAN FEDERATION
Zarechny, Russian Federation
5.0
80
Payment method verified
Member since Jul 7, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.