Shrinking of PDF Page

Hi All,
I am looking for an API through which I am able to shrink a PDF page. For example I want an A3 page to be converted to A4 without loss of any content.Please let me know is there any option available for doing the same apart from printing the page to a new file.
Looking forward to your help.

Hi NiceNix
thanks for your help.
I have done the page shrinking using the following code, but after the execution some content loss is there in the page.
CosObj content, newContent;
ASStm objContentStream, objNewStream;
char* charMatrix = "q 0.5 0 0 1 0 0 cm \r";
CosObj cosPage = PDPageGetCosObj(objPDPage);
ASInt32 iSize = strlen(charMatrix);
if(CosObjGetType(cosPage) == CosDict)
content = CosDictGet(cosPage,atom);
if(CosObjGetType(content) == CosStream)
ASInt32 iLength = CosStreamLength(content);
inBuffer = (char*)ASmalloc(iLength);
outBuffer = (char*)ASmalloc(iLength + iSize);
objContentStream = CosStreamOpenStm(content, cosOpenFiltered);
ASInt32 bytesRead = ASStmRead(inBuffer, iLength, 1, objContentStream);
memcpy(outBuffer, charMatrix, iSize);
memcpy(outBuffer + iSize, inBuffer, iLength);
objNewStream = ASMemStmRdOpen(outBuffer, iLength + iSize);
newContent = CosNewStream(cosDoc, true, objNewStream, 0, true, CosNewNull(), CosNewNull(), -1);
ASStmClose(objNewStream);
CosDictPut(cosPage, atom, newContent);
Its working well for raster page. I dont know what is wrong with the code. Please help me in this.
One more question,
i have tried with different file where i got "stream array" and i dont know how to use it for this operation. Could you please help me in this too.
Thanks
Rajeshrv

Similar Messages

  • Outlining, Borders and Shrinking to 1 Page

    I used to use Excel daily at work and finally switched to Numbers. I used to use the border/outline feature alot. I don't seem to be able to find the equilvant in Numbers. Also there is no shrink to one page feature. From reading this forum I have to re size and delete columns until it fits on one page? Thanks for your help.

    Kaz,
    The Numbers User Guide PDF is the best place to look for the basics, stuff you are pretty sure should be possible.
    Controls for Borders are in the Table Inspector, and when appropriate, on the Format Bar. You select the range of cells you want to change the borders on, pick which borders you want to change within the selection and then pick line type, width or color. As you select the border lines, you will see them highlighted - don't mistake this for the change.
    Fitting content to a page is done in two ways. First, eliminate any rows or columns that don't have content. If you don't, you'll get extra pages. Second, if you've gotten rid of any unneeded parts and still can't fit what you want on a page, you can shrink everything with the Content Scale Slider in the lower left part of the window. You must select Print View mode to activate the slider.
    Hope this gets you on your way.
    Jerry

  • How do I: put multiple PDF pictures into one PDF page?

    I have just installed Adobe Acrobat Pro Ver 9 - so this apllication and its associated SDK are the only applications available to me for use.
    Adobe Acrobat was chosen because of its AutoCAD capabilities (when AutoCAD is not present). i.e.  Using Acrobat & AutoCAD's plot configuration files & Pen / colour selection table ensures the output has correct line thicknesses (sometimes colours in CAD are used to represent a line's thickness) - this is preserved when using Acrobat.
    The generated output is fantastic. However, when I try to print the output via Excel / Word (used for layout) - my perfect output is reduced to imperfect results.
    So: is it possible to layout multiple PDF pictures inside one PDF entity for printing purposes such that the original output is not distorted?
    I have in the past put pages in front or behind other pages but cannot find any references or code that works with Pro 9 nor indeed the manual way to insert PDF pages at any location on a single PDF Page?
    I'll try and explain.  My template coud consist of 6 boxes on a single A4 page thus:
    My base PDF Page (can be thought of as a template - ideally it wont be printed - but even if it is - it wont be printed on any media material) has 6 areas (any number of areas up to 100) on it.  In each area, there is a box.  It is within these boxes that I wish to place a PDF Picture.  Not all pictures will be the same.  How can I do that?  Ideally I'd like some example C# code - though doing it as a user will suffice, for now.
    Is there a way of programmatically selecting each of the above boxes on the base PDF Document?
    I do know of one manual method (though it seems long winded) and it is not accurate enough in that (even though the layers are deselected) - the hidden layers are subsequently outputed too - not good!
    Uses a button icon over each box.
    All the current Adobe help for the SDK refers to Pro 8 and previously - which all seems to have now been replaced in Pro 9
    This question will be placed in the Developer & User Forums - as it pertains to both.
    Thankyou in advance for anyone that either knows any workarounds or any ways to affect a solution. 

    Picture of what I want to see:
    What I get, and don't want to see is:
    The PDF was generated using Adobe Acrobat Pro 9 from an AutoCAD LT (DWG) file without AutoCAD being present but making use of a plot configuration (PC3) file & pen table (CTB) file.  The resultant file [WhatIWantToSee.pdf] is perfect - all the lines are the right thickness & colour and are perfect vectors (with no construction / proofing layers visible).  When you view that file in Acrobat and show the "Layers" property box, you see that the correct number of layers whilst are still present are indeed turned off.
    However, when I add a forms-button to one of the rectangles (please refer to initial post - where there are 6 rectangles), and display same file as icon display.  The resultant view is the one shown above named [ What I get and don't want to see].  It seems the saved layer settings are all ignored?
    I generated the PDF file through Adobe Acrobat Pro 9  Menu | File | Create PDF | From File (Files of type Autodesk) | Options | Selected Layers | Layout | Last Active Layout.
    Rectangles are regular content elements - not fields (in the general meaning of form-fields).

  • Extract PDF pages with it's actual page numbers...

    Hi scripting gurus,
    We have more than 40 of PDF documents each document contain multiple pages. Using Acrobat Professional 7.0 and 8.0 with MAC platform. We have the script to extract the pages and to suffix running numbers with the document name, please find the script below. For example CH01.pdf document total number of pages is 10, but the actual page number starts with 11. So We have to extract each pages as individual documents and the page number will followed by document name with "_" separation, (Eg: CH01_11.pdf). I have tried so many ways to include the page numbers with the document name but i can't.
    /*Split pdf pages with pNum suffixed*/
    var rename = /.*\/|\.pdf$/ig;
    var startName = this.path.replace(rename,"");
    for (var i = 1, j = 0; j < numPages; i += 1, j += 1) {
    extractPages ({
    nStart : j,
    nEnd : j == numPages - 1 ? j : j + 0,
    cPath : "/Macintosh HD/Users/Beaconpmg/Desktop/ExtractFolder/"+startName+"_"+i+".pdf"
    So please can anyone look into this and help for me.
    Thanks in advance.
    Regards
    Thiyagu

    try67
    First of all, replace numPages with this.numPages
    Also, this doesn't make any sense:
    nEnd : i == numPages - 1
    I have tried what you have said above, but it is not working. Its showing the same error (missing ; before statement)in 4th line of the script.
    Please find the complete code below;
    // see if we need to define a global offset first file
    if(global.fPageOffset == undefined) {
    var global.fPageOffset = 10; // start at 10
    /*Split pdf pages with pNum suffixed*/
    var rename = /.*\/|\.pdf$/ig;
    var startName = this.path.replace(rename,"");
    for (var i = 0; i < this.numPages; i++) { this.extractPages ({ nStart : i, nEnd : i == this.numPages - 1 , cPath : "/Macintosh HD/Users/Beaconpmg/Desktop/ExtractFolder/" + startName + "_" + (i + global.PageOffset) + ".pdf" }); }
    // add finished file's number of pages to global page offest
    global.fPageOffest += this.numPages;
    Regards
    Thiyagu

  • I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page, but not all or pages 1-5.  Can this be overcome?

    I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page only, but not all or pages 1-5.  I need to go to the next subsequent page and command to print current page; continuing with this procedure until all pages are printed one at a time. Can this be overcome?

    You can use printPages(1, 5), however I need to know how you print current page.

  • Is there  a way to make Safari open PDF pages without opening Finder and select Reader from my applications folder?

    Simple, When I want to open a .pdf page from the web, I get Finder to open and I have to go to my applications folder to pick up Acrobat reader, Is there a way to have Safari doing it all by itself, Preview, or any other program?

    Right or control click a PDF file you have on the hard drive then click: Get Info
    In the Get Info panel click the pop up menu next to:  Open with
    Select the app you want to open PDF files from the pop up menu then click:  Change All

  • Is it possible to Default "Choose page source by PDF page size" option in the "Print" dialog box?

    I have an SSRS report that is rendered as a PDF file; the report has many columns and utilizes 11inx17in (Landscape) paper. However, once the report is rendered and users try to print the report they have to manually select the 'Choose Paper source by PDF page size' option in order to get the report to print on the correct paper (otherwise it defaults to standard letter size - landscape orientation).
    I'm aware of 'Print Presets' functionality; however, I don't believe they apply to this scenario. Is there a config file/registry setting/anything that can be specified to automatically set the 'Choose paper source by PDF page size' print setting = On/True/Checked?
    Any help would be greatly appreciated...

    Anybody out there?

  • Link to a pdf page on web from a chm file

    Hello,
    I'm using RoboHelp 9.0.2.  I'm trying to create a link in a chm file to a specific pdf page using a URL.  The link I am using is http://www.actuarialstandardsboard.org/pdf/exposure/ASOP_No27_second%20exposure_2011.pdf#p age=41
    I put the above line in my chm file.  It appears correctly in the URL project list and shows correctly when I choose Show.  It also apeears to be correct in the HTML code of the page. 
    However when I create the chm clicking on the link just brings me the start of the pdf file.  After clicking on the link in the chm file and explorer opens, the URL in explorer does not show #page=41.  It ends at.pdf.
    Am I missing something or does anyone kno whys this is not working?
    Thanks
    John

    Hi there
    That link doesn't even work for me when I paste it into the address bar of my Firefox browser. It does work in IE, but not in Firefox. In Firefox it opens the PDF generically.
    I tested in a CHM and it did try and link, but it presents a black page. Looks like the correct page, but it's blacked out.
    CHM files rely upon elements of Internet Explorer to display their content. So perhaps it's something specific to a certain version of Internet Explorer as well as a certain version of the Acrobat Reader.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can I print a booklet where each pdf page is vertically placed on each half page instead of one pdf on each booklet page?

    I've printed a booklet before but each pdf page had two powerpoint slides on each pdf file.  This binder has one powerpoint slide on each pdf page and if I try to print it as a binder, each pdf page takes up the whole half-page on the booklet.  I want to print two pdf slides on each page of the booklet so when I open the booklet, there are four powerpoint slides printed.  So I basically want to combine the ability to print multiple slides per page but in a booklet form.

    Why not reconstruct the pages in InDesign they way you want the double pages to appear. There may even be an imposition script available that will do the trick. You could then output to pdf all the pages you want the full spread on. Leave the original to create the pages you wanted left as is.
    You can ask in the ID forum about an imposition script. I know there was one with CS4, there may have been one with CS3.

  • Question: Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages? - Problem: I have 1400 e-mails with attachments that need to be conv

    Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages?
    - Problem: I have 1400 e-mails with attachments that need to be converted into pdf and the attachments cannot be embeded.
    System: PC Windows 7 using Acrobat X Prof. - Thank you!

    Hi ,
    There is an option of embedding index for faster search while converting email to a PDF .
    However I am not sure that will serve your purpose or not .
    I would recommend you to get in touch with Microsoft support as well .
    Meanwhile I'll work on it and get back to you in case I get a desired solution .
    Regards
    Sukrit Dhingra

  • Merge Different Spools containing a Single PDF page into a Single PDF file.

    Greetings,
    I am developing a custom object where in i need to read PDF file from many different Spools(Range given on Input Screen), where each spool has a single PDF page in it. I need to combine all these PDF Pages into a single PDF file & either create a new Spool or save it on an Application Server.
    At present i have developed the code where in i am able to read the PDF files from different spools & convert them into Binary but i am not able to generate it back to PDF file.
    Kindly find my code for your reference.
    CODE:-
    START-OF-SELECTION.
      PERFORM f_get_spool_1000 .
      PERFORM g_conv_pdf_to_bin_2000 .
    *&      Form  F_GET_SPOOL_1000
          text
    FORM f_get_spool_1000 .
      SELECT * FROM tsp01
               INTO TABLE gt_tsp01
               WHERE rqident IN s_spool
               ORDER BY rqcretime DESCENDING.
      IF sy-subrc = 0.
        SORT gt_tsp01 BY rqident .
      ENDIF.
    ENDFORM.
    *&      Form  G_CONV_PDF_TO_OTF_2000
          text
    DATA: lv_filename_out   TYPE string,
                lv_len            TYPE i,
                lt_tab            TYPE tsfixml .
      DATA: lwa_print_parms    LIKE pri_params,
                  lv_valid(1)       TYPE c .
      DATA: lv_linsz LIKE sy-linsz VALUE 132, " Line size
                  lv_paart LIKE sy-paart VALUE 'X_65_132'.  " Paper Format
      DATA : lt_tsp01 TYPE STANDARD TABLE OF tsp01 ,
                   lwa_tsp01 TYPE tsp01 .
      CLEAR : gv_pdf, gwa_tsp01, gv_renderpagecount .
      LOOP AT gt_tsp01 INTO gwa_tsp01.
        CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
          EXPORTING
            i_spoolid         = gwa_tsp01-rqident
            i_partnum         = 1
          IMPORTING
            e_pdf             = gv_pdf
            e_renderpagecount = gv_renderpagecount
            e_pdf_file        = gv_pdf_file
          EXCEPTIONS
            ads_error         = 1
            usage_error       = 2
            system_error      = 3
            internal_error    = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CLEAR lv_len .
        REFRESH gt_bin .
        CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            buffer        = gv_pdf
          IMPORTING
            output_length = lv_len
          TABLES
            binary_tab    = gt_bin.
        CLEAR gwa_bin .
        LOOP AT gt_bin INTO gwa_bin.
          APPEND gwa_bin TO gt_listout.
          CLEAR gwa_bin .
        ENDLOOP.
      ENDLOOP.
    Get FP reference
      DATA: lo_fp     TYPE REF TO if_fp VALUE IS INITIAL,
            lo_pdfobj TYPE REF TO if_fp_pdf_object VALUE IS INITIAL,
            lo_exc    TYPE REF TO cx_root,
            lv_xslt_message TYPE string .
      lo_fp = cl_fp=>get_reference( ).
    For handling exceptions
      DATA: lo_fpex TYPE REF TO cx_fp_runtime VALUE IS INITIAL.
      TRY.
          lo_pdfobj = lo_fp->create_pdf_object( connection = 'ADS' ).
      Set document
          lo_pdfobj->set_document(
            EXPORTING
              pdfdata = gt_listout ).
      Tell PDF object to extract data
          lo_pdfobj->set_extractdata( ).
      Execute the call to ADS
          lo_pdfobj->execute( ).
        CATCH cx_root INTO lo_exc.
          lv_xslt_message = lo_exc->get_text( ).
      ENDTRY.
    Your quick reply would be of great help.
    Regards.

    Thank Your for your concern, there are many replies & posts but all of them points only to Try what they have said. As being said that trying to convert PDF to binary & appending many PDF similarly would not let you generate a single PDF again.
    Your Kind guidance would be really appreciable.
    Regards.

  • Adobe Reader 11 "choose paper source by pdf page size" does not work

    Hello,
    I have a user that utilizes the "choose paper source by pdf page size" option when printing a PDFs. He has a PDF that has a letter sized page and a legal sized page.
    I recently upgraded his Adobe Reader from 10 to 11 and now that option isn't working for him. The printer is an HP LaserJet M2727nf MFP.
    Are their any bugs regarding that feature in the new Adobe Reader?
    Thanks!

    If you have not updated Acrobat, try that before you go further. Currently AA9 is at 9.5.1.

  • I have problem when opening a pdf page, my mouse control is hijacked to that tab when im on other tab, i cant scroll or use the middle rollling button, i have to click at the pdf tab then my control over the mouse middle button is restored.

    I think I have this problem even on earlier version. The thing is I set open link in new tab and not switch over to the opened tab. My habit is to open a pdf page in the background and let it load first. What happen is that when the pdf page finished loading ( i do not set to download it), it hijacks my middle mouse button control. When i scroll down or scroll up on my original tab, it wont scroll on the tab, but insttead it scrolls on the pdf tab. I have to click on the pdf tab, then i can use the scrolling function on other tabs back. As for when i opened several pdf tabs, it seems i have to click on the tab that just finished loading, that means several times until they all finish loading. It has been getting on my nerve lately. And all pdf trouble i search from google led to unable to open pdf, firefox hang or crash when opening a pdf and the likes.

    core-el, i don't see the advantage of that or i can't figure out how i'm supposed to use it. for starters, i have to click the mouse in order to get "add bookmark here" to open, which is no different than clicking on the star in the location bar, or right-clicking on the page. there are also options in the bookmarks toolbar, but they all require clicking the mouse & holding down the right button, etc.
    my goal is to use keystrokes only. typing on the keyboard, using both hands, using the space bar & my left pinky finger to tab over are all painless routines for me. as soon as i have to take my fingers off the keyboard & use the mouse, the pain begins.
    as i said, in older versions of firefox, all i had to do to bookmark a page was click ctrl>d, then tab over & arrow down, when appropriate, to find the folder & add the bookmark. for me, as a touch-typist whose speed is between 60 & 80 wpm, this is lightning fast.
    if i have this wrong, please correct me. i just see it as more mouse clicks that don't save me time or pain.

  • Bug in Automator's Combine PDF Pages action?

    Hi guys,
    I've been playing around with 10.6's new Automator and Services. I decided to make an Automator Service so that if I have some PDFs selected in Finder, I can combine all the pages into one PDF and save it to a location. So I created the following service:
    * Get Selected Finder Items
    * Combine PDF Pages (appending pages)
    * Move Finder Items (to Desktop by default, show this action when the workflow runs)
    * Rename file (comes up as Name Single Item in Finder Item Names, show this action when the workflow runs)
    I tested this in Automator by selecting some PDFs on my desktop and hitting the Run button; everything worked out well. So I saved it as an Automator Service, only available for PDF files but in all applications (drop down lists at the top of the Automator window).
    I noticed however when I ran this workflow as a service, the pages in the resulting PDF file is actually duplicated. For example, if I had page 1 in page1.pdf, and page 2 in page2.pdf, running the service on these two files will produce a PDF with the following pages: page 1, page 2, page 1, page 2.
    Does this happen to anyone else in here, or is it just me? I tried saving the workflow as an application, placed it in the Dock, and then dropped my test files on it and it does the same thing. And this happens with other PDF files too.
    Is this a bug? Can someone confirm that it happens on their machine too?
    Thanks.

    Anyone? It doesn't take long to create an Automator workflow with the 4 actions above. Probably 2 minutes max. Can someone test on their machine?
    I tried to do the same with my MBP, which I also upgraded to Snow Leopard, and it does the same thing there. For some reason, it works perfectly when the workflow is run within Automator, but when it's exported as an Application or a Service, it duplicates pages.
    I tried to submit a bug report to Apple, but I couldn't log in with my current Apple ID -- it shows me an error page to submit a bug report! That's what I've been trying to do in the first place, but it seems the bug report process has bugs that they want you to report on. Chicken and egg scenario methinks.

  • Wrong PDF page size in Excel

    When I use PDFMaker to "print" the print area of one particular spreadsheet, the Adobe PDF page size is 11.18 x 14.47 inches.
    When I use Adobe PDF printer, the Adope PDF page size is 8.5 x 11.0.
    Excel Page size = Letter (8.5 x 11.0)
    Excel Page orientation = Portrait
    Excel Page Parameter = Fit print area to 1 page x 1 page
    Selected Printer = Adobe PDF
    Selected Paper size in Adobe PDF dialog boxes = Letter
    Selected Paper size in PDFMaker Preferences = Letter
    When I change the Excel Page Size to Tabloid (11 x 17):
    Adobe PDF printer creates a page size of 11.0 x 17.0
    Adobe PDF Maker creates a page size of 11.0 x 17.0
    Can anyone shed light on the problem experienced by PDFMaker on the Letter sized request?
    I am running:
    Windows XP, SP3
    MS Excel 2007
    Acrobat 9.1.2
    PDFMOfficeAddin.dll version 9.1.0.0
    PDFMExcel.dll version 9.1.0.0

    Hello everyone!
    It's been long since this topic was active but I just wanted to share my solution to a similar problem.
    I was trying to use the built-in Save as PDF function of Excel 2007 and my sheet which also had some headers and footers was not coming out correctly.
    From Page Layout tab, I clicked the small icon on the corner of the Page Setup. Then I clicked the Header/Footer tab and removed the tick next to where it says "Scale with document" and viola! I miraculously could export my sheet in the correct page size.
    May this be helpful to not just who have had this problem before, but also the ones that will come afterwards!
    Cheers!
    Avni

Maybe you are looking for