Pdf/convert html to pdf butoon option

Hello I have 2 pages menu page and act_citywide
Menu page has a menu to select pdf or other 2 option. and a
button.
Act_citywide has the query and action.
I wish to create a button that will have a convert to pdf as
opposed to these option of radio buttons and button.
What do I add to this program and where?
thanks or maybe just add another button that will convert to
pdf
Thanks
Menu Page
<cfquery name="getCityWideCases" datasource="cts9i">
SELECT
--PROP.STR_NBR
--,PROP.STR_FRAC_NBR
--,PROP.STR_FRAC_NBR_RNG_END
--,PROP.STR_DIR_CD
PROP.STR_NM
--,PROP.STR_SFX_CD
--,PROP.STR_SFX_DIR_CD
--,PROP.STR_UNIT_TYP_CD
--,PROP.UNIT_NBR
--,PROP.PROP_ID
--,PROP.ZIP_CD
,CASE.CASE_NBR
--,CASE.CASE_ID
--,CASE.CASE_TYP_CD
,CASE.CRTN_DT
--,APLC.PROJ_DESC_TXT
--,TYP.CASE_TYP_DESC
FROM
CTS.TLA_PROP PROP
,CTS.TLOC L
,CTS.TCASE CASE
--,CTS.TAPLC APLC
--,CTS.TREF_CASE_TYP TYP
WHERE
PLAN_AREA_NBR = '1'
AND L.LOC_ID = PROP.PROP_ID
AND CASE.APLC_ID = L.APLC_ID
AND PROP.STR_NM != 'TEST'
--AND CASE.PARNT_CASE_ID IS NULL
ORDER BY
<cfswitch expression="#Form.orderBy#">
<cfcase value="CASENUMBER">
CASE.CASE_NBR
</cfcase>
<cfcase value="CREATIONDATE">
CASE.CRTN_DT
</cfcase>
</cfswitch>
</cfquery>
<!---html report--->
<cfswitch expression="#Form.outputFormat#">
<cfcase value="HTML,PDF">
<cfsavecontent variable="htmlData">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Citywide Cases Report</title>
</head>
<style type="text/css">
td{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
th{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
background-color:#FFFF99;
h2{
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
h3{
font-family:Arial, Helvetica, sans-serif;
font-size:15px;
</style>
<body>
<cfoutput>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center">
<h3>Citywide Cases
Report</h3><br><br></td>
</tr>
<tr>
<td align="center">
</h2>Your query returned
#getCityWideCases.RecordCount# records</h2></td>
</tr>
<tr>
<td>
<table border="2" cellpadding="2" cellspacing="0">
<tr>
<th>Record Number</th>
<th width="120">Case Number</th>
<TH>Creation Date</TH>
</tr>
<cfloop query="getCityWideCases">
<tr bgcolor="<cfif currentrow mod
2>GHOSTWHITE<cfelse>WHITE</cfif>">
<td>#CurrentRow#</td>
<Td>#CASE_NBR#</td>
<td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
</tr>
</cfloop>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>
</cfoutput>
</cfsavecontent>
<cfswitch expression="#Form.outputFormat#">
<cfcase value="HTML">
<cfoutput>
#htmldata#
</cfoutput>
</cfcase>
<cfcase value="PDF">
PDF
<cfdocument format="pdf">
<cfoutput>
#htmldata#
</cfoutput>
</cfdocument>
</cfcase>
</cfswitch>
</cfcase>
<cfcase value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment;
filename=citywide.csv">
<cfcontent type="application/msexcel">"Case
Number","Creation Date"
<cfoutput
query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
</cfoutput>
<cfabort>
</cfcase>
</cfswitch>
<cfquery name="getCityWideCases" datasource="cts9i">
SELECT
--PROP.STR_NBR
--,PROP.STR_FRAC_NBR
--,PROP.STR_FRAC_NBR_RNG_END
--,PROP.STR_DIR_CD
PROP.STR_NM
--,PROP.STR_SFX_CD
--,PROP.STR_SFX_DIR_CD
--,PROP.STR_UNIT_TYP_CD
--,PROP.UNIT_NBR
--,PROP.PROP_ID
--,PROP.ZIP_CD
,CASE.CASE_NBR
--,CASE.CASE_ID
--,CASE.CASE_TYP_CD
,CASE.CRTN_DT
--,APLC.PROJ_DESC_TXT
--,TYP.CASE_TYP_DESC
FROM
CTS.TLA_PROP PROP
,CTS.TLOC L
,CTS.TCASE CASE
--,CTS.TAPLC APLC
--,CTS.TREF_CASE_TYP TYP
WHERE
PLAN_AREA_NBR = '1'
AND L.LOC_ID = PROP.PROP_ID
AND CASE.APLC_ID = L.APLC_ID
AND PROP.STR_NM != 'TEST'
--AND CASE.PARNT_CASE_ID IS NULL
ORDER BY
<cfswitch expression="#Form.orderBy#">
<cfcase value="CASENUMBER">
CASE.CASE_NBR
</cfcase>
<cfcase value="CREATIONDATE">
CASE.CRTN_DT
</cfcase>
</cfswitch>
</cfquery>
<!---html report--->
<cfswitch expression="#Form.outputFormat#">
<cfcase value="HTML,PDF">
<cfsavecontent variable="htmlData">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Citywide Cases Report</title>
</head>
<style type="text/css">
td{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
th{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
background-color:#FFFF99;
h2{
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
h3{
font-family:Arial, Helvetica, sans-serif;
font-size:15px;
</style>
<body>
<cfoutput>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center">
<h3>Citywide Cases
Report</h3><br><br></td>
</tr>
<tr>
<td align="center">
</h2>Your query returned
#getCityWideCases.RecordCount# records</h2></td>
</tr>
<tr>
<td>
<table border="2" cellpadding="2" cellspacing="0">
<tr>
<th>Record Number</th>
<th width="120">Case Number</th>
<TH>Creation Date</TH>
</tr>
<cfloop query="getCityWideCases">
<tr bgcolor="<cfif currentrow mod
2>GHOSTWHITE<cfelse>WHITE</cfif>">
<td>#CurrentRow#</td>
<Td>#CASE_NBR#</td>
<td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
</tr>
</cfloop>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>
</cfoutput>
</cfsavecontent>
<cfswitch expression="#Form.outputFormat#">
<cfcase value="HTML">
<cfoutput>
#htmldata#
</cfoutput>
</cfcase>
<cfcase value="PDF">
PDF
<cfdocument format="pdf">
<cfoutput>
#htmldata#
</cfoutput>
</cfdocument>
</cfcase>
</cfswitch>
</cfcase>
<cfcase value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment;
filename=citywide.csv">
<cfcontent type="application/msexcel">"Case
Number","Creation Date"
<cfoutput
query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
</cfoutput>
<cfabort>
</cfcase>
</cfswitch>

I'm not sure it'll help you, but take a look at
http://xml.apache.org/fop/index.html
maybe you can go this way
XHTML->XML->FOP->PDF
???

Similar Messages

  • How to convert html to pdf using acrobat sdk 8.0?

    hi
    I am a beginner of acrobat sdk .
    I want to know How to use acrobat sdk 8.0 to convert html to pdf?
    herere some questions :
    1:How to support navigation inside PDF file that generated using acrobat sdk 8.0? For example: theres catalog in the top of HTML file, customer hopes can navigate inside the PDF file just like navigating inside the HTML file.
    2:How to support operating some controls in the PDF file that generated using acrobat sdk 8.0? For example: therere some drop down list and text box in HTML file, customer hopes can input text in the text box, click the drop down list to see available options in it just like in HTML file.
    Thanks in advance for any help and suggestion.

    Hello,
    I want a system to re-brand my 37 pages PDF for affiliates.
    I want a php dynamic link in the PDF online in order to personalize automatically the PDF for each affiliate. I need to change 2 links each time. The affiliate ID and the Paypal email (payment button) in page 36.
    Can you help?
    Please let me know
    Thank you
    Alex
    PS My system is online and i can give you the url if it helps.

  • Is anybody programmatically converting HTML to PDF? If so, how?

    Is anybody programmatically converting HTML to PDF? If so, how?
    With InDesign, or something else?
    As long as the application (InDesign or something else) has a command-line interface, i'd like to know about it.
    Am using .NET, but we still want to know what you're doing even if you aren't.
    Source data is HTML pages from random sources, so it's not necessarily XHTML unfortunately, though i could tidy it into a consistent form.

    thanks, but what i'm looking for here is programmatic usage -- that is, scripted or command-line -- not having a human user choosing menu options, etc
    so as to your two suggestions ...
    this would appear to be NOT programmatic ...
    > And Acrobat will install a PDF convert toolbar for Internet Explorer to do this right from the browser.
    and this might or might not be possible to program -- i don't know if people are somehow running Acrobat programmatically, would appreciate further information
    > Acrobat has a Create PDF from Web Page function

  • Need help - CONVERTING HTML to PDF

    A friend of mine has tasked me to research on a Java API that converts HTML files to PDF... Does anyone know about this?
    I've been browsing the net for an hour now and i still haven't got a plausible solution to his problem... Can you guys help me with this?!? Any help would be greatly appreciated... Thanks... :)

    Done, I'd be glad to send
    you the spanish MX properties
    version, where can I send it
    to you?great, please use email address [email protected], thanks
    Strangely, many options that
    work fine as standalone, appear
    to be disabled now, options
    like... in menu Edition: Undo,
    Redo; in menu Format: Table, Link;
    all the Table menu options.Undo and redo are active if there is something to undo or redo only. As well many table actions are only active when the caret is inside a table. See also the source code: class FrmMain contains almost all actions as inner classes (a design I changed in later applications). Each action class has a method 'update' which takes care of enabling or displaing an action depending on certain conditions.
    HTH
    Ulrich

  • 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................

  • Convert HTML TO PDF

    Hello Experts,
    I need to convert the document type HTM to PDF then send it thru e-mail as attachment, is there any FM for this?
    I'm looking at this FM CONVERT_ABAPSPOOLJOB_2_PDF, but i think it requires a spool id and the program is required to run in foreground. Any idea?
    Thank you!

    Hi Jerome,
    Click on below two links:
    [How to convert HTML output to pdf output to save the file locally;
    [Convert HTML File to PDF;
    BR
    Dep

  • Convert html into tidy html to convert pdf using iText

    hello.
    I am try to convert html document into pdf.
    first i tried iText it works properly. but it needs all the tags to be witten correctly.
    when u try html not well formeted it gives an exception.
    So is there any way to convert html to pdf.
    or if not if not then way to convert html into properly taged HTML
    so it s easy to convert it to html,
    If you have any working example of Tidy.jar please send me.
    Thanks..

    Hi,
    I had a similar tasko to do i.e converting HTML to PDF.
    Please follow the link to this site and download the trial code.
    http://www.pd4ml.com
    I was able to convert my HTML to PDF.
    Have a look at it and let me know.
    Regards,
    Joe

  • Mac OS batch convert .xls to .pdf not option

    Mac OS batch convert .xls to .pdf not option....WHY NOT???? This was never issue on Windows, and the software notes it supports pdf convert from .xls format (BUT NOT IN MAC VERSION) Any work arounds? Will this becoming in update? Really not acceptable for such expensive software.

    Hi Yvan,
    Thank you, that script will be most useful.
    Sincerely,
    RicD

  • Trouble in fop(convert html 2 pdf) source.

    to convert html 2 pdf file I found the article from javaworld.
    (http://www.javaworld.com/javaworld/jw-04-2006/jw-0410-html.html)
    unfortunately I can't seem to find the two classes below even though import all fop 0.94 library files.
    are there something I'm missing?
    Thanks.
    import org.apache.fop.apps.Driver;
    import org.apache.fop.tools.DocumentInputSource;

    Much thanks for your timely reply.  The scanner software requires that one must scan to an application.  The configuration has to point to an executable.  In program files I must select an executable,  in this case acrobat.exe.   Have been using this for years and never have seen a problem.  Continues guidance sought.

  • Converting html data to pdf

    Hi,
    I have some html table and data (reports) which are generated by JSP. I want to provide a button for exporting the report content to pdf. I found many tutorials in converting html data to excel. But I want it to be exported to PDF. How can i do it?
    thanx

    You can use libraries like:
    iText, Actuate eSperadsheet Reporting engine to do the Job for you.

  • Convert HTML to PDF or AFP

    As part of the project we have to convert html documents to PDF or AFP. We tried with different tools like HTMLDOC and we are not able to get the perfect matching tool. Any help on finding the best tool for conversion of HTML to PDF or AFP will be appreciated.
    My basic requirement is
    1) The conversion process needs to be automated
    2) the tool has to run on Linux.
    3) Everything in the page (text, image etc) should be extracted in a single file
    Background
    A batch job which runs on Q&R cache servers to run every evening. The job has a list of 1500 symbols which iterates through and does an http get of the Stock Summary page for each ticker in the list. The next step is to launch HTMLDOC or another tool to convert to PDF, APF, or other format.
    Regards,
    Jags.

    I'm not sure it'll help you, but take a look at
    http://xml.apache.org/fop/index.html
    maybe you can go this way
    XHTML->XML->FOP->PDF
    ???

  • Help converting html/xhtml to pdf with bfo pdf lib or other tools?

    Hi,
    I need to convert from xhtml to pdf. I tried parsing it with xerces and crimson but wouldnt work. So the samples coming with big faceless pdf library dosent work. Is there any other method to convert html/xhtml to pdf - any libraries for direct conversion. BFO pdf report generator takes xml as i/p to convert to pdf.
    Thanks for any help

    Look here:
    http://www.adobe.com/sea/products/server/pdfgenerator/

  • I do not have the Print To PDF Setup option

    the instructions to intall the Adobe CreatePDF printer are below. I do not have the "Print to PDF Setup option on my Adobe site. Can someone help me with this?
    Install Adobe CreatePDF Desktop Printer 
        In Adobe PDF Pack, click Print To PDF Setup.
      Click Download Installer.
      Double-click the AdobeCreatePDFDesktopPrinterSetup.exe file you downloaded and follow the prompts to install Adobe CreatePDF Desktop Printer.
    Note: You need administrator rights to install the Adobe CreatePDF Desktop Printer.

    To install Adobe CreatePDF Desktop Printer:
    1. Log into https://createpdf.acrobat.com/signin.html with your Adobe ID and password
    2. Select “Convert to PDF” tool from right pane
    3. Click “Download CreatePDF Desktop Tool” link
    4. Click “Download Installer” button
    5. Click “AdobeCreatePDFDesktopPrinterSetup.exe” file
    6. During the installation , you need to enter your Adobe ID and password
    If your system is Win 7 SP1 please install a hot fix to update inetpp.dll file from http://helpx.adobe.com/acrobat-com/kb/createpdf-desktop-printer-windows-7.html
    If you have not installed Adobe Postscript(PS) printer driver please install it:
    How to Install PS printer:
    1. Open Start menu > Devices and Printer ( or from control panel) and select "Add a printer"
    2. Select "Add a local printer"
    3. Select "Use an existing port: LPT1: (Printer port)
    4. Select any company and any PS printer with Adobe PS printer driver(not clone) such as Xerox and Xerox Phaser 6120PS
    thank you.
    Hisami

  • "PDF Open Options" in Applescript

    So I am trying to batch convert a bunch of PDFs to JPEG files as part of a larger Applescript, and I'm finding that some of the parameters in "PDF Open Options" are ignored. Namely, the "height", "width" and "constrain proportions" parameters.
    This code is lifted directly from the Photoshop CS3 Scripting Guide (with filename changed, of course):
    tell application "Adobe Photoshop CS3"
    set myFilePath to alias "WABEL0457937:Users:Charles:Desktop:8925.pdf"
    with timeout of 10000 seconds
    open myFilePath as PDF with options {class:PDF open options, height:pixels 100, width:pixels 200, mode:RGB, resolution:72, use antialias:true, page:1, constrain proportions:false}
    end timeout
    end tell
    In the resulting file, the "resolution" is correct, but the height and width are calculated using the PDF's original height and width multiplied by the resolution, and the image is constrained to the original proportions.
    I thought it might be a collision with specifying the resolution and the height/width in pixels, so I tried omitting the resolution, but then it just defaults to 300.
    Anyone else create a script that opens PDFs and run into this?

    Thanks for that!
    (If those parameters are deprecated since CS2, it's probably bad form for Adobe to use them in their documentation for CS3. Just sayin'!)
    Anyway, it looks like the shell script you quoted gives the page height in points with an assumed resolution of 72 DPI. I can use that with my target dimension to calculate what to set the resolution to.
    In case it helps anyone else, here's the working code I came up with:
    -- ("str_replace" is a custom function to find and replace text in a string, it's not built-in to Applescript)
    set pageHeight to do shell script "/usr/bin/mdls -name kMDItemPageHeight " & quoted form of (POSIX path of this_item as string)
    set pageHeight to my str_replace("kMDItemPageHeight = ", "", pageHeight)
    set pageWidth to do shell script "/usr/bin/mdls -name kMDItemPageWidth " & quoted form of (POSIX path of this_item as string)
    set pageWidth to my str_replace("kMDItemPageWidth = ", "", pageWidth)
    if (pageHeight as number) is greater than (pageWidth as number) then
    set pdf_resolution to round (1000 / (pageHeight as number) * 72) rounding up
    else
    set pdf_resolution to round (1000 / (pageWidth as number) * 72) rounding up
    end if
    try
    with timeout of 5 seconds
    open alias ("WABEL0457937:Users:Charles:Desktop:Test:image_prep:" & image_id & ".pdf") as PDF with options {class:PDF open options, resolution:pdf_resolution, mode:RGB, use antialias:true, suppress warnings:false, use page number:true, page:1, crop page:media box}
    end timeout
    on error
    -- I have some sections here that check for and handle progress windows, password prompts, and such
    -- so the script can either continue or fail gracefully
    end try
    All of the images coming out of this script are just over 1000 pixels at their widest dimension. Since it's not critical that they be exactly 1000 (just very close), I was able to completely eliminate the resizing portion of the script to save even more processing time.
    Thanks for the pointers, everyone!

  • How to set PDF Job option using FDK11?

    Hi,
    I have a tool to convert Framebook into PDF and this works good. But the generated pdf is not of the same size as it is generated through FrameMaker Save as PDF. With the FrameMaker API, I get a dialog box to choose the different PDF Job options available. I came across a similar provision with FDK which also has a property to set the PDF Job options but it doesnt work as expected. Please correct me if my approach is wrong.
                    params = F_ApiGetSaveDefaultParams();
                    i = F_ApiGetPropIndex(&params, FS_FileType);
                    params.val[i].propVal.u.ival = FV_SaveFmtPdf;
                    i = F_ApiGetPropIndex(&params, FP_PDFJobOption);
                    params.val[i].propVal.u.ival = F_StrCopyString ((StringT)"Smallest File Size");
    Thanks,
    Venkat

    As far as I know, the only way to specify PDF options is by programmatically displaying the PDF Options dialog (via WinAPI calls), "selecting" the options and "pressing" the OK button. There have been numerous discussions on this topic on the Yahoo frame_dev group ..
         http://groups.yahoo.com/neo/groups/frame_dev/search/messages?query=pdf%20options
    And here's some code ..
         http://groups.yahoo.com/neo/groups/frame_dev/conversations/messages/1578
    You may be able to set the options as you're doing, but I don't think they are "set" until you display the dialog and "press" the OK button.
    ...scott

Maybe you are looking for

  • Computer won't recognize network printer - HP OJ Pro 8600

    My computer and printer are both connected to the same wireless network, but my computer won't recognize the printer (using the host name, IP address, or otherwise).  It's maddening, because it worked when I first set it up a year ago and just recent

  • Quantity not modifiable in scheduling agreement for specific valuation clas

    Hi Gurus, My client wants once the scheduling agreement is created then the quantity should not be changed later. This they want only for a specifically for imported materials. So is it possible to make the quantity greyed in the change screen for a

  • Hard drive won't mount.

    I am running Arch x86_64 with Cinnamon as my DE. First off, Nautilus does not recognize the hard drive in question unless I run gparted. Then, when i try to mount the partition I get the error fuse: mount failed: Device or resource busy The drive tha

  • Can I run a external application on a Portal Channel

    Can I execute a external application inside a channel or a tab in portal .. For example assume i have the calendar application .. Is it possible to have a calendar tab ( I have a calendar channel included into the jsptabcontainer) ..and on clicking t

  • Mavericks renames existing files when saving or backing up as "untitled"

    I use MYOB to run a small business. I tend to email invoices to clients and therefore will save the recorded invoice to disk. In this case and under lion, I would get the invoice number as the suggested name for the file, I would then backspace the h