Problem in pdf export and subsequent selection

Well I'm starting to have a very bad weekend. I know I can do a lot of this in acrobat but that would defeat the point of why to use indesign.
My problem is as follows: There's a LOT of python tutorials in indesign formats at my work. Now the BIG problem is that python is dependent on white space on start of the line. But once in PDF format the text selection tool refuses to select the spaces at the start of the line.
If anybody of you has programmed python you'd know that's a bad thing indeed. So what we have now is thousands upon thousands of lines of examples the user can not easily select and copy paste into their use. Without spending a excessive amounts of adding spaces.
So apart of ditching using pdf and indesign as medium. Is there any easy way that i can:
1 ) Override the function of adobe reader. So it selects the whitespace
(I know its there if text touchup i can see it)
2 ) Instruct indesign to export a pdf text field out of a certain
paragraph style per paragraph.
Something other I can do? This is killing my entire workflow. Maybe theres a way you could autoswap the fields in script etc? I mean it must be readily apparent to even somewhat inexperienced computer user.
PS: im thinking maybe buttons that copy text to clipboard but that's not the most intuitive way

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();

  • 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();

  • I am having problems creating PDF file and downloading them

    I am having problems creating PDF file and downloading them

    Hi Randy Keil,
    You might need to sign up with your Adobe ID and password at "https://cloud.acrobat.com/convertpdf"
    Then you can choose the desired files to create the PDF.
    Now, let me know what error message do you get while doing the same.
    What kind of files are you trying to convert to PDF?
    Have you checked with your internet connection and tried using a different browser?
    Hope to get your response.
    Regards,
    Anubha

  • [CS5.5] Lock PDF export and print presets

    Hi,
    With this post I would like to ask a question regarding locking certain features in Indesign.
    Does anyone know if it is possible to ...
    - lock PDF export and print presets so a user is not abble to change/override any preset properties, and is forced to use a preset without the possibility to override any of the properties when using it?
    - force a user to use one of the predefinied presets to print or export a document without the ability to create a new preset?
    - verify PDF-files to check what Indesign print/export preset was used?
    Being part of a larger prepress team, we would like to make sure that, every PDF-file created by each team member, is created with the same specs.
    Does anyone know of any plugin, tool or release that enables such a functionality?
    Kind regards
    John

    If the employees cannot follow company policy, they need to know that there are other people looking for work who can. Yes, mistakes happen, but that would be a case of choosing the wrong preset from a list (which, if you leave more than one installed, can't be avioded). Changing settings against policy is not a mistake.

  • PDF Export And Printing Problem

    I am using VB 2005 and the Crystal Reports that is bundled with it. I have reports on my website in the Crystal Report Viewer. I have the tool bar showing the Export and Print buttons. When you try to print (or export to PDF) you get an error from Adobe Reader "Adobe Reader could not open 'AcrXXX.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."
    I can see the file in my temp folder on my c-drive and the file (AcrXXX.tmp) does not contain a pdf instead it contains html for the report (including the report viewer). I tried deleting everything in my temp folder and I still get the error. My desktop is Adobe Reader 8.0 and IE 6 and Windows XP.
    The same code will create the PDF on all development and test web servers just not on my production server.
    I have no problem exporting a report to Word.

    Hello Wendy,
    if you are not too sure whether this errro is CR or VS related pls simply try to use one of our samples and see if you can export from htere or if you get the same error:
    Sample site for NET:
    https://boc.sdn.sap.com/dotnet/samples
    general docu:
    https://smpdl.sap-ag.de/~sapidp/012002523100005853792008E/walkthrough_supportfiles.zip
    specific samples:
    https://smpdl.sap-ag.de/~sapidp/012002523100006252712008E/csharp_web_smpl.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100006252812008E/net_web_smpl.exe

  • Generate a PDF export and getting the file or the bytestream to modify it

    Hi everybody
    I have a web dynpro application and want to get the bytestream or the PDF file itself.
    Is there a function (RFC, J2EE-Method, ABAP methode/class) where I can say
    "Hey function, generate a PDF export of a BI report and save the PDF file <br>somewhere in the KM or return the bytestream of the PDF"
    I must be able to define following parameters
    -BI template name
    -values for the selection mask (the same as the BEx BI-Commands to prefill a field in the selection mask)
    -KM path + filename (if the function saves the file in the KM)
    What I already tried:
    Broadcast to KM
    I can start the broadcast automatically using the report RSRD_BROADCAST_STARTER. But the problem is that I can't generate a broadcast setting and so I'm not able to define the filename and selectionmask data dynamically.
    Package RSRD
    When you enter the transaction SE80 and look for the package "RSRD" there are a lot of interesting classes and methods. But I couldn't figure out how to call them to generate a PDF export of a BI report.
    FM RSADOB_PDFREPORT_GENERATE
    This function module have all the parameters I wish. The problem is that it does not work anymore. It's just an internal test for the SAP guys themselves.
    So ...
    Have anybody an idea how to solve this?
    How to generate a PDF export of a BI report and fill the selection mask and get the PDF (as bytecode or file in the KM) ?
    Thanks lot
    Klaudio

    hi,
    Like you said.. steps are simple and clearly mentioned in guide.
    1. create a variable of type string
    2. after configuring the file adapter , go to corresponding receive activity , go to properties tab
    3. search for a property with name as jca.file.FileName . This basically keeps track of file name
    4. for this property, give the value as name of variable created in step 1 above
    5. Use this variable anywhere in assign / transform
    HTH,
    Ketan

  • Problem printing pdfs exported from IDCS3 to hp color laserjet 2550L

    Since upgradingn to IDCS3, whenever I print a pdf exported from ID to my hp color laserjet 2550L, the graphics print with a red overlay and other colors change as well (black type prints brown, blue prints maroon). If I print the file to a .ps file, then distill it, I don't have the problem. If possible, I prefer to export because it's quicker. Is there a fix to this?
    Thanks in advance!

    Check the HP site for a newer driver for your printer.

  • Problem in client export and import (SCC8)

    Hi,
    I was asked to copy client 300 data on one AIX server to client 210 on another AIX server.
    I have done the client export thru SCC8,
    transferred those files to other server thru ftp,
    added those requests to the import queue on target server.
    As and when the request is added to the import queue, the status is being shown in red. Is there a problem with this.
    And when i imported the request it got cancelled and the message in log says
    the data file is damaged,but the other request(HPRKX00006) is still running.
    It has taken a lot of time,so we deleted the data and cofiles related to the requests
    and retransported them from source machine.
    Even after that the status of the request is shown in red when added to the import queue, and dosent allow to import because the subsequent request is still running
    and gives an error saying the request HPRKX00006 is still running.
    Suggest a suitable solution.
    pradeep.

    Hi,
    Is your problem solved. Currently I am facing the same issue.
    Please let me know what have you done if the issue is resolved.
    Regards
    Sharath

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

  • Pages to PDF export and text not showing

    I exported a pages document from Pages to PDF and I can not see the text???
    Font is Tex Gyre Adventor and it is in the color white with a shadow and a tangerine box backdrop
    Thoughts? - Thanks!!

    I'm not sure exactly why this happened, but I think I might have some reasons why.
    Maybe try changing the color of your text to another color instead of white and see if that works. Or maybe try changing the background from tangerine to something else and see if anything changed once it is converted to a PDF.
    Another reason is maybe you did it completely wrong when you converted it. I'll explain how to, incase you completed any steps incorrectly.
    1) At the top of your screen, press "File" then "Export". At the top, make sure the "PDF" option is selected and not anything else like "Word" or "ePub" or any of the other options.
    2) Select the image quality. Perhaps adjusting this to "Best Quality" rather than just "Good" will help in being able to see the white text. I don't know, just a suggestion.
    3) Press "Next" which should be flashing in a light blue color.
    4) Save your PDF where you want it and call it what you want.
    5) Now press "Export"
    6) Open the PDF document and see if anything changed.
    Sorry if I haven't been much help but just see if that works.
    Another thing I will suggest is to try printing it out and seeing if the text is visible and that might help out.
    I'd also suggest, finally, start all over again with converting and follow the steps above, and see if anything changes.
    Hope I could help, sorry If I didn't.

  • Script that worked in CS does not work in CS4 - multiple open page, print , pdf export and close

    I had a script that worked great for me in Indesign CS. But now does not work in CS4. Anyone knows what needs to be done to make it work again ?
    When I drop folder with indesign files on top of this script:
    1. opens first page
    2. turns specific layer on
    3. prints using preset
    4. exports using preset
    5. close without saving
    6. next page
    Anyone who can give me solution or idea how this should work is greatly appreciated.
    on open sourceFolders
    repeat with sourceFolder in sourceFolders
    tell application "Finder"
    try
    -- If you would like to include subfolders, you say - every file of entire contents of folder…
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias list
    on error -- work around bug if there is only one file
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias as list
    end try
    end tell
    if idFiles is not {} then
    tell application "Adobe InDesign CS4"
    set user interaction level to never interact
    repeat with i from 1 to count of idFiles
    open item i of idFiles
    tell document 1
    try
    set visible of layer "ImagesTag_Layer" to true
    end try
    set myPreset to "letter size" -- name of print style to use
    with timeout of 700 seconds
    print using myPreset without print dialog
    end timeout
    set myPreset1 to "pdf preset name" -- name of pdf export style to use
    set myName to the name -- name includes .indd should remove at some point          
    with timeout of 700 seconds
    export format PDF type to "users:temp:Desktop:pdf:" & myName & ".pdf" using myPreset1 without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
    end timeout
    close without saving
    end tell
    end repeat
    set user interaction level to interact with all
    end tell
    end if
    return 10 -- try again in 10 seconds
    end repeat
    end open

    (Disclaimer: me not an AS guy!)
    First thing I noticed is the interaction level is set off. If you comment out this line
    set user interaction level to never interact
    you might be able to pinpoint the exact error -- ID will display a standard "failed" dialog, hopefully showing the line that it fails on.
    A quick question: the script assumes two presets in your InDesign: one for print ("letter size") and one for PDFs ("pdf preset name"):
    set myPreset to "letter size" -- name of print style to use
    set myPreset1 to "pdf preset name" -- name of pdf export style to use 
    Do these actually exist in your CS4, with the same (non)capitalization and spaces?

  • I Paid for PDF Export and the files are not converting correctly

    I purchased PDF Export to take a PDF file and convert it to a text file so I could import it into excel, when doing so I get a bunch of extra symbles plus the numbers that i'm trying to convert are not complete.

    Could you try disabling the 'Recognize text' function and convert the file again?
    Let us know how it goes!
    -David

  • Keynote PDF Export and Color Profile

    I have some color trouble with the pdf-exports of keynote: the color that is shown in the pdf does not correpond with the one in the keynote file. The pdf has more ”milky” colors. Maybe it is a color profile thing. But what profile doese keynote use for the screen? Or does it convert rgb-colors to cmyk? Anyway, how to sync exactly keynote and pdf colors for screen presentations?

    There are a few things you can try:
    In the PDF export box there is an Image Quality dropdown, where you can choose Good, Better or Best. Which are you using?
    Alternatively you can just output the file as a PDF using the Print function. Your profile says you are using Mac OS X 10.4 in which case, in the print window click on the PDF button and choose Compress PDF to output a smaller file.
    If you have since moved up to 10.5, this option is no longer available by default, but there is an Automator action that restores it here : http://www.apple.com/downloads/macosx/automator/compresspdfworkflow.html
    The other thing to check is whether your graphics are at the actual size you need them or if you have scaled down a big picture, for example. The PDF will still contain information for the full-size image.
    Re-sizing them in something like Photoshop to the size you need first before placing them in the presentation may help.
    Finally, if you have Acrobat (Pro, not just the reader) you can use the Reduce File Size option in the FIle menu to compress the PDF you get from Keynote.
    Post back with how you get on.

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

Maybe you are looking for