Page size problem with pdf export

I have a large text document created in Pages (about 300 pages). It's in A5 size (about 8x5). But when I export it to pdf, the page size switches to 8.5 x 11, screwing up the layout. Any ideas on what's going wrong in the export process? Thanks.

The helper class using IText:
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfImportedPage;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;
public class PDFHealer
   public static InputStream heal(InputStream in) throws DocumentException, IOException
      try
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         PdfReader reader = new PdfReader(in);
         // we retrieve the total number of pages
         int n = reader.getNumberOfPages();
         // step 1: creation of a document-object
         Document document = new Document();
         // step 2: we create a writer that listens to the document
         PdfWriter writer = PdfWriter.getInstance(document, out);
         // step 3: we open the document
         document.open();
         // step 4: we add content
         PdfContentByte cb = writer.getDirectContent();
         int i = 0;
         while( i < n )
            document.newPage();
            i++;
            PdfImportedPage page1 = writer.getImportedPage(reader, i);
            cb.addTemplate(page1, 0, 0);
         // step 5: we close the document
         document.close();
         ByteArrayInputStream ret = new ByteArrayInputStream(out.toByteArray());
         out.close();
         return ret;
      finally
         in.close();

Similar Messages

  • Problem with PDF export and embedded font (characters disappear)

    Designer: Crystal Reports 2008 SP 2
    Engine: CR4E 2.0 SP2 (runtime_12.2.203)
    Hi there!
    we found a problem in the pdf export. It seems like there would be a problem with the embedded fonts, the problem is as follows:
    Rpt file with, for example only a text box which contains the german string " Änderungs Schlüssel ".
    Export the Rpt file with CR4E to a pdf file.
    When we open the pdf file in Adope Reader 8, the text appears to be correct,
    but if we print the PDF file from the Adope Reader, the text changes to " nderungs Schl sselu201C,
    here we are missing ther german umlaute.
    When we open the file for example with an alternative PDF reader like Foxit Reader, there they are also missing.
    After i found some posts here in the forum, there are people facing the same problem, since i couldn't find a solution in the forum, we build a little workaround for it that works for us.
    For all of you that have the same problem here the workaround:
    We used the IText JAVA library, this jar can can help as to fix the PDF file so the text is displayed correctly.
    Here the code:
    ReportClientDocument doc = new ReportClientDocument();
    doc.setReportAppServer(ReportClientDocument.inprocConnectionString);
    doc.open("C:\XY.rpt", OpenReportOptions._openAsReadOnly);
    //... database logon,.....
    InputStream inputStream = doc.getPrintOutputController().export(ReportExportFormat.PDF);
    inputStream = PDFHealer.heal(inputStream);
    //... write the stream some where

    The helper class using IText:
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
    public class PDFHealer
       public static InputStream heal(InputStream in) throws DocumentException, IOException
          try
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             PdfReader reader = new PdfReader(in);
             // we retrieve the total number of pages
             int n = reader.getNumberOfPages();
             // step 1: creation of a document-object
             Document document = new Document();
             // step 2: we create a writer that listens to the document
             PdfWriter writer = PdfWriter.getInstance(document, out);
             // step 3: we open the document
             document.open();
             // step 4: we add content
             PdfContentByte cb = writer.getDirectContent();
             int i = 0;
             while( i < n )
                document.newPage();
                i++;
                PdfImportedPage page1 = writer.getImportedPage(reader, i);
                cb.addTemplate(page1, 0, 0);
             // step 5: we close the document
             document.close();
             ByteArrayInputStream ret = new ByteArrayInputStream(out.toByteArray());
             out.close();
             return ret;
          finally
             in.close();

  • Page Size Problem in Pdf

    Hi All,
    I want to print cheques form oracle Reports 10g, I developed report in 6i & it works fine, Now I am going to convert it in 10g, in report developer it works fine but when it generates through reports server it generates on full pdf page.
    Kindly help me how can I reduce the page size by default.
    Regards,
    Najeebullah Soomro

    Salam, Najeebullah Soomro
    I want to print cheques form oracle Reports 10g, I developed report in 6i & it works fineDoes PDF also working as your page setup in 6i?
    Now I am going to convert it in 10g, in report developer it works fine but when it generates through reports server it generates on full pdf page.Now problem in 10g PDF ?
    set the page margin at layout property and also make smaller the frame at Edit Margin mode.
    Hope this helps

  • Indesign CS5 - Problems with PDF-Export

    Hello community,
    we do have a problem with Indesign CS5 and exporting data into PDF. It is about that logo on that white surface, which doesnt come along with the rest after the pdf-export. What we did was: We created that white surface in Indesign itself, put an effect on it with the Indesign effect gallery and then imported the logo in the surface ... the logo itself is .psd data. So, if we export it into pdf like that, it is just dissapeared. Does anyone have had a similar problem and what can be done about it?
    By the way ... if you put, for example, a simple backgroundshadow on a picture ... done also with the Indesign effect gallery, then you get just a white surface instead of the shadow, after the export into pdf. It does maybe correlate with the other problem ... not sure. Any suggestions?
    Thank you very much for your help and kind regards ...

    I would create the entire logo, including the white background, in Illustrator, save as PDF and place that in ID.

  • Problem with pdf export and setting of the paper size

    Hi,
    I develop plugins for InDesign server.
    Can anybody suggest me an way to exports a pdf/ps file from a indesign document with my custom adjustment of the output "paper" size?
    I tried with kPrintActionCmdBoss but the "SavePDFAs" popups although I set kSuppressEverything(!?)
    When I used kPDFExportCmdBoss I cannot set paper size.
    greetings

    The helper class using IText:
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
    public class PDFHealer
       public static InputStream heal(InputStream in) throws DocumentException, IOException
          try
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             PdfReader reader = new PdfReader(in);
             // we retrieve the total number of pages
             int n = reader.getNumberOfPages();
             // step 1: creation of a document-object
             Document document = new Document();
             // step 2: we create a writer that listens to the document
             PdfWriter writer = PdfWriter.getInstance(document, out);
             // step 3: we open the document
             document.open();
             // step 4: we add content
             PdfContentByte cb = writer.getDirectContent();
             int i = 0;
             while( i < n )
                document.newPage();
                i++;
                PdfImportedPage page1 = writer.getImportedPage(reader, i);
                cb.addTemplate(page1, 0, 0);
             // step 5: we close the document
             document.close();
             ByteArrayInputStream ret = new ByteArrayInputStream(out.toByteArray());
             out.close();
             return ret;
          finally
             in.close();

  • Big problem with PDF export from CS4

    Create a document with facing pages. Then place a rectangle or any other object on the master through the whole spread. Place the text or any other object on the master over the first rectangle on the both pages. Now, when exporting pdf, the text on the left pages is disappeared becaouse it covered by the copy of the rectangle. The variation of the problem is when using any tansparencies, then they become "less transparent" on the left pages because of this strange dublicating.
    There is an archive in attachment that contains indd and pdf files with this problem.

    Thanks, it works, but bug is still bug. In some cases it's impossible to do this, for example my recent case: it was text with huge outer glow on master pages. Outer glow from right page dublicates to the left and covered left text, and there's no way to move effect to another layer separately. The solution was to detach these texts from masters, but it's also unhandy solution.
    It's hard to detect such cases unless it happen with big elements.

  • Problem with PDF export in CC

    When exporting to pdf in Photoshop CC in CMYK, Acrobat opens it with a blank page and the message that it's out of memory. Exporting the same file as RGB opens fine. Any ideas? Exporting as CMYK has worked fine in all the previous versions of Photoshop and still does in CS6.

    This is still a problem unfortunately: http://forums.adobe.com/thread/1265266

  • Problem with PDF export format

    Using Mavericks and the latest version of Numbers, I have a problem when exporting a spreadsheet as a PDF.  The spreadsheet is very simple and everything in it is formatted with a border around each cell (more like a 10 line/10 column table with borders).  When I export it as a PDF the borders are there, but bolded, and the grid lines in the rest of the readsheet lines are also displayed in the PDF. 
    If I export the same spreadsheet to a PDF from Microsoft Word for Mac 2011, only the items that have borders show up, as I want it to be.  Is there anyway to surpress the grid lines from showing up in the export from Numbers? All I want to display in the PDF are the cells with content that are bolded...not the grid lines in the rest of the spreadsheet.

    OK, I've figured out how to hide the cell borders when I export to PDF, but still there is a single border around the entire page...about where the margins are.  It's light gray, so obviously another grid line, but this one I can't figure out how to hide.

  • Problems with pdf-export / Probleme beim PDF-Export

    Hi,
    I tried to export a pdf from the "report" as portrait. It came out as a landscape. The left side of the pdf showing my exported report (as portrait), the right half of the page empty...
    Not exactly what I meant to do!
    Wenn ich ein pdf im Hochformat aus "Report" exportiere, erhalte ich ein PDF im Querformat. Auf der rechten Seite ist mein exportierter Report (im Hochformat), die linke Hälfte der Seite ist leer.
    Kann mir jemand weiterhelfen?

    Moritz -
    Did you mean to post this question in the "Feedback" board?  I would be happy to move it for you to the appropriate product board, but I'm not exactly sure which language you are programming in.  Can you let me know where you intended for this to go?
    Thanks,
    Molly K.
    Web Support & Operations Manager
    National Instruments

  • OrgChart : Problem with PDF export

    Hello,
    I have installed Nakisa OrgChart 2.0 accelerated.  I also have installed the export pack 3.0.
    When exporting pdf, I'm getting an error message.  Nakisa logs show the following entries :
    ERROR: PDF : generatePDF : HTML render is blank.
    ERROR: Printing : generatePDF : PDF conversion failed, no output PDF file was created.
    Have any of you ever encountered such issue?
    Any feedback greatly appreciated!
    Thanks,
    Laurent

    Hi Laurent,
    If you had issues implementing the Service Pack then it may not have been done correctly. It can be difficult to implement on already configured/customised builds and if you are experiencing problems you should roll-back and try to implement again. If you are still having problems you should get some experienced consultant to help.
    EhP4 is not required for OrgChart 2.1, only for SuccessionPlanning 2.0 and 2.1. However, you may need ECC6.0 for OrgChart 2.1 as there are some transports that need to go into SAP.
    I hope that helps.
    Luke

  • Trouble with PDF Export from ID CS6

    I am having the following problem with PDF exported from an ID CS6 document. I have a couple of pages where a b&w photograph is partly covered by a non-wrapping text frame and in that text frame there is blue text. In ID it looks like this:
    It also looks like this in the exported PDF in Apple Preview.app and for most of these pages they also look good in Acrobat Pro. But two are giving me trouble. They look like this:
    and sadly, they also look that way when Ingram tries to use them. I export using the typical print format PDF/X-1a:2001
    I have a minimal ID document that shows the problem with 3 such pages, one with the problem.

    Select one of the troublesome objects and open the attributes panel as well as the effects panel.
    Give us a screenshot.

  • Fonts Not Embedding Consistently with PDF Export - Inconsistent Fix and Unknown Cause

    I have had ongoing problems with PDF export from FrameMaker. Sometimes the correct fonts do not embed in the PDF and Times New Roman is substituted. The problem appears and disappears and is causing me a lot of lost time and frustration.
    I am running FrameMaker 9.0 fully patched on Windows 7 Ultimate 64-bit. I have seen people complain about this issue and am familiar with the suggested fixes. However, the exact cause and solution eludes me because the problem continues to recur and I am only able to recover with guesswork and workarounds.
    Initially I did the following:
    ACROBAT PDF SETTINGS
    - In the printer properties for Adobe PDF settings I turned off the option "Rely on system fonts only; do not use documents fonts."
    ACROBAT DISTILLER SETTING
    Under "Font" Settings I changed the following:
    - Under "Settings/Font Locations" I added the font folder for Technical Communication Suite 2.0 and made sure all the fonts existed there and in the Windows default font directory.
    - Under "Settings/Edit Adobe PDF Setting/Fonts" I changed the following options:
                - Selected "Embed all fonts"
                - Under "Embedding" chose "Always Embed" for the target fonts.
    I tweaked these settings for hours and got no results. Then I rebooted and the problem had magically disappeared. I fixed the issue in the same way on another machine and the results were permanent and I was just happy to finally have it fixed, But this time it didn't last.
    I should note that upon reboot, when I used the stock "PDF Job Options," the correct fonts still embedded, leading me to believe that the fix had nothing to do with the changes I made to Distiller settings.
    After reboot I generated PDFs with the correct fonts embedded. Then I shut down FM, but left the system running. The next morning I opened FM again and the same problem occurred.
    So I rebooted again -- and the problem disappeared again. I therefore thought maybe the issue fixes on reboot but recurs when you shut down FM and reopen. So I shut down FM again and reopened, but it is still working fine for the moment.
    I verified that the Adobe PDF settings under "Printers & Devices" that I turned off (Rely on system fonts only; do not use documents fonts) remained correctly unchecked through all these changes.
    I would really like to know why this happens so I can resolve it permanently and avoid more lost time.
    Thanks in advance,
    Douglas

    The common theme I'm seeing here is that the setting edits you make in
    Distiller through the FM "Save As PDF" option don't seem to take effect.
    Do you know if that is true or could you elaborate on the notorious nature
    of this method for me?
    >
    There are too many potential and transient problems to list. The only thing
    I can say is that I've been an active member of the FrameUsers listserv
    (http://lists.frameusers.com/mailman/listinfo/framers) since FM version 6.0,
    circa 2001, and probably 95% of the PDF problems reported there have been
    fixed simply by using print to Adobe PDF (or to Acrobat Distiller in older
    PDF versions), instead of using Save as PDF. Common advice there has always
    been to avoid Save as PDF and even some Adobe employees have recommended
    against using it. It doesn't matter which FM version.
    The once-busy FrameUsers listserve has been fading away, recently, as this
    new Adobe forum software allows reading via e-mail, and attachment of
    screenshots.  Even if you look around on this forum now, you'll probably
    find that there are two main fixes for issues with PDF. One is NOT using
    Save as PDF, which seems to fix a whole bunch of issues. The other is the
    use of a Windows hotfix to squash a Windows OS bug that causes dropped
    characters in PDFs.
    In the rare instances that someone has issues with printing to PDF, they are
    almost always related to errors in settings. Or occasionally someone can't
    embed fonts because they are trying to the embed the virtual fonts that come
    with their printer driver instead of fonts that have actually been installed
    on their computer. (The fonts are hard-wired on their printer, so the system
    can use them but not embed them.)

  • CS 5.5 problem with PDF links of master page TOC

    Hi
    Lately i moved from ID CS5 to CS5.5 working on Windows 7.
    All spreads of my document are based on a master page. This mater page includes a pane with a TOC. This TOC serves as navigation pane.
    When exporting the document to interactive PDF, the TOC appears on all spreads but the TOC links function well on the first spread and will not function on the next pages.
    The interactive PDF export settings include: "open in full screen mode" and "buttons and Media = include all".
    I made a test, and added hyperlink on the master page next to the TOC, now the TOC links turnned active on all pages but the PDF will not open in full screen although i did not change the export settings. If i remove this extra hyperlink the TOC links problem returns.
    I used the same document a lot in the past (with CS5) and did not have any such problem.
    Hope i managed to describe this case well.
    Highly appreciate your help.
    RGDs
    Tamir

    Thanks Steve
    I trashed the two preference files as instructed.
    Expoerted the file to IDML.
    Opened the IDML file and saved it as an ID file.
    The problem still exist.
    RGDs
    Tamir

  • Many problems with the 'Export to Text' (.txt) in CR Xi

    Hi,
    I have listed many problems with the 'Export to Text' (.txt) function of CR Xi.
    These problems are related to this export format only (meaning everything works fine in the Viewer or in the 'Export to PDF')...
    - Multi-columns layout do not export as Multi-column (export only a one column);
    - Numeric values with parenthesis for negative values or with a fix currency sign at the leftmost position are not exported correctly;
    - Fields having a Suppress formula which is "WhilePrintingRecords" do not appears when exported;
    - Fields with 'Suppress double value' checked are not always suppressed when exported to Text.
    - 'Keep Group Together' flag is not working.
    - 'Reset Page Number After' simply does not works when exported to text;
    - 'Keep object together' on TextBox/Section is not working.
    - Whenever a group is ending on the last line of a page, the the following page as the same Group header as the previous group with no records until the page is filled, then the PageBreak and PageHeader is missing but the records of the following group appears.
    I would like to know what is the status of the 'Export to Text' function (is it a deprecated function not supported anymore???).
    If still supported, when will these bugs be fixed???
    Thanks

    Hi Rene
    Export to Text is supported till date. Crystal Reports 2008 also supports this with Keep together working however when I tried with format with multiple columns, it didnot show up in the exported text file.
    Regards
    Sourashree

  • Exporting Quark to Acrobat. Acrobat enlarges page size, how do I export to Adobe Acrobat so that it keeps the page size the same?

    Exporting Quark to Acrobat. Acrobat enlarges page size, how do I export to Adobe Acrobat so that it keeps the page size the same?

    Thank you. I used to be able to Export from Quark to Acrobat without any problems when I was using Acrobat 7. Just changed to Acrobat 8 and have this problem. My 8.5x11 pages become 33x44 inches when exported to Acrobat 8. 400% increase in size. I don't know why. I tried Printing my Quark file to Adobe PDF and that worked. Thank you for your help.
    Margo

Maybe you are looking for