Re: [iText-questions] XMLWorker convert HTML to PDF problem?
Op 9/09/2013 4:35, Eric Chow schreef: Hello, From the example, I can convert HTML to PDF using XMLWorker-5.4.3. My question is that, I have a existed PDF template a.pdf. How can I convert a html file to a.pdf? Would you please to teach me? It depends on what you mean by existing PDF template. If you mean something like company stationery (like pre-printed paper with a company header, logo, footer,...), then it's easy: use a page event to add the page in the background of every page. If you are talking about an interactive form, you're not providing us sufficient information: are you talking about an AcroForm or an XFA form? What do the fields look like? If you're talking about an ordinary PDF file, then the question is unclear and you'll have to further explain. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] XMLWorker convert HTML to PDF problem?
It is a company paper with some pre-printed information on it. How can I add the page as the background? Would you please to show me a simple example? Best regards, Eric On Mon, Sep 9, 2013 at 3:55 PM, iText Info i...@1t3xt.info wrote: Op 9/09/2013 4:35, Eric Chow schreef: Hello, From the example, I can convert HTML to PDF using XMLWorker-5.4.3. My question is that, I have a existed PDF template a.pdf. How can I convert a html file to a.pdf? Would you please to teach me? It depends on what you mean by existing PDF template. If you mean something like company stationery (like pre-printed paper with a company header, logo, footer,...), then it's easy: use a page event to add the page in the background of every page. If you are talking about an interactive form, you're not providing us sufficient information: are you talking about an AcroForm or an XFA form? What do the fields look like? If you're talking about an ordinary PDF file, then the question is unclear and you'll have to further explain. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] XMLWorker convert HTML to PDF problem?
On 9/10/2013 5:43 AM, Eric Chow wrote: It is a company paper with some pre-printed information on it. How can I add the page as the background? Would you please to show me a simple example? See http://itextpdf.com/examples/iia.php?id=114 Create a helper class that extends PdfPageEventHelper. Add a member variable: protected PdfImportedPage page; Initialize this member variable in the constructor of your helper class: PdfReader reader = new PdfReader(STATIONERY); page = writer.getImportedPage(reader, 1); Implement a single method of the page event interface: public void onEndPage(PdfWriter writer, Document document) { writer.getDirectContentUnder().addTemplate(page, 0, 0); } Note that this assumes that your newly created file and your existing file (of which STATIONERY is the path) have the same page size. Now that you have this separate class, add it as a page event to the writer you already have using the setPageEvent() method. -- How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] XMLWorker convert HTML to PDF problem?
Hello, From the example, I can convert HTML to PDF using XMLWorker-5.4.3. My question is that, I have a existed PDF template a.pdf. How can I convert a html file to a.pdf? Would you please to teach me? Best regards, Eric -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php