How to create a new PDF consisting only of the cropped area?

Hi,
Is there a way to crop a PDF via javascript in such a way that the new MediaBox contains only the cropped material, where the lower left corner is also located at 0,0? setPageBoxes("Media",...) to match the CropBox doesn’t seem to do it.
What I need is a scripted method to get around a problem with Acrobat X’s pixel-based compare documents function.  If I crop to trim in both documents for example, it seems to be able to pick out the areas to compare alright, but the annotations that mark any differences are located incorrectly—as if the comparison is performed under one coordinate system and the annotation is handled via another.
There are ways around this outside of scripting. For example, pdfToolBox5 has a “Set MediaBox to origin” fixup that seems to do the trick, but I’m looking for a scripted method. So far, the only way that I’ve been able to get around the misplaced annotations problem is to export a postscript file after cropping, distill that, and then compare.
Thanks for any help on this.
Larry

What is the result of running this code from  the console window:
this.setPageBoxes("Media",this.pageNum,this.pageNum,this.getPageBox("Crop",this.pageNum));
this.getPageBox("Media",this.pageNum);
is the new Media Box the same as the Crop?  It should be.
Thom Parker
The source for PDF Scripting Info
pdfscripting.com
The Acrobat JavaScript Reference, Use it Early and Often
Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Similar Messages

  • How to create a new pdf-document in cfolder

    I'm trying to add, via an abap program,  a new Pdf-document as a document in the cfolder-environment. Has anyone information on currently available standard Abap-classes/functions that can be used to do this. If possible some code excerpts that clearly show how to do it.
    The data to be used to create this PDF is stored in an internal table created by the function module 'CONVERT_OTFSPOOLJOB_2_PDF'.
    Edited by: Van Gorp Jan on Oct 25, 2010 3:02 PM

    What is the result of running this code from  the console window:
    this.setPageBoxes("Media",this.pageNum,this.pageNum,this.getPageBox("Crop",this.pageNum));
    this.getPageBox("Media",this.pageNum);
    is the new Media Box the same as the Crop?  It should be.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • HOw do I create a new PDF file that incorporates the text changes I made in the previous PDF file?

    All of my edits appear properly in the saved file but as pop-ups etc. that cannot be seen when I print a copy.
    This seems like an obvious thing to want to do, but I cannot find out how to do it from any of the documentation (including video tutorials).

    Something to try:
    Create a Comment Summary report (a PDF file).
    There are several approaches that can be used.
    --| Work out of the Comment List (Comments > Comment View > Show Comments List or click the overlapped comment bubbles at the bottom of the Navigation panel)
    --| Comments > Show Comments List
    --| Comments > Summarize Comments
    --| Comments > Print with Comments Summary
    In the Summarize Options dialog, select the desired layout, paper size, how comments are to be sorted and font size.
    Select Include All comments. If you want to sort by review status, author, comment type, etc then go into the Comments List.
    The tool bar provides various means of configuration.
    When the Print dialog is present, under the "Properties" button (upper right), use the drop-down menu for 'Comments and Forms' to select "Document and Markups".
    The imprint on the paper will have the PDF page content and annotations (comments) provided in the PDF by use of the Text Edit tools.
    So, you can provide the text entered into a Text Edit's pop-up two ways.
    First - You have the PDF of the Comments Summary Report.
    Second - You have the hardcopy of this PDF.
    Of note is that, with Adobe's Tech Comm Suite, you can author in FrameMaker or MS Word, output a PDF for comments and review, then bring these comments back into the source authoring file.
    Be well...

  • How to create a new tab it will show the most recent/viewed page?

    When I accidentally downloaded Incredibar, when open a new tab it keeps showing "My start by incredibar", and also very slow when loading that page. I want to get back my most recent/viewed page. I did delete the Incredibar but the problem still goes on...

    See:
    *[[/questions/930367?page=2]]
    *[[/questions/931841]]
    *[[/questions/860323]]
    Try to reset some preferences to the default with the SearchReset extension:
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the about:addons page.

  • Crystal Reports XI - How  to create a new field using a formula field

    I'm quite new to CR, but have been learning quickly!
    I would like to know how to automatically create a new record/field based on another field in that row...
    I have a report showing the following data:
    Run Code     Start KM    Stop KM    Status 
    H2                 100            150           Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    The status is generated by comparing the 'Start KM' and 'Stop KM' against fields in another table called 'Start Odo' and 'Stop Odo'
    In this example...
    H2 has 'Start Odo' and 'Stop Odo' values of 90 to 160, therefore there is still 90-100 to check.  The 'Start KM' and 'Stop KM'  is equal to the 'start Odo' and 'stop Odo' for S3, therefore it shows completed.
    My question is how do you create a formula field, which will add an entire row...displaying the values 90-100.
    I've been trying to use a conditional check in the 'Start KM' column, that sees if status is equal to partial than if start km is greater than start odo (Which is the reference km) then display the value of start odo in the new row. I'm stuck at how to create a new row.
    I want the final result to look like this...
    Run Code     Start KM    Stop KM    Status 
    H2                  90              100         Partial
    H2                 100             150          Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    Any suggestions would be more than appreciated

    Hi Adi
    Looking at your examples it seems that you want to add a row to the existing recordset (rows fetched from the database).
    If it is the case (even if based on a formula) then you can not do it within crystal. Crystal is designed to display data and ideally it should not generate the new data.
    However, as per your requirement you can try to add this logic at database end. May be a command object within Crystal Reports can help you.
    Let me know if you do not understand anything.
    Regards
    Nikhil

  • How can i create a new user with only read rights ?

    How can i create a new user with only read rights ?

    You are asking about a Database User I hope.
    You can look into the Oracle 8i Documentation and find various privillages listed.
    In particular, you may find:
    Chapter 27 Privileges, Roles, and Security Policies
    an intresting chapter.
    You may want to do this with the various tools included with 8i - including the
    Oracle DBA Studio - expand the Security node and you can create USERS and ROLES.
    Or use SQL*Plus. To create a
    user / password named John / Smith, you would login to SQL*Plus as System/manager (or other) and type in:
    Create user John identified by Smith;
    Grant CONNECT to John;
    Grant SELECT ANY TABLE to John;
    commit;
    There is much more you can do
    depending on your needs.
    Please read the documentation.
    -John
    null

  • How can I create a new excel workbook only with labview

    Hi everyone...
    I'm trying to create a new excel workbook only with labview but I can't find the file in the hard disk.
    Someone knows?
    Labview 8,0
    Attachments:
    Create new WB with LV.vi ‏18 KB

    You are not using the correct mechanism. Pull up the Example Finder in LabVIEW, click on the "Search" tab, and enter "Excel". Look for an example called "Write Table to XL". Use this as a starting point for creating new workbooks and adding data to it.
    Note: on disk the example is at <LabVIEW install directory>\examples\comm\ExcelExamples.llb.
    Message Edited by smercurio_fc on 06-05-2007 11:08 AM

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • How to create a new System Data

    Hi guys.
    I need to create a new System Data with which to filter a list output using a field derivated from siebel marketing. This data isn't between the standard system data like CampaingCode, SegmentId .....
    Now i discover one .XML file (someting like Marketing....xml), in the OracleBIData/web/config directory, in which there are defined all the standard System data like:
    <WebExpression>
    </WebExpression>
    Can I try to modify this file and add a new system data? if the answere is YES, hao i can do this? My real problem is how take a system value, from siebel marketing, to assign at this new systme data.
    Thanks in advance
    Best reguards

    Hi
    thanks for your solution,
    i created a new Data carrier type AC for viewing auto cad files and given the path as, C:\Program Files\AutoCAD 2006\acad.exe"
    and at Define serveres and files or folders,
    defined the data carrier as Autocad type was default as AC,
    at Identify frontend computers i could not enter any thing it is only in display form and no values were there and niether could be entered.
    and my datacarrier created is not there to be selected while creating documents.
    through CV01N create documents.
    i suppose this is because i have already defaulted PC as the data carrier type. default system as my data carrier.
    please clarify my Below douts also
    as in my configuration i have defined only one Datacarrier ie Default PC, will this do all the need full, or will lead to to any complication in any aspect,
    i want to know what is the Advantages of defining many datacarriers or the Limitation of a single Datacarrier.
    iam facing a situation where a particular software say PDF reader or AutoCAD, is not installed in all the System. and iam thinking of installing this Software in a particular System or say in the Content Server system.
    can this software be made used to view these cad and Pdf files on the front end system where this software is not installed,
    Say in a particular PC the software AutoCAD is not installed and if he wants to View the AutoCAD file,
    another problem iam facing is
    while Creating a New AutoCAD file in my system through DMS Create, it gives a message "Drawing file is not Valid"
    while i can create a Word Doc File, but it is not possible to create a new AutoCAD file throuh DMS, (AutoCAD is Installed in my system)
    also i have no idea of how to create a New Data carrier type,
    what exactly have to be filled in
    1, define data carrier type
    2, define server and files or folder
    3, identify frontend computers
    please provide configuration details or if possible screen shot details
    points will be awarded for sure.
    Thanks and Regards
    Sathish

  • I have an airport extreme and express, if I use the extreme as a base station connected to my old router can I use the express to extend the signal while also creating a new network that only I can use?

    I have an airport extreme and express, if I use the extreme as a base station connected to my old router can I use the express to extend the signal while also creating a new network that only I can use? Essentially having two wifi connection off the same network? If so how do I set this up?

    Extending using a wireless connection always results in a performance compromise.
    If the Express is going to extend using a wireless connection, then the Express will need to be located about half way between the AirPort Extreme and the general area where you need more wireless coverage. The more that you have line-of-sight between the Extreme and Express, the better the network will operate.
    Remember......the Express can only "extend" the quality and signal speed that it receives, so it needs to be located where it can get a very good signal from the Extreme. Although Apple cleverly uses the term "extend", a more accurate term for the Express would be "repeater".
    If the Express will extend by connecting to the Extreme using a permanent, wired Ethernet cable connection......highly recommended for best performance.....then the Express can be located exactly where you need more wireless coverage. There is no signal loss at all through the Ethernet cable, so the Express gets a full speed signal no matter where it might be located.
    Post back to let us know which way to you want to go.

  • How to create a new repository in EP 6

    I was wondering how to create a new repository in EP 6 SP2 CM.  I am farmiliar with using repository managers, but I just want to create a new repository similar to the dfaul repositories that are provided by sap, such as "discussions or documents".  The reason is that I want to be able to report "only on the size of this repository"
    Thanks
    Jeremy

    Jeremy -
    You can create a CM repository using the following path:
    System Administration -> System Configuration -> Knowledge Management -> Configuration -> Content Management -> Repository Managers -> CM Repository
    Click on the New button.
    Enjoy!
    Kyle

  • How to create a new place in iPhoto 11 without doing any harm?

    Yes, I know how to create a new place for a photo -- theoretically:
    Select the photo.
    Make sure the Info icon in the lower right portion of the iPhoto window is clicked and the too-tiny-for-any-but-the-youngest-eyes map is displaying.
    Click in "Assign a Place..." and begin typing a place that iPhoto will search for.  It searches in both "your places" (i.e., those that you have already defined) as well as in Google Maps.
    When you see a place in the search results list that you think might be close to the one you mean, select it.
    A pin appears on the itsy-bitsy map.  Move it to the exact place you mean.  You can make controls appear on the map by moving the mouse over the bottom of the map.  The controls allow you to zoom in and out, and to change views (Terrain, Satellite, Hybrid).  When the pin is where you want it, click it. The current name of the location appears.  Modify it to the name you want, then click the check mark.
    That's "all" there is to it ... except for a couple of "gotchas."
    There's a difference between what happens when you select a place that you've defined and when you select a place that Google found in the search results.  If it's a place that you've defined, and you then move the pin to a new location and/or change its name, this will affect all photos assigned to the custom place.  In effect, you are modifying the place.
    All places have a radius associated with them, thereby making them circles.  You can adjust the radius only in the Maintain My Places window.  In the itsy-bitsy map it doesn't even appear.  However, if the newly defined place overlaps existing ones, all the photos assigned to the overlapped places will be assigned to the new one.  Their pins will remain where they were.
    Now, before anybody suggests sending feedback to Apple, let me emphasize that I have been sending Apple feedback on the wrong-headed implementation of Places since iPhoto 9.0.  New versions have come and gone (the current one is 9.1.2), but these "features" have remained.  So my purpose in opening this thread is to consolidate work arounds to these "features" in one place.  My work around: 
    Whenever I define a new place, I select only a single photo.  I try to name my places so that I can distinguish them from those that Google finds.  In order to avoid Gotcha 1 I select a place that Google finds and try to place the pin close enough to where I want it, but far enough from any other places that I've defined.  I give it a name that I can easily find it Manage My Place.
    I immediately open Manage My Places and select the new place.  I first note the pins near it, then decrease its radius, move the pin to the desired location, note the nearby places, and give it its final name.
    I then view Places and navigate to the new place to view the photos assigned to it.  If I'm lucky, there's only one.  Otherwise, I have to reassign the other photos to their correct places.
    Richard

    So... in the hope it will not confuse folks more, let me be more specific of a procedure that works for me...
    Procedure to create a new My Places location.
    OK there is more you can do with a non-GPS Coord linked photo.
    Click Info and then click Assign a Place in the lower right of screen. (if your photo has a location linked to it already the Assign a Place will NOT show up.)
    Choose a location name near the actual location that Google Maps can find.
    Click that location in the Google Maps list that appears and your photo will be temporarily assigned to that location.
    Now  type over that  location name in order to make sure to give that location a unique name that will show up in your My Places list and click that name after you have typed it  to be sure it is accepted.
    Now in iPhoto click Window/Manage My Places and go the that newly named location in the large My Places map. There's no easy search. You have to run down through the alphabetical list.
    Drag the flag to the location you want this place to be and click Done.
    The location name is now in your My Places list at the location you dragged the flag to!
    It is important to note that only your unique named locations show up in your Places list, so if you want to modify the location coordinates you have to establish a unique name for it.
    This is much more complicated that previous iPhoto versions!
    But Yeah!!!!!!!!!!
    It really works!!!!!!!

  • How to create a new partion in my HP (Compaq LE1902x )PC that has already 4 primary partitions ?

    How to create a new partion (to save my files & Folders) in my HP (Compaq LE1902x )PC that has already 4 primary partitions ? when something goes wrong along with OS(C) drive my all files are lost. so i want to create a new partition & dedicate it to my files & folders.

    I would consider another problem. What if the hard drive (not the OS) fails. You'd lose all your data, all partitions. It seems better logic would be to copy your files and folders to either an external hard drive or USB thumb drive.
    I would not use the internal backup program, but would manually copy the data. I also would not leave such device attached to the computer.
    In my system I have a separate USB thumb drive that stored critical medical and legal documents. That way, I can travel with it, as needed. I also clone my primary desktop every 30-45 days. That way, if I get a failure, it's only that far back on lesser files.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • How to create a new tab in CRMD_ORDER for custom fields

    Hi Expert,
    I have added custom fields in crmd_customer_ i through EEWB .
    Now i want to display the fields in a new tab in CRMD_ORDER.
    can you please guide me how to create a new Tab step by step procedure.
    Thanks & Regards,
    Avi

    Dear Avi,
    please be aware that crmd_order is no longer supported since crm2007 (6.00). That means EEWB is not the right tool to add customer fields because only WEBUI is supported. There you can use the AET tool to create own fields or tables via configuration.
    However please see note 1037748 where you get more information and help.
    Best regards
    Rene

  • How to create a new folder in my iPad hotmail?

    How toI create a new folder in my iPad hotmail?

    You can only do it with IMAP email account; to do this:
    1. Go to your email account in the Mail app and look at the window where your Inbox, Trash folder and Sent folder are.
    2. Tap the Edit button
    3. Tap Add Mailbox (bottom)
    Note: If there is no Edit button, your email account is not a IMAP account

Maybe you are looking for