Help using VBA to auto generate PDF using PDFMaker

I am using Adobe 9 Pro ( v9.2.0) and would to automate the building of PDFs from Excel.
I have an Excel document with a [Main] page that has hyperlinks to the multiple worksheets in the document.
I can manually select the [Main] sheets + all other sheets and choose SaveAs [Adobe PDF] and it builds a single PDF with all the sheets and includes the Hyperlinks so I can go from the [Main] page to each of the individual pages ( worksheets ) and back.
I would like to automate this build ( as I have to create 100+ PDFs per month ) using VBA.
In the Excel IDE, I added reference to [AdobePDFMakerForOffice] and the code below (which I copied from another post on this forum ) but it only creates one page ( active sheet ) !
Can anyone help with what I am doing wrong ?
Cannot find any documentation on the Usage or Example on the subject.
Thanks Aubrey
Sub rxSaveAsPDF(pSaveAs)
    Dim xx As Integer, retVal As Long
    Dim appAdobe As AdobePDFMakerForOffice.PDFMaker
    Dim appSettings As AdobePDFMakerForOffice.ISettings
    For xx = 1 To Application.COMAddIns.Count
        If InStr(UCase(Application.COMAddIns(xx).Description), "PDFMAKER") > 0 Then Set appAdobe = Application.COMAddIns(xx).Object
    Next xx
    appAdobe.GetCurrentConversionSettings appSettings
    appSettings.OutputPDFFileName = pSaveAs
    appSettings.ConvertAllPages = True
    appSettings.CreateFootnoteLinks = True
    appSettings.CreateXrefLinks = True
    appSettings.AddTags = False
'    appSettings.ShouldShowProgressDialog = True
'    appSettings.ViewPDFFile = True
    appSettings.FitToOnePage = False
    appSettings.PromptForSheetSelection = False
    appSettings.AddLinks = True
    appSettings.AddTags = True
    appSettings.AddBookmarks = True
    appSettings.AdvancedTagging = True
    appAdobe.CreatePDFEx appSettings, 0
    Set appAdobe = Nothing
    Set appSettings = Nothing
End Sub

Moved to Acrobat SDK

Similar Messages

  • Problem while generating PDF using iText

    Hi:
    I have generated PDF using iText, where i have written all code in sequential flow.
    <code>
    com.lowagie.text.Document document = new com.lowagie.text.Document(PageSize.A4, 55, 5, 20, 20);
    OutputStream outputstream = response.getOutputStream();
    PdfWriter.getInstance(document,outputstream);
    </code>
    And i have added all fields in the document.
    But my problem is how to display total pagecount on all pages e.g.1\20 (because i have generated PDF sequentially)
    Also i want to add watermark on all pages.
    So, can any body help me to solve this problem?
    Thank You,
    Balaji

    sabre150 wrote:
    Maybe http://itext-general.2136553.n4.nabble.com/
    Nice pron link in there :/

  • To generate PDF using BI APIs and loadjava utility

    Hi All,
    I am trying to generate PDF using BI APIs(FOProcessor etc).
    I have generated XML data through the PL/SQl procedure and storing it in a file. This file is loacted in database tier.
    The APIs is used through a simple java program which is application tier. To test the process, I had to manually provide the XML file to the java class in order to generate PDF and it does generate.
    Now the issue is I need to load the java class to the database so that everything gets automated(loadjava utlility).
    when i try to do it, it give no class found error.
    Do I need to load the referenced classes in the java file , that is, FOProcessor,RTFProcessor,FOUtility,jdbc.driver.OracleDriver as well?
    If the above is not possible, is it possible to reference a file in database tier from application tier so that i can use the XML file as input the java class in application tier.
    thanks,
    Srik

    The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
    Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
    So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off.

  • New to Lifecycle, Error while generating PDF using Output service

    Hi All,
    I am using LC 8.x for weblogic. I am using the code given in the documents to generate PDF given XDP and XML data, using Output Service. I am getting the following error,
    Exception in thread "Main Thread" com.adobe.idp.DocumentError: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: Failed to load class com.adobe.idp.DocumentFileID (see the server-side log for details)
    at com.adobe.idp.DocumentManagerClient.clientSidePush(DocumentManagerClient.java:181)
    at com.adobe.idp.Document.passivateInitData(Document.java:865)
    at com.adobe.idp.Document.passivate(Document.java:704)
    at com.adobe.idp.Document.passivate(Document.java:661)
    at com.adobe.idp.Document.writeObject(Document.java:500)
    Any help is greatly appreciated.
    Thanks
    Raghu

    Hi
    I am also doing a similar activity. and getting a IllegalStateException.
    com.adobe.livecycle.output.exception.OutputException: java.lang.IllegalStateException
    at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:141)
    at CreatePDFDocument.main(CreatePDFDocument.java:56)
    Caused by: java.lang.IllegalStateException
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory$1.handleThrowable(ServiceClientFactory.j ava:67)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:220)
    at com.adobe.livecycle.output.client.OutputClient.invokeRequest(OutputClient.java:436)
    at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:124)
    ... 1 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/axis/soap/SOAPConstants
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createMessageDispatcher(ServiceClientFac tory.java:586)
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.getMessageDispatcher(ServiceClientFactor y.java:543)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.getMessageDispatcher(ServiceClient.java:239)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:205)
    ... 3 more
    Please give a solution for this problom.
    regards
    Ullas

  • How to generate PDF using FDF file and the PDF form template (PHP)

    Hi Folks,
    I'm really sorry that I couldn't follow all the valuable discussions going on here, regularly. I need some immediate help.
    I NEED A PHP SOLUTION. I'm able to generate FDF files using the PDF Form Template in PHP. So, I have a collection of FDF files, which seeks the PDF template, while opened and populates the template with FDF data. Now if I need to save this PDF file, I have to do it manually clicking SAVE option. But, I need to convert FDF to PDF in bulk. So, I need some PHP based solution. The PHP script takes the PDF template and the FDF file and merges them to generate a complete populated PDF file. I know it's possible, but don't know how. I've seen Adobe FDF Toolkit. But by default it doesn't show any guideline for PHP. Please help me to write this code. I'm a professional coder. I can understand your hints and tutorials. PLEASE HELP GOOD PEOPLE.

    The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
    Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
    So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off.

  • Including image in FO fille to generate PDF using FOP

    Hi, we are trying out generating PDF files in JDK1.1.7 environment by using FOP.
    While we are testing we are encountering problem with writing images.
    In .fo file if the image is included, it is giving the following exception.
    We are of no clue regarding this. If any one can help in this regard, please help us out.
    Help of any kind is greatly appreciated.
    Following is the Exception:
    java.lang.UnsatisfiedLinkError: parseImage
    at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:558)
    at sun.awt.image.GifImageDecoder.produceImage(Compiled Code)
    at sun.awt.image.InputStreamImageSource.doFetch(Compiled Code)
    at sun.awt.image.ImageFetcher.fetchloop(Compiled Code)
    at sun.awt.image.ImageFetcher.run(Compiled Code)
    Error while creating area : Error while loading image file:/C:\fop1.4\src\xml_fe
    ather.gif : class java.lang.Exception - Image error
    Hisun.awt.image.URLImageSource
    Regards
    Ramavardhan.

    java.lang.UnsatisfiedLinkError: parseImage
    means that a native library is missing (ie .dll on windows, .so on most unix, .sl on other unix). The default behaviour is to try and load librarys from the CLASSPATH variable, but apps can try to locate them in other ways.
    asjf

  • Generate pdf using weblaout in oracle report server

    Hi all ,
    my weblogic version - weblogic 10.3.6
    report server version - 11.1.2.1
    i have created one jsp file on report server using web layout. i want to show  photo ( from cloud) on pdf.
    when i running this jsp file from rwbuilder using run weblayout , iam getting the photo on that output but when i am trying to generate pdf from URL its show me url instead of photo. can anyone resolve my problem.
    http://localhost:7001/reports/rwservlet?
    report=/home/oracle/reports/test1.jsp&destype=file&desformat=pdf
    &userid=username/password@localhost:1521/orcl&desname=/home/oracle/test.pdf

    We're also encountering this same error. Did you find a resolution?
    Thanks

  • Using taskFlow in auto generated human task

    Hi,
    I have auto-generated ADF human task which have simple payload with InvoiceId attribute.
    In worklist app I see this attribute and in page source there is an input text with value set to #{bindings.InvoiceId.inputValue}.
    I would like to add my custom task flow, which takes invoiceId as a parameter. When I set this parameter to #{bindings.InvoiceId.inputValue} I obtain strange errors.
    How should I set this parameter to the payload value? (I am using JDev 11.1.1.5.).
    kind regards,
    Krzysztof Polak

    I would like to add my custom task flow, which takes invoiceId as a parameter.Does that mean you have dropped your own task flow as a ADF region into your auto generarated page and you are passing InvoiceId as input parameter to the regionBinding ?

  • Generating pdf using java..

    hi everybody!
    is there any API that could be used to generate PDF,WORD docs from java. For WORD, there is some API JACOB, but for some reason it won't work for me.
    suggestions and code samples are highly appreciated.
    thanks in advance,
    /rahul

    I have successfull used FOP API
    http://xml.apache.org/fop
    DS.

  • How to use Flex Builders Auto Generated CFCs

    OK. Not only have I already gone to a 4 day flex training,
    have an advanced coldfusion certification and work with 3 coworkers
    who have done the same...none of us can figure out how in the heck
    the flex builder's autogenerated cfc's are to be used. No big deal
    on the fact that this might be something we simply are encountering
    for the first time, but the complete and utter absence of a single
    piece of example code or documentation stating how to use this code
    correctly is very very very very irritating.
    Can anybody, share with me anything about how these CFCs are
    to be used correctly. For example. We are using the wizard to
    generate an "Active Record CFC" set of cfc's for an example table
    contain four fields. We have a data grid that is now populated by
    the "getAllAsQuery" function....we would like to implement the
    feature of making this dataGrid updateable. We know how to pass
    data back and forth and yes we could write our own CFC to do
    this...but having it autogenerated is a really neat option...but
    the question remains....how does one use them!!!
    Any help would be much appreciated. Thanks in advance!

    Hi there, what's your name by the way?
    What is a VO or DTO, and why would you use it?
    This was copy from the Java world, so it's a very OOP principle, basically in the OOP world everything is a class that has methods and properties, and you represent everything with classes, a VO is just that a class that represents an entity in your app. You use it for a few reasons in my opinion:
    It allows you to pass strongly typed data between different layers in your app.
    It's more verbose, it's a good OOP practice, and also makes debugging and reading you code easier.
    It allows easy data type conversion between CF and Flex.
    You obviously know how to use the wizards, after you select your table and open the wizard you'll see three different CFC types, if you're using LCDS then select that type if you don't I'll recommend you to go with BEAN/DAO. In Flex Builder you can create a folder link to a system folder, so if you create a folder named MyCFCs and you set this virtual folder to be hold inside c:\ColdFusion8\wwwroot every file that you put in this folder will be place in c:\ColdFusion8\wwwroot so you don't have to manually copy those files.
    In this wizard you'll see CFC folder in there you can select your virtual folder, you'll see below the CFC package name this is extremely important to be set right, what is the CFC package name? Basically it's the same folder structure where your CFCs will be located for instance let's say you're gonna place the files in this folder structure c:\ColdFusion8\wwwroot\com\myPersonalDomain\ so your CFC package name will be com.myPersonalDomain.
    You'll probably also would like to enable the option: Create an ActionScript value object in addition to CFCs, the folder where you place this file have to mimic the CFCs folder structure so for an instance you'll have to save inside your src folder, inside a folder com, an finally inside a folder myPersonalDomain . src/com/myPersonalDomain, and the AS Package name should be the same as the CFC.
    Once you're done and click finish, you'll see for files created, one of the the AS VO , and three CFCs.
    yourDataTable.CFC
    This is a CFC that creates the VO or DTO in CFC, it has the same properties definition that the AS version has, also the setters and getter for every property.
    yourDataTableDAO.CFC
    This CFC contains all the code that handles the database access it a could be an insert, update delete or just a read query.
    yourDataTableGateway.CFC
    This is a bridge between your Flex app and your CFCs, it contains a set of methods commonly use when you access a DB, this CFC invocates the methods in the yourDataTableDAO.cfc and returns an object or an array of objects of yourDataTable.CFC type to Flex.
    In Flex what do you have to do in order to use VOs?
    Add a reference to yourDataTable.as class
    Create a remote object.
    Create the event handler(s)
    Make a call to the remote object.
    <mx:Script>
         <![CDATA[
                   import com.myPersonalDomain;
                   import mx.controls.Alert;
                 import mx.rpc.events.ResultEvent;
                  private var myDummyVar:myDataTable;
              private function myEventHandler(e:ResultEvent):void{
                   //do Something
                   trace(event.result.toString());
         ]]>
    </mx:Script>
    <mx:RemoteObject id="myRO" destination="ColdFusion"
    source="com.myPersonalDomain.myDataTableGateway">
         <mx:method name="getAll" result="myResultHandler(event)"
    fault="Alert.show(event.fault.toString())" >
    </mx:RemoteObject>
    <mx:Button label="Call CF" click="myRO.getAll()" />
    Well I hope this would help you, I'm kinda tired this has been by far the largest post I've written.

  • Error when generating PDF using FM 9

    I am trying to generate a PDF using FM 9 and Distiller 9. For some reason, one particular file is causing problems. When I try to generate a PDF with this file, I get the following error message:
    %%[ Error: syntaxerror; OffendingCommand: M ]%%
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%
    Anybody know what to do when this happens?
    Thanks.

    I suppose I should provide more background. We recently upgraded to the Technical Communication Suite 2, which when this problem started occurring. Prior to that, I was able to generate a PDF from this file when I was using FrameMaker 8.
    The file in question is a chapter in a book. Using FrameMaker 9 and Distiller 9, I can create PDFs from the other files in the book. The one with which I am having problems has screenshots in it. The screenshots are GIFs that I imported as files, and I did not link to them. I did some experimenting and discovered that if I print to file and drag the PS file into distiller, the PDF generates. Also, I created a version of this chapter without screenshots, and was able to generate a PDF.
    And I am now getting a different error message:
    Adobe PDF Settings file read error in PDFX4 2008.joboptions:
    /CheckCompliance out of range
    Anybody have any thoughts?
    Thanks.

  • Generating PDF using toolbar script

    Hi All,
    I am trying to create a PDF using a toolbar script and iText libraries.
    I need to convert an MSA to a PDF.
    What I want to know is that after the PDF is created, how can I auto open it in IE without human intervention.
    Any pointers shall be highly appreciated.
    Regards,
    Himanshu

    Hello,Expert,
    we tried creating the PDF using the following script, and got an error. Could you please give me some adviece about it!!
    Many thinks..
    the Script is:
    para = new Paragraph("asdsadsdsadsadas");
    Document doc1 = new Document();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    PdfWriter.getInstance(doc1,bos);
    doc1.open();
    doc1.add(para );
    doc1.close();
    FileInputStream nos = new FileInputStream(bos);
    //newAttachment = TypeFactory.createAttachment();
    //newAttachment.setFileData("Vendor Admit Certificate",nos,doc,session);
    The Error Message is:
    Typed variable declaration : Constructor error: Can't find constructor:
    java.io.FileInputStream( java.io.ByteArrayOutputStream ) in class: java.io.FileInputStream

  • How to generate PDF using fonts from Extended Font Pack?

    Hello
    Extended Font Pack, available for download contains MyriadPro-Regular.otf font that has cyrillic glyphs.
    I want to generate PDF document with cyrillic unicode data  that can refer to the MyriadPro-Regular font resource without embedding font.
    Are Extended Font Pack resources CID keyed fonts or not?
    Looks like such example of PDF structure allowed me to use it only in ANSI encoding
               'Type':'/Font',
                'Subtype':'/Type1',
                 'Name': '/MyriadPro-Regular' ,
                'BaseFont':  '/MyriadPro-Regular',
                 'Encoding': '/WinAnsiEncoding',
    What values should be for `Subtype` and `Encoding` to render cyrillic unicode (UTF-8 encoded) data and use MyriadPro-Regular Open Type downloaded from adobe and installed into local system without embedding it?
    Thanks

    Sorry for the delay. I admired with investigation of this case.
    My aim is to generate PDF docs on web site that have i18ned content. ALso client does not want to deal with any font licenses (font embedding will raise question about font licensing) and to reduce PDF file size with such approach. So I'm looking for the ability to link fonts in PDF source, that can be easiely downloaded from adobe.com and installed into local desktop. With Latin group (en-us, french, german) we  can use one of the 14 standard fonts, for CJK - Adobe Asian Font pack. I was considering (Myriad Pro or Minion Pro) font resources from Extended Font pack to cover Cyrillic glyphs. I observed that such fonts are usually installed with Adobe Reader installation (MyriadPro-regular.otf). To render cyrillic glyphs I followed such steps like converted into cp1251 encoding range of the cyrillic unicode data (as you told those fonts do not support unicode encodings the same way as CID keyed asian fonts) and pointed to the Type1 MyriadPro-Regular with custom WinAnsiEncoding. One problem I faced with is - that glyphnames are differrent in diferent Extended Font pack versions. I mean that cyrillic glyphnames for the Adobe Reader 8 started from `afii100xx`, when for the Adobe Reader 9 they are named `uni0xx` for the same font named MyriadPro. I used such glyphnames in the /Differences list in PDF source. How can I generate PDF source that can be viewed successfully in both Adobe Readers version 8 and 9?

  • Problem Generating PDF Using Adobe PDF as Driver

    I am using FM 10, experiencing problems in creating a pdf of a book. I use Adobe PDF as my print driver. The error said that a font,
    HelveticaNeueCond, was not available, and could not be embedded. I had never heard of this font as being in my book, but I downloaded it and installed it on my C drive in my WINDOWS/Fonts folder. Still got the same error!
    Also a pdf was made up to a certain page and then it failed. When I tried pdf ing that failed page, it worked. Then I tried to pdf the pages in between and it failed in a different spot.
    This failure makes no sense.
    I need help!

    There are hundreds of message similar to this one in the archives, so I'd suggest you start reading those, but in general:
    No one can do effective long-distance trouble shooting of your system without all the system details: FM and Acrobat versions, down to the patch levels (do Help > About), your OS, and amount of RAM and free disk space are important also.
    If you are running Windows XP, get the Microsoft Hot fix for all PostScript printers and install if before you do anything else.
    http://support.microsoft.com/?id=952909 (Gives details on the Hotfix)
    http://support.microsoft.com/Hotfix/KBHotfix.aspx?kbnum=952909&kbln=en-us (Direct Download Link)
    Reboot after installing it.
    Then, or start with these if you're not on XP:
    Set the Adobe Acroat printer as your system default printer.
    Be sure you are printing to the Acrobat printer with the Print Command and not using SaveAs PDF
    On the Frame Print dialog box, check Generate Acrobat Data and UNCHECK Print to File.

  • Generating pdf using ADS on another Server failed

    Hi there,
    I am trying to generate a pdf-document using Adobe Document Services installed on another server.
    It's a Visual Composer app, which opens a Web Dynpro component to generate the pdf. Everything works fine when I run the app on a server, which has Adobe Document Services installed.
    But when I try to run the app on a server without ADS installed and want to use ADS on another server (both NW 7.3 SPS4) it fails with and FileNotFoundException.
    The log of the ADS-Server says, that it cannot found the file located in <PATH TO THE XDP-FILE ON THE APP-SERVER>. It's sure, that the server cannot find the file, because it's not deployed there!
    It seems that the Application calls the Adobe-System which trys to find the template on its own file-system.
    Does anybody know the mistake here?
    Any help would be greatly appreciated
    Edited by: Bernd Speckmann on Oct 17, 2011 10:31 AM

    The problem was, that I was passing xdp template source as url .
    Instead I should send it as a stream using the appropriate pdfdocument api.

Maybe you are looking for

  • WHAT IS YOUR IDEAL CELL PHONE AND TABLET/ULT​RABOOK/LAP​TOP COMBO?

    I'd like to see what everyone here thinks is the best CELL PHONE and TABLET/ULTRABOOK/LAPTOP combination to own this year now that the CES show is coming to a close.  So post up what you think is the ideal combination from what has been announced.  M

  • EXIT in initial Screen VA01

    Hi, I need an exit in the initial screen of tx. VA01. When you enter the Order Type and the Organizational Data I need to validate some order Types. Regards. Thanks.

  • Multiple tracks in one matrix window

    can anyone tell me how to get midi data from multiple tracks to show up in a single matrix window for editing?

  • TNS-04012: Unable to start Oracle Connection Manager instance.

    Hi, I've tried to configure Connection Manager but i fails on: TNS-04012: Unable to start Oracle Connection Manager instance This is my configuration (I've removed as much as possible to remove possible errors): CMAN1=(CONFIGURATION=   (ADDRESS=(PROT

  • No support for JBoss 4 in NetBeans 6?

    Hi everybody, I switched from Eclipse to NetBeans and i have to use JBoss 3.2.4. I can setup different application server and JBoss as well, but only from version 4. Tools > Servers > Add Server > "Select Home-Directory from Jboss 3.2.4" throws this