ericschernoff / HTMLDoc

Perl interface to the htmldoc program for producing PDF-Files from HTML-Content
MIT License
2 stars 0 forks source link

Text align not working after Pdf creation #3

Closed Pratiktarade closed 4 years ago

Pratiktarade commented 4 years ago

Dear Team , I am facing below issues 1) footer line break not working eg I have set ------ Engineering Services company that provides <br> ### engineering solutions and systems
in my html file

2) inside body tag i have used some html

eg







TECHNICAL ASSISTANCE AGREEMENT

please check attached screen shot Capture343434 Capture new one

ericschernoff commented 4 years ago

Hi,

I do not believe HTMLDOC supports line breaks in the footers. I can not find reference to that in the documentation for HTMLDOC: https://www.msweet.org/htmldoc/htmldoc.html

Please use the 'htmldoc' command directly to confirm if the PDF output behavior is what you expect. This is the best way to validate the functionality of the Perl module, as the results of the Perl module should not differ from calling the 'htmldoc' command directly. Likewise, in order to validate your HTML markup, it is faster to test with the 'htmldoc' command before you automate the file generation via Perl.

If you are getting different results from the 'htmldoc' command than from this Perl script, please attach your Perl and HTML code to this issue for further investigation. Also, please confirm that you have a recent version of 'htmldoc.'

Thanks, -Eric

Pratiktarade commented 4 years ago

Hi,

I do not believe HTMLDOC supports line breaks in the footers. I can not find reference to that in the documentation for HTMLDOC: https://www.msweet.org/htmldoc/htmldoc.html

Please use the 'htmldoc' command directly to confirm if the PDF output behavior is what you expect. This is the best way to validate the functionality of the Perl module, as the results of the Perl module should not differ from calling the 'htmldoc' command directly. Likewise, in order to validate your HTML markup, it is faster to test with the 'htmldoc' command before you automate the file generation via Perl.

If you are getting different results from the 'htmldoc' command than from this Perl script, please attach your Perl and HTML code to this issue for further investigation. Also, please confirm that you have a recent version of 'htmldoc.'

Thanks, -Eric

Please check below details Module version: 0.15

--------------------------PERL CODE------------------------------------------------------------- use HTML::HTMLDoc; my $htmldocObj = new HTML::HTMLDoc();
$htmldocObj->no_title(); $htmldocObj->set_permissions('none');
$htmldocObj->set_page_size('a4');
$htmldocObj->set_header('.', '.', '.');
$htmldocObj->set_footer('t', '.', '1'); $htmldocObj->set_right_margin('1', 'cm');
$htmldocObj->set_right_margin('1', 'cm');
$htmldocObj->set_input_file("$BASEPATH/macro/$proj/Files/TEL.html");
my $pdf = $htmldocObj->generate_pdf();
print $htmldocObj->error(); $pdf->to_file("$BASEPATH/macro/$proj/Files/test4.pdf");

HTML


<!DOCTYPE html>

SBP/Engine/NA/13-14/423 <BR> Confidential





TECHNICAL ASSISTANCE AGREEMENT



BETWEEN



XYZMOTORS LIMITED


AND


XYZELXSI LTD


FOR


COM_PROJ_TITLE


Ref: COM_PROJ_ID

TECHNICAL ASSISTANCE AGREEMENT

This Agreement made between XYZMotors Ltd. a company duly incorporated under the Companies Act, 1913 and having its Registered Office at Bombay House, Homi Mody Street, Mumbai 400 001, hereinafter referred to as “TML” (which expression, unless it be repugnant to the context or meaning thereof shall be deemed to mean and include its successors and assigns) of the One Part

AND

XYZElxsi Ltd., a company duly incorporated under the Companies Act, 1956 and having its Registered Office at IPTL Road, Whitefield, Bangalore 560 048, hereinafter referred to as “TEL” (which expression, unless it be repugnant to the context or meaning thereof shall be deemed to mean and include its successors and assigns) of the Other Part

WITNESSETH:

WHEREAS TML is in the business of manufacturing and selling of Commercial and Passenger vehicles for both domestic and overseas markets.

WHEREAS, TEL is an Engineering Services company that provides engineering solutions and systems, and has acquired considerable experience in these fields and is conducting continuous development work in these fields.

WHEREAS, TML is desirous of availing itself of TEL's knowledge, experience and engineering services.

WHEREAS TEL is willing to provide TML with services in respect of the Project (as mentioned in Exhibit –I) attached herein

NOW, THEREFORE, in consideration of promises and covenants hereinafter set forth, the parties hereto agree as follows:

Article 1 - DEFINITIONS

In this Agreement, the following expressions shall have the following meaning:

1.1       Exhibit 1” means section of this document with title “COM_PROJ_TITLE”.

1.2       "Project" means services to be performed by TEL, as detailed in Exhibit 1.

1.3       Project Schedule” (hereinafter “Schedule”) means the programme of work set out in Exhibit 1.

1.4   “Intellectual Property Rights” means all rights in patents, inventions, utility models, works of authorship, data, designs, databases, topography and mask works, ideas, know-how, trade secrets, confidential information, copyrights, trademarks, and any other type of intellectual property and proprietary rights; in each case whether registered or unregistered and including all applications, registrations, renewals and the like including business IP and IT.

Article 2 - IMPLEMENTATION

2.1       TEL will carry out the Project in accordance with the scope of work as specified in Exhibit 1. TEL shall report and present the results of the tests in the Project in accordance with the communication and reporting system specified in Exhibit 1.

2.2     TML shall provide TEL with all information and materials necessary to carry out the Project according to the Schedule. A list of necessary materials and information will be agreed between TML and TEL at the start of the Project, as far as possible, and added to during the course of the Project if the need arises.

2.3      TEL will take all reasonable care of equipment, material or facilities which are provided to TEL by TML during the Project. TEL will return such equipment, material or facilities, in part or full, to TML in good condition either at the end of the Project or on earlier request of TML with reasonable wear & tear.

2.4       TEL agrees that TML engineers and/or management and/or its representatives can visit TEL and will have progress meetings with TEL. Also, TML agrees that TEL engineers and/or management can visit TML and will have progress meetings with TML regarding this project upon prior notice to other party.

2.5       All test vehicles and components which TEL may receive from TML for the purpose of the Project shall be provided on loan only and shall be adequately insured by TML. TEL shall not be liable for any loss or damage for the same. Also all equipment which are the property of TEL or have been provided to TML by TEL for the purpose of the Project shall be provided on loan only and shall be insured adequately by TEL. TML shall not be liable for any loss or damage for the same.

2.6      Items that are not on loan to TEL including but not limited to computing equipment, test instrumentation and personal belongings, are brought onto TEL premises at the owners risk. It will be the responsibility of the owners to adequately insure all such items. Also items that are not on loan to TML including but not limited to computing equipment, test instrumentation and personal belongings, are brought onto TML premises at the owners risk. It will be the responsibility of the owners to adequately insure all such items.

2.7     TML shall have no responsibility towards employees of TEL nor shall such employees have any such claim against TML for salary, wages, provident fund, gratuity retrenchment compensation or any other compensation for accident or death of any other claim whatsoever and TEL shall keep TML indemnified against all claims either from employees engaged by the party or from other authorities towards provident fund, gratuity, retrenchment compensation or any other claim whatsoever.

Article 3 - SCOPE OF WORK

3.1      The work scope of this Agreement will be limited to those activities as set forth in Exhibit 1. TEL will carry out the Project specified, in accordance with the Schedule and will report the Project results as set out in Exhibit 1.

3.2      TML may at any time during the term of this Agreement request a variation to the work scope (Annexure I). This will be communicated in writing to TEL. TEL is expected to inform TML about the implications of the project variation in-terms of cost, timeline and work scope and submit a proposal for the same. TML will review the proposal and accept or reject the proposal at the earliest possible date based on discussion with TEL.

3.3       In the event that TEL needs to modify or change the work scope due to reasons beyond it’s control, then TEL shall propose an alternate work scope (Project variation) and information about it’s implications in-terms of cost, timeline and deliverables to TML. TML will review the proposal and accept or reject the proposal at the earliest possible date based on discussion with TEL.

Article 4 – TIMING

4.1       The duration of the project as mentioned in timing plan (included in Exhibit 1).

4.2     TEL shall use its best endeavors to complete the work in accordance with the times stated in Exhibit 1. In the event of a delay or lateness of performance caused by the manifest fault of TEL, then TEL shall use all reasonable endeavors to rectify the delay by accelerating the Programme to the Project to meet the agreed schedule. Any additional costs thereby incurred by TEL shall be TEL's responsibility.

4.3     Where TML or its suppliers is required to supply components, information, data, drawings, equipment, vehicles, instruments or any relevant resource sufficient of these must be supplied in reasonable time to enable TEL to proceed with the “Project” forthwith, otherwise TEL, in consultation with TML, shall amend the program.

4.4     In cases where it is necessary to have a break in the project, TEL and TML will work towards reshuffling / rescheduling the project so as to accommodate the break without affecting the overall timeline and cost.

Article 5 – PAYMENT

5.1       In consideration of the Project performed by TEL and for information and assistance provided by TEL, TML shall pay TEL the sum set out in Exhibit 1.

5.2       The prices shall be deemed to be gross of taxes. If the payments are subject to Tax at Source, then TML shall deduct such taxes and shall provide Tax Deducted at Source (TDS) Certificate, which could be used by TEL to set off their tax liability.

5.3       The payment is also exclusive of all other duties and taxes in respect of the Project and exclusive of any export and/or import duties on any goods involved in the Project, all of which duties and taxes shall be paid by TML.

5.4       If TEL shall be liable to pay Goods and Services Tax (GST) in India on the services indicated in this Agreement then these taxes shall be borne by TML. TEL shall, in the invoice raised on TML, separately show GST payable on the services rendered and shall also show other necessary details such as GST registration no. etc. so as to enable TML to claim credit for the same as per law.

5.5       TEL shall raise invoices along with the Work / Milestone Completion Certificate (Annexure II) duly signed by both TML and TEL Project Managers as detailed in Exhibit 1. TML shall make the payments against such invoices within 30 days from the date of receipt of the invoice by TML. Please note that 30 days period is applicable only if TML receives invoice from TEL which is accompanied by Work / Milestone Completion Certificate, duly signed by both TEL and TML Project Managers. In case TML receives invoice without Work / Milestone Completion Certificate, then 30 days period will start from the date of receipt of Work / Milestone Completion Certificate.

5.6     Payments shall be made as set out in Exhibit 1. If TEL is prevented from or delayed in the completion of a Payment milestone by an event outside the direct control of TEL, then TEL on handing over all the results of Work (Deliverables, Data, Documentation, etc.) shall propose the total amount due as per the work completed and milestones achieved. TML on receipt of Work (Deliverables, Data, Documentation, etc) either approve or advise modification to the payment request. On recommendations of TML, TEL will raise the invoice along with Work / Milestone Completion Certificate duly signed by both, TEL and TML Project Managers. If TML rejects the payment request then TML shall communicate to TEL the reasons for the same the payment shall be decided upon mutual agreement between the parties.

5.7       TEL shall mention Purchase Order details on the invoice.

Article 6 - GRANT OF RIGHTS

6.1     All Intellectual Property Rights created, developed or otherwise generated or arising from the services under this Agreement shall be owned solely by TML.

6.2     All existing Intellectual Property Rights owned by the parties not resulting from project work carried out under this agreement, but introduced into the project shall remain each party’s exclusive property.

6.3     TEL shall grant TML the world wide, non exclusive, royalty free license to use TEL’s Intellectual Property Rights whether patented or not as described in clause 6.2 above for all purposes included in this subject matter of the Project and it’s derivatives and for use in any other TML’s projects.

Article 7 – CONFIDENTIALITY

7.1     In recognition of the confidential nature of the Project and information developed or received hereunder, TEL (the receiving party) shall not disclose or convey without the prior written consent of TML (the disclosing party) any such technical information received from TML (the disclosing party) or developed under this Agreement to any other party for the duration of the project and for a minimum period of twelve (12) years from the date of project completion, termination or short closure. TEL (the receiving party) shall establish adequate procedures to prevent such transmittal of such technical information by its current/future employees.

7.2        The undertakings in Articles 7.1 shall not apply to the following: 

  1. Information which is necessarily disclosed to third parties to enable the performance of work to be carried out in connection with the Project, provided that the third party receiving the information enters into an agreement to keep the information confidential in accordance with this Article 7; 
  2. Information which is ordered to be disclosed by a court of competent jurisdiction; 
  3. Information which is already in the public domain (except because of any breach of this undertaking); 
  4. Information which the party receiving the information can demonstrate from written records was already known to it at the time of receipt of such information from the party disclosing the information.

Article 8 – WARRANTY

8.1     TEL shall carry out the Project with the same care and diligence as it uses in other similar Projects and shall thus ensure the accuracy of the results.

8.2       Each party shall promptly advise the other of any significant error or improper information it may discover in the Project or technical information provided. If the error occurred because of inaccurate or incomplete information supplied by TEL then in that event TEL, at its own expense, shall correct the error in the Project or technical information and shall furnish the corrected information to TML without delay as defined in Exhibit 1. If the error has occurred due to inaccurate or incomplete information supplied by TML or one of TML's suppliers then the error shall be corrected at TML's expense.

8.3       TEL warrants the correct performance of its obligations under this Agreement provided that such performance remains under the control of TEL. TEL's warranty is limited to the correction of the work which does not comply with the above warranty, free of charge at TEL’s premises. Any claims by TML beyond this are excluded.

8.4     TEL warrants that the know-how and technical information supplied to TML hereunder do not infringe on the intellectual property rights belonging to third parties. If such third party rights are infringed TEL's liability will be to (at TEL's expense and discretion) modify the information so that it is no longer infringing third party rights or purchase a license from the third party or defend the claim. TML agrees to give TEL all reasonable assistance, if so requested by TEL, at TEL expenses if TEL would like to defend the claim.

8.5     TEL shall not be liable for special, indirect or consequential losses including but not limited to loss of profits, loss of production time, production tooling costs, product recalls of loss of market opportunity. Notwithstanding anything contained in this Agreement, the maximum liability of TEL to TML in respect of this Agreement, for breach of contract, negligence or otherwise shall be limited to the value of the part of the work in dispute subject to a maximum total liability equal to the amount finally paid to TEL under the terms of Article 5 herein.

8.6     TEL shall ensure compliance of the provisions of all Labour laws, including but not limited to, Employees Provident Fund and Miscellaneous Provisions Act, 1952, Employees State Insurance Act, 1948, Payment of Gratuity Act, 1972, Workmen Compensation Act, 1923, Minimum Wages Act, 1948, Payment of Bonus Act, 1965 and Contract Labour (Regulation & Abolition) Act 1970 read with the Maharashtra Contract Labour (Regulation) Rules 1971 as also to any other order, ordinances, notifications, rules, regulations, legislation or provision of or having the force, whether Central, State, Municipal or otherwise, related to or pertaining to the execution or performance of the Work / Services under this Agreement. TEL shall execute and deliver to TML any documents as may be required to effect or to evidence such compliance. All laws and regulations, including their amendments, required to be incorporated in agreements of this character are hereby incorporated herein by reference.

Article 9 - LANGUAGE AND MEASUREMENT

All communication between the parties will be in English. All the documents and drawings will be in English.

Article 10 - FORCE MAJEURE

10.1     Neither party shall be liable to the other party for non-performance or delay in performance of any of its obligations under this Agreement due to events of force majeure. Events of force majeure shall be events which reasonably affect that party’s ability to carry out its obligations under this Agreement and which are beyond that parties control. Such events shall include, but shall not be limited to, fire, flood, strikes, labour troubles or other industrial disturbances, unavoidable accidents, government regulation, riots, and Acts of God. Upon the occurrence of any event of force majeure the affected party shall immediately notify the other party of such event and of the effects of such event on that parties obligations under this Agreement. Immediately after the event of force majeure is removed or has ceased to have effect, the affected party shall perform such obligation with all due speed unless the Agreement is previously terminated in accordance with Article 11 hereof or Article 10.2 below.

10.2     If either party is prevented from carrying out its obligations under this Agreement by any event of force majeure, then both parties may mutually agree to terminate this Agreement on giving two weeks prior written notice to each other.

Article 11 - TERM AND TERMINATION

11.1     This Agreement shall be effective from the date when signed by both parties ("Effective Date") and shall in force for period of COM_PROJ_DUR months.

11.2     Either party may suspend performance of its obligations under this Agreement, without being liable for delay arising from such suspension, whilst the other party is in breach of any of its obligations.  The party wishing to suspend performance must give the other party written notice of the reason for the suspension.

11.3     Either party may terminate this Agreement if the other party becomes insolvent, or enters bankruptcy, receivership, liquidation, or similar proceeding.

11.4     Either party may terminate this Agreement if upon having given written notice by registered letter to the other party for any substantial non performance, violation or other substantial breach of any provision of this Agreement, the other party does not correct or take suitable actions to correct such violation, non-performance or breach to the satisfaction of the notice-sending party within sixty (60) days from the date of such written notice as aforesaid.

11.5     In the event of premature termination by TEL of this Agreement for breach by TML, or in the event of premature termination by TML of this Agreement, for any reason other than due to breach by TEL, TEL shall be entitled to payment for all work carried out up to the date of termination and for all costs unavoidably incurred subsequent to that date in the course of winding up the Project always provided that TEL shall use its endeavors to minimize such costs and supplies TML with the results of all work carried out by TEL up to the date of termination.

Article 12 - DISPUTE RESOLUTION

12.1     The parties to this Agreement will work together in good faith to remedy any technical, business, legal or other difficulties which may arise in connection therewith. If any dispute arises between the parties a memorandum or other form of statement setting out its position on the matter in dispute and its reasons for adopting that position will be circulated by each party to the other. Each memorandum or statement will be considered by the authorized signatories of each party who will, respectively, use their reasonable endeavors to resolve the dispute. If they agree upon a resolution of the matter, they will jointly sign a statement setting out the terms.

12.2     If the dispute is not settled within 30 (thirty) days of notification, unless the Parties otherwise agree in writing, such dispute shall be finally settled by binding arbitration in Mumbai. TML shall have the right to appoint the sole arbitrator. The arbitration shall be conducted under the terms of and in accordance with the Indian Arbitration and Conciliation Act, 1996. The proceedings shall be conducted in English at Mumbai.

12.3     The arbitration shall take place in (Mumbai) India and shall exclude any right application or appeal to any court in connection with any question of law or fact arising in the course of arbitration or with respect to any award made. The arbitrator shall apply the Laws of India but shall conduct the arbitration and present his award in English.

12.4   The arbitration award shall be final and binding on each Party and shall not be subject to any appeal and shall deal with the question of costs of arbitration and matters related thereto. Equitable remedies shall be available but punitive or exemplary damages shall not be awarded.

Article 13 – NOTICES

Any notice required or permitted to be given under the provisions of this Agreement shall be written in English and delivered personally or by registered airmail. Any notice sent to TML shall be directed to and addressed as follows:

Any notice to TML shall be directed and addressed to as follows

            Strategic and Business Planning,

            Engineering Research Centre,

            XYZMotors Limited,

            Pimpri, Pune- 411018

            Maharashtra, India

Any such notice to TEL shall be directed and addressed to as follows.

           XYZElxsi Ltd

           IPTL road, Whitefield

           Bengaluru – 560 048

The parties by notice hereunder may designate other address to which notices shall be sent. In case of delivery of notice or communication by registered airmail, notice shall be deemed given as of the date which is 15 working days after the date of posting of the notice.

Article 14 - PROPERTY DELIVERY AND DISPOSAL

All information, materials, vehicles, equipment, components, documents and data in connection with the Project (in this Article together called "items") which are delivered to TEL by TML will be delivered at TML's risk and cost.  All such items will remain at the risk of TML at all times except for those items specifically covered in Exhibit 1. All such items delivered to TEL or otherwise procured by TEL in accordance with Article 2 shall either be returned to TML or disposed of by TEL as directed by TML in accordance with Exhibit 1.

Article 15 – SURVIVAL

Articles 6, 7 and 8 shall survive any termination or expiration of this Agreement.  However, if TEL has terminated this Agreement in accordance with Article 11.2 or 11.3 then the warranties in Article 8 shall only apply to those elements of the work which had been completed by the date of termination. 

Article 16 – AMENDMENT

No modification of this Agreement shall be effective unless made by an amendment in writing executed by authorized persons on behalf of the parties.

Article 17 - MISCELLANEOUS PROVISIONS

17.1     This Agreement and documents attached herewith constitute the entire contract between the Parties and the Agreement will be limited to work covered by the signed Exhibit 1.

17.2     If any of the provisions hereunder and any of the further stipulations shall be or become ineffective the validity of the other provisions shall not be affected.

17.3     This Agreement may not be assigned by either party without the other parties’ prior consent in writing.

17.4     This Agreement does not constitute either party the agent or legal representative of the other and neither party is granted any express or implied right or authority to assume or to create any obligations or responsibility on behalf of or in the name of the other, or to bind the other in any manner.

17.5     The failure of either party to this Agreement to require performance of any provision thereof shall never affect the full right of such party to require such performance at any time thereafter; nor shall the waiver by either party of a breach of any provision thereof ever constitute a waiver of any succeeding breach of the same or any other provision thereof.

17.6    This Agreement is written in the English language and executed in two (2) counterparts, each of which shall be deemed an original. The English language text of this Agreement shall prevail over any translation thereof.

17.7     This Agreement shall be governed by the laws of India.

Article 18 – JURISDICTION

Subject to provisions of Article 12 the Courts in Pune will have the exclusive jurisdiction to entertain and try any dispute hereunder.

IN WITNESS WHEREOF the parties hereto have executed this Agreement in duplicate through their duly authorized officers on the dates set forth below.

XYZMotors Ltd.

 

COM_PROJ_ID

 

 

 

By: Rasit Pereira

Title: Head - D&D Sourcing and SPE, ERC)

Date:

 

XYZMotors Ltd.

XYZElxsi Ltd.

COM_PROJ_ID

 

 

COM_PROJ_ID

 

 

By:T N Umamaheshwaran

By:

Title: Head (DPD & SBP, ERC)

Title:

Date:

Date:

ericschernoff commented 4 years ago

Pratik,

It appears you pasted the HTML into the textbox, so it got converted to Markdown. Please attach the file to your update -- click on the 'Attach files by dragging and dropping' note at the bottom of the update textbox and attach the files. If that does not work, you can email the file as an attachment to ericschernoff at gmail.com

However, I can see that you have CSS and style tags in your HTML. Unfortunately, the HTMLDOC program does not support CSS or style tags, and it mainly supports HTML 3.2 with a little bit of HTML 4.0. Please do review the HTMLDOC manual here: https://www.msweet.org/htmldoc/htmldoc.html

Please also use the 'htmldoc' command to test your HTML and command options to verify if there is really any difference with the Perl.

Thanks, -Eric

ericschernoff commented 4 years ago

Hi Pratik,

I have just released an updated version of HTML::HTMLDoc, which should be available from CPAN by tomorrow, or perhaps by the time you are reading this. This includes the documentation tweaks plus a get_htmldoc_command() method to retrieve the 'htmldoc' command with arguments to generate the PDF based on the configuration you've set via the other methods. You could then use this command to troubleshoot your HTML file to get the right PDF output.

Please bear in mind that if your HTML does not work with the 'htmldoc' command, then it is not going to work with this module. If you have a concern about the 'htmldoc' program, please open an issue with its author here: https://github.com/michaelrsweet/htmldoc/issues

I am closing this now because I am not comfortable troubleshooting your specific HTML document.

Thanks, -Eric