PDF orginal Dimension Information

Hi,
I have written below code to read the PDF file and convert the PAGE to image.I am able to create it sucessfully but the image is getting created for dimension of 480*343 pixels (72 DPI).
But the orginal documents dimension is 1667X1192 pixels (250 DPI).How to get this values.And create the Image.
Please let me know.
import javax.swing.JFrame;
//This com.adobe.acrobat.PDFDocument is the third party api,Where i download from adobe
import com.adobe.acrobat.PDFDocument;
public class demo2 {
    public static void main(java.lang.String[] args) {
        JFrame frm = new JFrame();
        PDFDocument doc = null;
        try {
            doc = new PDFDocument(new java.io.File("d:/3.pdf"));
            int nFile = 0;
            int nScale = 1;
            int x = (int) doc.getPageSize(nFile).x * nScale;
            System.out.println("The Page Size Of X is--->" + x);
            int y = (int) doc.getPageSize(nFile).y * nScale;
            System.out.println("The page Size Of Y is--->" + y);
            int nColorModel = java.awt.image.BufferedImage.TYPE_3BYTE_BGR;
            java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(
                    x, y, nColorModel);
            image.getGraphics().fillRect(0, 0, x, y);
            com.adobe.acrobat.sidecar.AffineTransform af = new com.adobe.acrobat.sidecar.AffineTransform(
                    nScale, 0, 0, nScale, 0, 0);
        //    doc.drawPage(nFile, image, af, new java.awt.Rectangle(400, 400),
        //            frm);
            javax.imageio.ImageIO.write(image, "png", new java.io.File(
                    "d:/Test.jpg"));
        } catch (Exception e) {
            e.printStackTrace();

Looks like taht you use a unsupported api:
http://support.adobe.com/devsup/devsup.nsf/docs/51543.htm

Similar Messages

  • A PDF document with information about activation for CS6 software

    Here's a PDF document with information about activation for CS6 software.
    I found it very useful for understanding how the system worked for activation of perpetual licenses, both in cases where the computer is and isn't connected to the Internet.

    Ann, with some browsers, the PDF document will download in the background rather than appear in a browser window.

  • I can't read a file with the ext PDF the sender informed me that the file was reset to PDF.

    I can't read a file with the .ext PDF the sender informed me that the file was reset to PDF. But when I tried to open it the caption box informed me"the file is not in PDF format. I suspect the sender simply changed the file .ext which is why I can't open it! What can I do about it! I am working on an iPad.
    Thanks
    Mr Jim Lapthorn

    If the document is not, in fact, a PDF, then you will need to get your sender to provide a PDF.
    Can you open this document in any other application?

  • PDF + PowerPoint dimensions issue

    Hi All-
    I have come across a weird bug today, when a PPT is saved as a PDF, the dimension attribute for the slide is a portrate mode (540x720), the actual slide is 720x540, and although it will preview properly, when this PDF is uploaded to an iOS device, the device displays the image rotated 90 degrees.
    The issue can be solved by opening the PDF and rotating it 360 degreees (this appears to reset the dimensions), but that is a pain. Is there some setting when th PDF is created to set it to Landscape view?
    Below you can see the dimensions of my PPT before and after rotating the same slide....
    Thanks for taking the time to look, and for your help.

    Michael,
    MII doesn't throw any error and no output is generated. Understand a simple SQL Query result set when passed directly works fine and the table is generated. But in my case iam calling another transaction which in turns call a JCO interface to ECC.The result xml set is absolutely fine and when passing the same to the PDF table action there is no output generated.
    For the error "Index: n, Size: n" can u plz try to add a text or a horizontal line to the pdf prior to passing the result set.
    However I have noticed that the output doesn't get generated when there exists a single row. I have included a dummy row to the XML highlighted in my previous post and it works fine. Try and add the below xml with 2 rows as a transaction property xml and pass it to the table action block and it works fine.
    <?xml version="1.0" encoding="UTF-8"?><Rowsets><Rowset><Columns><Column Description="Operator_Comments" MaxRange="1" MinRange="0" Name="Operator_Comments" SQLDataType="1" SourceColumn="Operator_Comments"/><Column Description="Supervisor_Comments" MaxRange="1" MinRange="0" Name="Supervisor_Comments" SQLDataType="1" SourceColumn="Supervisor_Comments"/><Column Description="Planner_Comments" MaxRange="1" MinRange="0" Name="Planner_Comments" SQLDataType="1" SourceColumn="Planner_Comments"/></Columns><Row><Operator_Comments/><Supervisor_Comments/><Planner_Comments/></Row><Row><Operator_Comments/><Supervisor_Comments/><Planner_Comments/></Row></Rowset></Rowsets>
    kind of strange but not sure whts the reason..
    thanks,
    Gilmour

  • Cannot download Material Dimension Information

    Hi All
    We are using the BPC 7.5 MS and the installtion is a Domain Installtion for a Domain. No the client has created a Trust for multiple dDomian and we can able to get the users from the different Domains through the [rocess of creating the Users.
    Now when the uses from the different domain want to access the BPC Excel it is given the message " CANNOT DOWNLOAD MATERIAL DIMENSION INFORMATION" .
    But at the same time when a user belong to the domain where the BPC is isntalled is accessing the BPC Excel he can able to access  the same easily without the Mesage .
    Now i am going to the Material Dimension >Export Dimension memeber>Process the Dimension from the Mmeber Sheet
    Do you have any idea.
    Thanks
    Viv

    Thanks for the reply, Karthik AI.
    But this did not solve the problem. First, after creating the Application Set, everything works fine on all client machines, but only perform the action described above, the application stops working ...
    When authorizing such an error occurs and the members are not available

  • Printing PDF form with information as PDF document

    I've recently filled out a PDF form application with various information. I went to save this as a PDF file in Adobe Reader for my records but this is not supported. I was only able to print out a hard copy. Is there any other program or routine that supports printing a filled-out PDF form to a PDF file?
    In a Windows environment there were a number of 3rd party programs that could do this. For some reason this option is blocked under OS X native PDF print routine. Thank you for any insights.

    Click "print", and in the confirmation dialogue, select "Print as PDF". This will save what would have been printed as hard-copy as a PDF file.

  • PDF DOM - getting information about underlining

    Hi, I‘m trying to prepare PDF documents for blind users. For this I have to extract the visual information of the text and there font style.
    And this is my problem:
    I read the PDF document through the Acrobat or Adobe-Reader application via UI-Automation, Microsoft Active Accessibility and the Adobe intern Accessibility library to access the PDDom.
    In all these different way there is no way (that I found) to getting information about if a word is underlined or not.
    Did anybody know a way to do this, or is it impossible to get information about that?
    Thank u for your interest in my post and for all the helping ideas that will be posted.
    J

    select prv_value from ctx_user_preference_values where prv_attribute='PATH'
    and prv_preference='MY_PREFERENCE_NAME'
    But note that you'll need to rebuild the index before this will take effect.

  • How to change PDF document dimensions - Acrobat Pro 9

    Hi,
    I'm trying to figure out how to change the dimensions of my PDF in Acrobat Pro.
    The original artwork was created in Illustrator and the final document is primarily for screen use (not print) so was created using pixels (600x665px to be precise). However when the artwork is created into a PDF, when viewed (and printed) in Acrobat, it is rather large and I want to make this smaller.
    If anyone can advise on this it'd be much appreciated!
    thanks
    HS

    You might play with the Touchup Object tool off the Advanced Editing toolbar.
    Use the tool to select the image. Any of the four corners can be "grabbed" and a mouse drag will let you change the space occupied, on the PDF page, by the image. Not a "fine control" but, sometimes, all that's needed.
    Or, in Preferences > Touchup category - the associated configuration pane permits selection of an installed image editor.
    Now, using the Touchup Object tool's context menu, you can use the "Edit Image..." selection.
    Edit the image and return it to the PDF.
    Be well...

  • Excel 2007 Converted to PDF cuts off information

    I am using Acrobat 8.1 and I am having trouble converting the information from Excel 2007. Some of the text in the cells are cut off on the ends. Is there some kind of tweak to stop this? Thanks

    Select the Adobe PDF printer in the print menu. Then go through the Excel file. Excel (like WORD) reflows the document to best fit the printer. In this case you are apparently outside the printing range of the Adobe PDF printer. You may have to reduce the font size.

  • 9iasR2, rwservlet, jsp report, output pdf HttpSession losing information

    Hi,
    I think this is actually something I'm doing wrong with JDeveloper/my understanding of HttpSession, so I'm posting here after getting no help from the Reports folks.
    I have a number of .jsp reports and our application also generates letters for the users with Reports server. We use http://server/reports/rwservlet?report=blah&keymap=blah to run the reports. The keymap specifies the userid and the other relevant information (destype=CACHE, desformat=PDF, etc)
    The problem is that we are storing information in the HttpSession and many times, but not 100% of the time, once we open the rwservlet results (PDF) into a frame and try to go "back" to our application, the data in HttpSession is gone. It's not 100% of the time, but when using the http://mysrv:7777 for all the URLS to go to apache directly, it happens nearly 100% of the time. When getting the webcache involved it happens much much less.
    I'm wondering if it's because I'm "leaving" my context-root (i.e. going from http://myserv/myapp to http://myserv/reports/rwservlet or something else
    If anyone has experienced this or has a better definition, I'd be happy to hear it.
    Also, if there were a way to include the rwservlet "inside" my application so that I'm not "jumping out" of my application, that would be good to try.
    Thanks for any ideas!
    Regards,
    Jeff

    Hi,
    I am using rwservlet from my JSP without problem. I am using 2 jsp pages. First copy output from rwservlet to the local file (report server is on other machine and I need archive of reports) and in second jsp I send this pdf file to the user directly from JSP.
    first.jsp include:
    <BODY onLoad="window.open("second.jsp?report="+<%=finame%>,...);">
    String sestavaURL="http://host:port/rwservlet?..";
    URL sestava=new URL(sestavaURL);
    HttpURLConnection uc=(HttpURLConnection)sestava.openConnection();
    uc.connect();
    InputStream is=uc.getInputStream();
    //is = Input stream with "cached" PDF report
    FileOutputStream os=new FileOutputStream(finame);
    //os= filename in report archive on localhost
    byte[] buff=new byte[1000];
    int readChars;
    while((readChars=is.read(buff))!=-1)
    os.write(buff,0,readChars);
    and the second.jsp includes:
    <%@page import="java.util.*,java.net.*,java.io.*,oracle.jbo.*,oracle.jbo.html.*,oracle.jbo.server.DBTransaction,java.sql.*"%><%@taglib uri="/webapp/DataTags.tld" prefix="jbo"%><%
    %>
    <%@ page contentType="text/html;charset=ISO-8859-2" errorPage="errorpage.jsp" %><%
    String fileName=finame;
    FileInputStream is;
    try
    is=new FileInputStream(fileName);
    catch(Exception e)
    response.setContentType("text/html");
    out.write("<HTML><BODY><H1>Report was not found</H1></BODY></HTML>");
    return;
    byte[] buff=new byte[1024];
    int readChars;
    response.resetBuffer();
    response.setContentType("application/pdf");
    response.setHeader("Content-disposition","inline;filename=generated.pdf");
    while((readChars=is.read(buff))!=-1)
    out.write(new String(buff),0,readChars); %>
    I hope this help you.
    Best regards
    Lubomir Sterba

  • Printer is asking for PDF but when I save psd to PDF the dimensions change

    I am trying to save psd files to pdf for a printer. He wants them 3.75 x 2.25 inches. I am creating the psd files in CMYK color as he needs. The dimensions are 3.75 X 2.25 inches but when I save the Photoshop PDF it is much smaller 270 X 262. I don't want to send it to him incorrectly. Any advice for me?
    Thanks in advance.

    You still didn’t say what the units for those numbers were.
    Anyway: pdf is currently the standard for print, and even having to open psd would be time the printers want to save, I guess, or want to get paid for.
    Moreover many (or most) print-shops have automatic preflighting-, reseparation- and montage-systems that are based on that format.
    If You got a window like this:
    you did not open the pdf, but imported it, meaning a complete re-interpretation took place – so even if the pdf may have been at 72ppi it would be up-scaled to the selected values.

  • Can one create a script to determine the filepath of a PDF based on information entered into a form?

    I work for the IT department for a medical center and we are creating signable PDF forms so that our center can move toward a paperless system.  The center uses a program to organize all of the PDF forms once they are signed, but we are wanting to make everything structured to work seamlessly with this program.  What we need to do this is that when a form is signed by a patient, a script within the PDF saves the file to a specific folder and then creates the file name based on the patient's idnumber, date of birth, and the name of the procedure the form was for (which is in the form as a drop down list).  I haven't been able to find anything on how to do anything like this, so any help will be greatly appreciated.

    It has been a while since I have posted here because I have been looking into doing this using a plugin, since Actions can't be run automatically by signing or any other form trigger.  I have recently come accross folder level javascripts, though and am wondering if you guys think that would work, and if so, how could I do it?  I'm reading through a post here: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript and it seems to be really close to what I need, it just isn't quite there.  My code now looks like the following, (many thanks to you guys, by the way):
    //Create the file name from text fields in the form
         //Credit to Gilad D for the first part of this script.
         var myFileName = this.getField("PATIENT_ID").valueAsString + "#" + this.getField("PATIENT_DOB_3").valueAsString + "#C#" + this.getField("PROCEDURE_NAME").valueAsString;
         //Save the file
         this.saveAs("/C/Users/ahill.CNC/Desktop/PDF test save/" + myFileName + ".pdf");
    From what I am understanding, with a folder level script, I can make a script and save it to a specific folder that Acrobat can access and I should be able to call that script from within the form.  I mainly need to know how to call the script and if there are any changes to the above script that need to be made to make it work as a folder level script, I need to know how to do that.  I'm going to continue reading up on this, but If you happen to know how to do it and are able to help me, it would be greatly appreciated.  Again, thank you guys for all the help.

  • Distributing Password Protected PDF's via Information Broadcasting

    Is it possible to password protect a distributed report (pdf format) using individual Member's unique password?
    Then, can we easily administer the (e.g. user-create/e-mail confirmation) the actual passwords?

    What about the Java Cryptography Extension framework for PDFs? 
    Can NetWeaver support this....
    http://xmlgraphics.apache.org/fop/trunk/pdfencryption.html
    Environment
    In order to use PDF encryption, FOP has to be compiled with cryptography support. Currently, only JCE is supported. JCE is part of JDK 1.4. For earlier JDKs, it can be installed separately. The build process automatically detects JCE presence and installs PDF encryption support if possible, otherwise a stub is compiled in.

  • How to get dimensions information to appear next to the mouse cursor when drawing/ making selections

    Hello,
    On a previous computer I used Illustrator for, when I would draw or make selections, next to the cursor in a small black box with white text, there would be the dimenstions information. It was similar to what you'd find in the Window>Info panel but simplified and would let you know how big the selection you're making is. I've looked all over the Preferences and can't find it. I can't tell if I was imagining it somehow or what, but I'm hoping someone knows what I'm talking about and knows where to find it. Thanks.

    Use smart guides: Cmd/Ctrl + U

  • How to export entire pdf orginally created in Access to Word?

    I can "print" my Access report to Adobe and the resulting pdf looks great. But when I try to export that to a Word document, it only transfers the labels and fields with a single database column as content. It does not transfer fields with mixed text strings and database fields.
    Is there any way around this?

    Thanks.
    Do you also know how i can split all the forms in a document?
    I have created a lots of fields by copy paste, and it seem like when i try to write something it one form the same text appears in all the other fields as well. I fant them to be separate. Know how?

Maybe you are looking for

  • Open PO /GR list

    Wanted a list of Open PO's (having open goods receipt). Transaction ME2N provides the list but total & grand total is not there. Tries using ME80FN also but it only had deleivery incomplete indiacator so doesn't cover PO with open Goods receipt (WE10

  • 32inch HDTV LCD

    Hello all - Im fairly new to the whole HDTV area, while ive had experience with one before but a blotch of dead pixel filled the screen and got annoying watching videos or using it as a pc monitor...ive found two monitors im interested in purchasing

  • N70 - CALLER CAN'T HEAR ME!

    Anyone experienced a problem with their N70 where you accept a call and begin to talk however after a few seconds I can no longer hear the caller. If I switch to loudspeaker mode it sometimes works ok again but not when in handset mode. Have been to

  • ADDING CUSTOM FIELDS TO IW38 IN OPERATIONS LIST

    Hi Gurus,,,          I have a requirement where i want to add some custom fields in IW38 Report in the OPERATIONS LIST(NOT BASIC OR FIRST LIST.) I tried Copying the program of IW38 and develop Z program in which i appended some fields in RIHAUFK_LIST

  • OLTP reporting does not end

    Hi ; I try to use CRM interactive reporting so I created an different BI client on CRM.On its logic , CRM client extracts data from BI client via virtual data provider (OLTP not OLAP). I found the function used on CRM from RSO2 so now I can debug it