Using PD4ML library for convertin HTML to PDF

Hi all
i am using API s from PD4ML library for converting HTML to PDF.
what i am sending via HTML is a single HTML table.but the problem is i need to identify the number of lines which i need to give for single PDF page for the case when HTML table is too large to fit into single page.i can decide the number of lines before hand like 31 for portrait and 52 for landscape.but in this case problem arises when page size is too large.for eg page size is A1 and i have specified number of lines as 31.
In this case lot of empty space is left at the end of page.
so i actually need to calculate NUMBER OF LINES for single page as a FUNCTION of PAGE SIZE and FONT SIZE . font size because it also affects the number of lines that fit into single page.
would be really grateful if u guys can help fast

#1 There are definite copyright issues with your
software. Before you go live with anything like this,
make sure you're not gonna get reamed.Ehh? I didn't see anything from the OP's question that implied this. Yes, if he uses it to mine commercial web sites and convert them to PDF's there's a problem, but aside from that, where's the danger?
#2 The PDF part is the easy part. As the other poster
said, lowagie iText can do PDF. The rendered HTML is
a much bigger question. The smaller issue is that web
pages are defined to fit your browser window, so
you've got to choose a size. The much tougher problem
is finding a decent HTML renderer in Java. In truth,
I don't think there is one; JEditorPane is a piece of
****, and opera is really not a lot better. Not at all. The OP specifically mentioned web services, so we don't need to assume that Swing is involved. You can, using a 3rd party library (google for java pdf), have a servlet or jsp render its output as a PDF document.

Similar Messages

  • I tied to sync my ipod to the itunes but, the apps wont sync it just says the apps will be replaced with the ones on the itunes library,but there isnt any apps on there, i deleted all the apps after i use to use the library for my old iphone helpp\!!!!!!!

    i tied to sync my ipod to the itunes but, the apps wont sync it just says the apps will be replaced with the ones on the itunes library,but there isnt any apps on there, i deleted all the apps after i use to use the library for my old iphone helpp, the ipod used to be synced with a another i tunes libary that i have deleted now

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    or
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek
    You can only sync with one ITunes library. It you switch iTunes library iTunes will erase the iPod and replace it contents with what is in the library of the new computer.

  • Jar file for converting html to pdf

    Does anybody have jar file for converting a html document to pdf?

    Are u particular about using jar file ?
    I have developed form which converts any type of files especially word, txt ,html to pdf. Let me check if I have that
    Rajesh ALex

  • How do I use one library for multiple iPods

    I have three girls that recently got iPod nano's. I would like to use only one library for their music etc. How do I do this. when I installed the first one it worked great. Then when I installed the second one it won't recognize the first one. Then when I went back to factory settings on the first and synched her music the second one is not recognized. Help......

    Sorry, guess I am not using the "technical lingo". I already had itunes on my computer for a medical review course that I purchased to study for a certification exam. When nano #1 was purchased I hooked it up, registered it, and synched music to it. When my daughter tried to play songs, the songs titles and songs were mixed (song didn't match title). I hooked it up to the computer. It said it needed to be formatted. So I did and reregistered and synced the songs back on. Everything ok. Second nano hooked up, registered, named different name than #1, synched with the music she wanted. Tried to hook up #1 and it didn't recognize the nano. I went to the website and found out how to "find" it on the computer, followed the instructions to find it, and again it had to be "formatted" to have it recognized. I was again able to sync her music. Will I have to do this everytime I try to sync more music? that could be a real pain!
    thanks for any help for this sometimes electronically challenged mom.

  • Using one library for multiple computers and accounts (not store accounts)

    Okay, we currently have four macs in the house. One was recently bought: i7 iMac (late 2009), another is dying: (mid 2005 iMac), another is going somewhere else: (late 2006 iMac) and another is a laptop: C2D MBP (late 2008). We might add another computer into the mix some time later.
    Anyway, what I want to do is have one iTunes library which all of the computers can access (even guest's/friend's computers). We have a Time Capsule, and as I have heard one can make the TC the HDD for the iTunes library, I thought it best for it to be there.
    The only thing is, how can each computer (and the possible multiple accounts) each access the same library, without duplicating and messing anything up? Is that possible? If it is too hard for multiple computers to do this, I would still want the (late 2009) iMac to be able to use the same library for the two accounts on it.
    Thanks.

    Make sure everything you want to share is on the centralized drive (music, video, and books, but if any of you have mobile devices, keep the apps on your local drive). Mount the drive on your computer. (Remember, from now on you must do this before starting iTunes.) If iTunes isn't running, start it now.
    At the moment iTunes thinks the library is on the local computer and has all the music on it so that has to be changed. Click on Music in the left window pane, select all, and delete. This deletes all the music from the library and, if you choose, from the computer too. (Until you are sure this set-up is to your liking, don't delete the music from the drive.) Now go to Preferences and select the Advanced tab. Set iTunes to look at the music folder on your shared drive. And finally, select File>Add to Library to repopulate your iTunes library. This could take a while if you have a large music collection.
    Since you changed the music location, anything that is added to one person's library will be saved onto the shared drive so it isn't too much of a hassle to manually add music. You'll have to rebuild playlists which is a minor hassle but it’s a one time deal.

  • Cannot use iPhoto library for Screensaver

    I think this used to work.  I wanted to use a certain album in iPhoto as the source for my Screen Saver, but the package is dimmed out when I go to select a source for the screensaver.  Is there some way around this?

    You should be able to use the library on the EHD to supply images for the screensaver.   What version of iPhoto are you using? What format is the EHD.  It must be OS X Extended (journaled) for it to operate properly and without problems.
    OT

  • Using HttpSupport library for SSL with User Id/Password

    Does anybody know how to use UDS HttpSupport library for SSL connection which requires user id and password?
    Got no problem so far in getting pages using https and HttpBaseRequest but can't figure out how to setup user id and password for logging in to server. Have tried https://userid:password@server/... but UDS treated password@server as the port!
    Any help is appreciated.

    I assume you mean that you need to provide the password needed for a certificate for SSL authentication.
    For both client and server, these are configuration items.
    If you want to do HTTP authorization, which is not related to SSL, you should use the Authorization and WWW-Authenticate (in a 401 response) to get a user name and password to the server.

  • Can I use RS232 library for RS485 communication? Alternatively, can I use NI Serial with non-NI 485 boards?

    Hi-
    I have successfully used RS232 library to communicate with one RS485 device.  I now have multiple devices using the same Rx and Tx lines.  Three of the 4 devices have their own dll and can communicate effectively despite each other.  My problem occurs when the one device I am talking to using the RS232 library now has to share the lines with the other devices.  Are there any ways around this? All I can think of is to see if I can use the NI Serial library commands with my non-NI PCIe card.  OR, buy the NI 485/422 card and use the NI Serial commands.  Any other suggestions? 
    Thanks.

    The fundamanetal difference between RS232 and RS485 is the ability to connect to multoiple devices. The devices also normally work in a "speak only when spoken to" mode and this is achieve by adding a device address in the protocol. The NI serial library is oblivious to most of this and doesn't care if it's RS232 or RS485. The problem with your 232 device is that it will speak everytime when any other device is adddressed, so you should make it comply to 485 standards. This can be done with RS232 to RS485 convertors. You can do a search on Google for this. The ones I use and have the least amount of problems with is either from Advantech (<http://www.advantech.com/products/search.aspx?keyword=RS-232#search> and <http://www.advantech.com/products/search.aspx?keyword=RS-232#search>) or BB Electronics. (<http://www.bb-elec.com/Products/Serial-Connectivity/Serial-Converters/Port-Powered-RS-232-to-RS-485-...>)
    Best Regards
    Jattie van der Linde
    Engineering Manager, Software & Automation
    TEL Magnetic Solutions Ltd

  • Solutions for converting HTML to PDF programatically?

    to start off i should say that i am rather new to programming in java.
    here's what i am attempting to do.
    i need to write a java class that will get an HTML string as input... and needs to spit out a PDF file (or outputstream) as output. i have spent the last week or trying to accomplish this using XSL-FO and the FOP library. this solution does not work too well because XSL-FO and FOP do not handle complex table layouts very well (since they require the number of columns and column widths to be known in advance). it seems that FOP (and XSL-FO) is better suited to handling structured XML input... not something unstructured and complex as HTML.
    are there any other libraries/APIs that are out there that are specifically well suited to HTML -> PDF conversion?
    remember this needs to be done programatically, and will probably be invoked as a webservice.
    thanks,
    vivek

    #1 There are definite copyright issues with your
    software. Before you go live with anything like this,
    make sure you're not gonna get reamed.Ehh? I didn't see anything from the OP's question that implied this. Yes, if he uses it to mine commercial web sites and convert them to PDF's there's a problem, but aside from that, where's the danger?
    #2 The PDF part is the easy part. As the other poster
    said, lowagie iText can do PDF. The rendered HTML is
    a much bigger question. The smaller issue is that web
    pages are defined to fit your browser window, so
    you've got to choose a size. The much tougher problem
    is finding a decent HTML renderer in Java. In truth,
    I don't think there is one; JEditorPane is a piece of
    ****, and opera is really not a lot better. Not at all. The OP specifically mentioned web services, so we don't need to assume that Swing is involved. You can, using a 3rd party library (google for java pdf), have a servlet or jsp render its output as a PDF document.

  • Use 1 Library for both Mac and PC OS's?

    I have a pretty basic question about itunes. I am running a Mac Pro and bootcamp with Windows Vista on the other side. I have 3 seperate Hdds. One for Mac...One for PC...And one for audio files and pictures and other stuff.
    I did have my itunes music library on my Mac Hdd for when Im running OSX. Well i still do. But what I want to do is move my itunes library to the 3rd Hdd (non-bootable) and hopefully use it for both the Mac OSX and the PC Vista side. So instead of having the same library copied to 2 seperate Hdds for the 2 seperate OS's Ill have 1 itunes library and be able to access it from both Os's. I have Mac drive 7 installed so I know I can access the 3rd HFS+ comp drive from the PC OS.
    So how do I go about doing this right so I dont screw anything up?

    The easiest way to do this, I think, involves copying the Music folder from OS X to the new hard drive. Then delete the old Music folder from the OS X drive. Create an alias to the new Music folder, copy it to your home folder, and rename it to the same name as the folder you copied. (i.e. copy /Users/john/Music/iTunes to AUDIO/Music/iTunes, then create an alias to iTunes and copy it to /Users/john/Music. Rename the alias to iTunes.)
    Dealing with Windows is more difficult, as only Explorer follows shortcuts (NTFS doesn't support 'true' symlinks). I think you can set iTunes to read the AUDIO/Music/iTunes folder as its library folder in Edit > Preferences.
    Good luck.

  • Using Windows Search for multiple, multi-page PDFs

    I am scanning documents into a Windows folder (documents have been OCR'ed).  An employee verifies that each document has a specific number that OCR picked up, if OCR did not, the user will use the 'Add or edit text box' under tools in Adobe Acrobat Professional XI to add the correct number.  Multiple scans are handled this way and merged together to create documents that may be up to 2300 pages long (so far).  Within that same Windows folder, there are other files with similarly handled information and numerous pages.
    My problem is, if I am looking for a specific number that is within one of the PDF files within the Windows folder - I can find it if I open the file that contains the number and do a search.  However, even though we are using a Windows index to be able to search from the Windows Search, the Windows Search will not always be able to find one of the indexed numbers.  Does anyone know if there is a maximum size or number of pages a PDF can be for the Windows Search to be able to be used?  Perhaps this is a question I should ask of Windows.  I am not sure if I am doing something wrong with the PDFs or if the Windex index isn't working.  Thoughts?

    Something that may help -
    With a multi-page PDF open in Acrobat Pro; select Document > Extract Pages
    In the Extract Pages dialog you can select "Extract Pages As Separate Files".
    This will provide you with a PDF file for each page of the source PDF file.
    Additional options are also possible.
    In a thread at AUC, Thom Parker identifies these.
    http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=4703
    Be well...

  • Use XMP Information for Alternate Text in PDF

    I would like to use the information in the metadata, specifically the Description field and use it as the Alternate Text for the images within a PDF.
    Is there a way to do this? or a script I can write to accomplish this task?
    Thanks!
    Mike

    I would like to use the information in the metadata, specifically the Description field and use it as the Alternate Text for the images within a PDF.
    Is there a way to do this? or a script I can write to accomplish this task?
    Thanks!
    Mike

  • Using widget library for menus - BAM

    Hi
    I am using a widget library Composition - Featured News as a BAM and although I have the background set to solid white in all states, it does not prevent the text from the various pages showing through the drop down BAM. Any solutions to this please? 
    Thanks.

    And I just wish that when people have questions and publish them in this forum like this they would give full information, not leave out a crucial element by abbreviating words (BAM), so that many members can't understand.

  • Problem with converting html to pdf using LiveCycle ES Java API

    I am using this code to convert html to pdf.
    * 1. adobe-generatepdf-client.jar
    * 2. adobe-livecycle-client.jar
    * 3. adobe-usermanager-client.jar
    * 4. adobe-utilities.jar
    * 5. wlclient.jar
    import java.io.File;
    import java.util.Properties;
    import com.adobe.idp.Document;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
    import com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;
    import com.adobe.livecycle.generatepdf.client.HtmlToPdfResult;
    public class ConvertHTML {
       public static void main(String[] args)
            try{
            //Set connection properties required to invoke LiveCycle ES                             
            Properties connectionProps = new Properties();
            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "t3://localhost:7001");
            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,Service ClientFactoryProperties.DSC_EJB_PROTOCOL);       
            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");
            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
            //Create a ServiceClientFactory instance
            ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);
              //Create a GeneratePdfServiceClient object
            GeneratePdfServiceClient pdfGenClient = new GeneratePdfServiceClient(factory);
           //Get an HTML document to convert to a PDF document a
            String inputFileName = "http://www.adobe.com";
            //String inputFileName = "C:\\Documents and Settings\\venkat\\Desktop\\Adobe.htm";
            String securitySettings = "No Security";
            String fileTypeSettings = "Standard";
    System.out.println("one");
            //Convert HTML content to a PDF document
            HtmlToPdfResult result = pdfGenClient.htmlToPDF2(inputFileName, fileTypeSettings, securitySettings, null, null);
    System.out.println("two");         
            //Get the newly created document
            Document createdDocument = result.getCreatedDocument();
            //Save the PDF document as a PDF file
            createdDocument.copyToFile(new File("C:\\test.pdf"));
        catch (Exception e) {
            System.out.println("Error OCCURRED: " + e.getMessage());
            e.printStackTrace();
    I can able to compile this class but while running i am getting error like below.
    Error OCCURRED: Internal error.
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java
    :160)
            at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat
    cher.java:57)
            at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
            at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.htmlToPDF2(GeneratePdfSer
    viceClient.java:666)
            at ConvertHTML.main(ConvertHTML.java:84)
    Caused by: java.rmi.RemoteException: Remote EJBObject lookup failed for 'ejb/Invocation'; nested exc
    eption is:
            org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 203  completed: No
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.
    java:101)
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java
    :130)
            ... 4 more
    Caused by: org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 203  completed: No
            at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
            at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
            at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.writeLock(Unknown Source)
            at com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendFragment(Unknown Source)
            at com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendMessage(Unknown Source)
            at com.sun.corba.se.impl.encoding.CDROutputObject.finishSendingMessage(Unknown Source)
            at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.finishSendingRequest(Unknown Sour
    ce)
            at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(Unkno
    wn Source)
            at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknow
    n Source)
            at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
            at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(Unknown Source)
            at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
            at weblogic.corba.j2ee.naming.Utils.narrowContext(Utils.java:126)
            at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFact
    oryImpl.java:94)
            at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFact
    oryImpl.java:31)
            at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
            at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
            at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
            at javax.naming.InitialContext.init(Unknown Source)
            at javax.naming.InitialContext.<init>(Unknown Source)
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initJndiContext(EjbMessageDispat
    cher.java:213)
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.getJndiContext(EjbMessageDispatc
    her.java:226)
            at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.
    java:87)
            ... 5 more
    can u plz give me some way to do the convertion.

    Yes Sir.....Thanks for ur suggestion.....
    But i didn't find exact solution..well..yes i found some but not exactly there were not in the way i required...I jus need to convert HTML to PDF using iText API for java.....I already used some classes in that like HTMLParser.....etc..
    So Any thing else...Any one...Sure can help me in this................

  • Error while Open and save pdf using Adobe library

    I m using adobe library to open and save PDF using VC++ MFC .
    as given samples are working for me all are using console application to accomplish this task.
    But when i tried to use same functions to open and save PDF from DOC/VIEW application it gives me an error.
    it is a strange problem that I don't understand. If I compile the following code (Visual C++ 2000 Express Edition) I get an error message: "Unhandled exception at 0x0041183f in test.exe: 0xC0000005: Access violation reading location 0x00000004."
    For your reference when I simply  create one function and one menu and called that function from menu.
    Please see the code is given below.
    The code is given below
    void CPDF_MFCDoc::OnPdfOpen()
        // TODO: Add your command handler code here
        OpenPDF();
    #define PDF_FNAME1  "C:/Test.pdf"
    void OpenPDF()
         PDDoc pdDoc= NULL;
         ASErrorCode errCode = 0;
         DURING
            pdDoc1 = MyPDDocOpen(PDF_FNAME1);
        HANDLER
            errCode = ERRORCODE;
        END_HANDLER
    It gives me an error as.
    Unhandled exception at 0x004075b1 in PDF_MFC.exe: 0xC0000005: Access violation reading location 0x00000024.
    But when same thing I was complied from console ,it works.
    Working code is given below.
    #define PDF_FNAME1  "C:/Test.pdf"
    void MainProc(int argc, char **argv )
         PDDoc pdDoc= NULL,
         ASErrorCode errCode = 0;
         DURING
                 pdDoc1 = MyPDDocOpen(PDF_FNAME1);
         HANDLER
            errCode = ERRORCODE;
        END_HANDLER
    PDDoc MyPDDocOpen(char *fileName)
        ASFileSys asFileSys = ASGetDefaultFileSys();
        volatile ASPathName asPathName    = NULL;
        volatile PDDoc        pdDoc        = NULL;
        DURING
            /* Create asPathName from file.*/
            #if MAC_PLATFORM
            asPathName = GetMacPath(fileName);
            #else
            asPathName = ASFileSysCreatePathName(asFileSys, ASAtomFromString("Cstring"), fileName, 0);
            #endif
            /* Open pdDoc from asPathName.*/
            pdDoc = PDDocOpen(asPathName, NULL, NULL, true);
            fprintf(stdout, "Successfully opened %s\n", fileName);
        HANDLER
            fprintf(stderr, "Unable to open %s\n", fileName);
            pdDoc = NULL;
        END_HANDLER
        /* Release asPathName.*/
        if (asPathName)
            ASFileSysReleasePath(asFileSys, asPathName);
        return pdDoc;

    Yes ,I have it , I think when i tried to open or save any document "ASGetDefaultFileSys()" function not able to get file it raise an error , can you please help me out . where I m wrong.
    Why this "ASGetDefaultFileSys()" function raise as "Access violation error" .
    Please help me.

Maybe you are looking for