Text looks jagged when converting PDF to image using Cocoa on Leopard

Hello,
I have a program that composites the pages of a PDF into a single image with each page stacked on top of each the previous one. The program works fine, but the font rendering quality is much lower when run from anything but a Snow Leopard system. In Leopard, the text looks jagged and not antialiased properly. Does anyone know a fix for this? Here is my code.
NSString* path = [[oPanel filenames] objectAtIndex: 0];
NSPDFImageRep *pdf = [NSPDFImageRep imageRepWithContentsOfFile: path];
int pageHeight = 765;
int pageWidth = 990;
int pages = [pdf pageCount];
int height = pageHeight * pages;
NSImage *compositeImage = [[NSImage alloc] initWithSize:NSMakeSize(pageWidth, height)];
[compositeImage lockFocus];
for (int i = 0; i < pages; i++) {
[pdf setCurrentPage: i];
NSImage *page = [[NSImage alloc] init];
[page addRepresentation:pdf];
NSSize size = [pdf bounds].size;
int width = round(pageHeight * size.width / size.height);
[page drawInRect: NSMakeRect(0, height - pageHeight * (i + 1), width, pageHeight)
fromRect: NSZeroRect
operation: NSCompositeSourceOver
fraction: 1.0];
[page release];
[compositeImage unlockFocus];
NSBitmapImageRep *rep = [NSBitmapImageRep imageRepWithData: [compositeImage TIFFRepresentation]];
NSData *imageData = [rep representationUsingType: NSJPEGFileType properties: nil];
[imageData writeToFile:@"/Users/devongovett/Desktop/out.jpg" atomically: YES];
Thanks for any help you might be able to give!
Devon
Message was edited by: devongovett
Message was edited by: devongovett

devongovett wrote:
The program works fine, but the font rendering quality is much lower when run from anything but a Snow Leopard system. In Leopard, the text looks jagged and not antialiased properly.
Without knowing anything about how to draw into a PDF in code: the problem might not be in your code but in Leopard's rendering.
I bet you are testing just with Apple's own Preview app -- can you test with something else, for example, the Acrobat Reader, on both systems? There is a good chance your image is just fine.

Similar Messages

  • Text looks Blurred when there is a Image on Page.

    Not all the time, but some text looks blurred when there is a Image, even if i export it as PDF it remains the same. Can anybody help me how to fix it?

    Screen shot for your reference.

  • Why does all alphabets change to capital when converting pdf to word using Adobe Acrobat XI

    Why does all alphabets change to capital when converting pdf to word using Adobe Acrobat XI

    Word 2013 uses its own pdf creator engine as far as I know. The step I performed were:
    1 - In the save settings I told word to embed fonts (sorry for the language, I have the Italian client)
    2 - Export from Word -> Save As -> .pdf adding also the table of contents/index
    N.B. I cannot use PDF/A, and in any case it doesn't embed the font
    A working solution is to use Acrobat XI to convert it or print with Adobe PDF printer, results:
    The problems are 2:
    1 - It doesn't create any bookmark and doesn't create links from the table of images to the linked images
    2 - Images, also with the preset "High Quality Printing" customized using "No compression", are really ugly and if you zoom a bit more than 100% they totally be s**t. It wasn't that way with PDF created by word.
    In the end, or I find they way to open the pdf created by word and embedd the missing font, or I find a way to make Acrobat XI creating bookmarks from the word file.
    Suggestion?

  • Why do images within a PDF look jagged when viewed in Acrobat Pro 10.1.6?

    Using a MacBook Pro running Mac OS version 10.7.5 with NVIDIA GeForce GT 650M 1024 MB graphics card. High-resolution source images look fine in other software, and embedded images in a PDF look fine when viewed on Google Drive, but curves and diagonal lines look jagged when viewed in Acrobat Pro 10.1.6. Checking smoothing options in Preferences only adjusts the position of the jagged edges; it neither enhances nor ameliorates them.
    I created a sample PDF to illustrate the problem I'm having. Created in illustrator, exported to PNG and converted to PDF. Here is a screenshot of the source PNG side-by-side with the PDF I created from it:
    Please note that when I preview the PDF in Finder, and when I view the PDF in Chrome using Google Drive, the image looks fine. Here's a link to the sample PDF:
    http://www.sendspace.com/file/77f5m6
    Any assistance is appreciated. Thanks!

    Unfortunately, as I mentioned in my original post, I've already tried toggling smoothing options. They don't make the jagged edges go away—they just change them slightly. In some cases, as with the sample file provided, it does help smooth the art out, but it never looks as good as it did going in, in a recent project, toggling smoothing options didn't affect the appearance of the image at all. Zoom does not appear to relieve the artifacting.
    A little clarification: this PDF was created from a flat PNG, but I have had this issue with PNGs and TIFFs as well, generated by both Photoshop and Illustrator. To reiterate, the PDFs display fine in other software—Finder preview looks great, and the same file viewed in my browser via Google Drive looks as intended as well. A colleague was able to replicate this issue in Acrobat on his Windows machine. This appears to be a rendering issue specific to Acrobat with regards to the files I use it to create.

  • Why do i always get conversion failure when converting pdf files to xls in exportpdf program?

    I have had export pdf for months.  I cannot export pdf files to excel files.  It always says conversion failure. Anyone have any idea why this is happening?  I am so frustrated!  This was supposed to make my payroll reports easier, but it has not helped at all.

    Hi denise/sharon,
    I can understand your frustration. Are you converting via the ExportPDF website, or from within Adobe Reader? Does the conversion failure occur every time that you try to convert a file (has it ever worked for you)?
    Since you're talking about payroll, I'm assuming that you're accessing ExportPDF from a corporate computer. You may want to check with your IT department to make sure there are no firewall/proxy settings that limit your access to the Internet.
    Also, make sure that you're using a supported web browser. You can find a list here: System Requirements | Adobe Acrobat Pro and Online Services
    Finally, if you're using Reader, you can try disabling OCR (optical character recognition) by following the steps in this document: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel.
    Please let us know how it goes.
    Best,
    Sara

  • ExportPDF does a poor job when converting pdf tables to MS Excel tables - Any advice?

    ExportPDF does a poor job when converting pdf tables to MS Excel tables.
    The resulting file had several lines merged into one and had strange font sizes and line heights and widths.
    If needed, I can send both files to show what happened.
    I am using Adobe Reader 10.1.4, with Adobe ExportPDF (unknown version, bought Oct 4, 2012), MS Excel for Mac 2011, version 12.2.2 (120421) on a MacBook Air with Mac OS X version 10.7.4.
    Best regards,
    Pedro

    I have the same problem. I would like to convert bank statements to Excel but am only interested in the transaction history. Is it possible to select only certain parts of the document as a template for other conversions?

  • Timeout error when converting PDF to Word

    Is anyone available?  I have a time sensitivity project - that would be simple for most folks...Need a question answered

    Hi Sara,
    my PDF cannot be read by Adobe after all. I have tried with one page but
    it still cannot read it. I would like to return the programm because it
    doesn't help to solve my task. Please be so kind and advice how I can
    return it because I will not use it.
    Kind regards,
    Marie  Schechter
    Am 09.06.2014 19:35, schrieb Sara.Forsberg:
    >
          Timeout error when converting PDF to Word
    created by Sara.Forsberg
    <https://forums.adobe.com/people/Sara.Forsberg> in /Adobe ExportPDF/ -
    View the full discussion
    <https://forums.adobe.com/message/6444999#6444999>

  • I applied some edits to my photo using iOS 7's default photo editor. It looks great when I preview the image on iPhone, but I cannot export the edited photos onto my PC. Anyone know how can I do this?

    I applied some edits to my photo using iOS 7's default photo editor. It looks great when I preview the image on iPhone, but I cannot export the edited photos onto my PC. Anyone know how can I do this?

    yeah, in itunes if you select your phone, you should get tabs across the top for what to sync, under photos uncheck the box
    EDIT: http://support.apple.com/kb/HT4236 is the link to a apple support document with information on syncing photos using itunes.
    Message was edited by: WYSWYG

  • Converting PDF to word using OCR

    How do I convert a PDF file to Word format without the text changing on the Word document?

    Hi IBEW45,
    OCR is enabled by default when you convert a PDF to Word via the ExportPDF website. Just make sure that you're selecting the correct language for character recognition.
    If you're converting to Word from within Reader, it is possible to disable OCR. If you're encountering issues where there are odd characters in the converted Word file, you may be running into font issues. A good troubleshooting technique is to disable OCR. Here are the instructions: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel.
    Please let us know how it goes.
    Best,
    Sara

  • Problem in creating client side PDF with image using flex and AlivePD

    I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
    Thanks in advance
    Atishay

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Can I convert PDF to PPT using adobe acrobat x standard? If so, how?

    Can I convert PDF to PPT using adobe acrobat x standard? If so, how?

    Hi meganl52100253,
    With Acrobat X, you can save to Word and Excel format by choosing File > Save As. But saving to PowerPoint wasn't introduced until Acrobat XI.
    You're welcome to try Acrobat if you'd like. You can download a free 30-day trial from http://www.adobe.com/products/acrobat.html.
    Best,
    Sara

  • Anti-aliased text when exporting PDF to image

    I need to be able to batch-convert multi-page PDFs to individual bitmap images (one image for each page) with anti-aliased text.
    Photoshop works this way if you open a single PDF, allowing you to select one or more pages to rasterize as separate images, but not when batch processing (specifically, if you use the Image Processor script on a folder of images and PDFs, it will rasterize the PDFs automatically, but it will only do so with the first page of each PDF.)
    Acrobat, on the other hand, automatically creates an image for each page when exporting, and can do this in a batch sequence, but the text is not anti-aliased, making the image look like a screenshot from 1997. No matter how high an image resolution you select, the text is still jagged when you zoom in.
    So, is there a setting I'm missing that will allow the text to be anti-aliased when using Acrobat to export PDF to an image? I am using Acrobat 8, not 9, so something might have changed in the newest version.

    Not sure about Acrobat Pro 8, but in Acrobat Pro 9 (not Extended) you can Export>Image>Multiple Choice: JPEG, JPEG2000, PNG, TIFF.  I used JPEG and under the options in the export dialog box, leave the filename as is to coincide with the PDF filename and then choose Maximum Resolution under File Settings: Grayscale (JPEG, Quality:Maximum); Color (JPEG, Quality:Maximum) . . . skip down to Conversion Colorspace: Determine Automatically and Resolution choose 600pixels/inch for a letter size document.  This will result in a file size of 1.3MB per JPEG image if there is not a lot of information on the page.  I chose a simple header, footer with page numbering, and 5 lines of Lorem Ipsum text.  600dpi is overkill, you can go for 300dpi and still result in a decent image that will be able to be printed on a laser photocopier that is connected to a production computer.  Obviously if you are printing to a laser printer or a high quality inkjet 300dpi will suffice as well for a letter sized document.  But I have been told that 300dpi is not a standard rule of thumb and you must obtain specs from your printer since he/she can calculate by very strict rules the dpi you need for your content.  It depends on whether you have background images such as watermarks and also if your text body contains line-art.

  • Text quality bad when converting from word 2010 to pdf

    Hi,
    When i convert from .docx to -pdf the text quality gets bad, i dont get the problem when printing to pdf though.
    Quality in Word:
    Quality when converted to pdf:
    Can't figure out whats wrong?

    What version of Acrobat (and subversion)? Are the fonts embedded in your file?

  • Vectors printing jagged when placed over raster images

    I am fixing a previously designed flyer for a reprint. On the last print, any vector object placed on top of the raster image was very noticeably jagged. This included both white text, which simply had jagged edges, to colored text, which had white jaggies as well. Drawn vector objects and clipping paths in jpgs were also jagged.
    I used InDesign CS3 to create it, but I outlined the type, embedded all the images and exported as a .pdf (my project manager insists on this; so maybe it's not even an ID issue).
    It looks fine when I print it on my hp LaserJet 2550n or the office's Canon iR 2800i - but that's never been a good way to tell how it's going to turn out at the end.
    I know just making it all in Photoshop is probably the safest option, but I would really like to keep the sharpness of the vectors, and I've got Character/Paragraph styles etc going that would be a pain to redo in Photoshop. Plus, copy+pasting it into Photoship creates pdf/vector object that looks just as horrid (on screen - it looks the same when I print it on the above-mentioned printers, but I'm still paranoid).
    Thanks for taking the time to read this and for any help you are able to offer!
    Lisa

    Peter, thank you for your reply. I really appreciate the help.
    Generally, I use the default settings for [Press Quality], since I don't have a complete understanding of all the settings. I have appended the .txt pdf setting summary at the bottom of this post.
    I'm aware that outlining type is supposed to be unnecessary but 1) my project manager insists on it because he doesn't want to deal with any kind of font problems (maybe if this is at the root of the problem it will push him to accept it), 2) I'm using Fontin & Fontin Sans by Jos Buivenga (a high quality free font) and the ligatures/alternate characters
    sometimes don't show correctly when printed (replaced by a ?) or viewed on another computer without the font.
    Yes, I embed the images into the ID document (Links - embed images). This is only because my project manager insists on this as well. It is unnecessary to do this when saving to a .pdf, correct?
    Here are the settings I generally use when exporting a pdf to send to the printer (who do not specify any kind of settings):
    Description
    Use these settings to create Adobe PDF documents best suited for high-quality prepress printing. Created PDF documents can be opened with Acrobat and Adobe Reader 5.0 and later.
    PDF Preset: [Press Quality]
    Compatibility: Acrobat 5 (PDF 1.4)
    Standards Compliance: None
    General
    Pages: All
    Spreads: Off
    Generate Thumbnails: Off
    Optimize PDF: On
    Create Acrobat Layers: N/A
    Export Layers: Visible and Printable Layers
    Include Bookmarks: Off
    Include Hyperlinks: Off
    Export Nonprinting Objects: Off
    Export Visible Guides and Baseline Grids: Off
    Create Tagged PDF: Off
    Include Interactive Elements: Off
    Multimedia: N/A
    Compression
    Color Images
    Bicubic Downsample at: 300 ppi
    for images above: 450 ppi
    Compression: Automatic
    Tile Size: N/A
    Quality: Maximum
    Grayscale Images
    Bicubic Downsample at: 300 ppi
    for images above: 450 ppi
    Compression: Automatic
    Tile Size: N/A
    Quality: Maximum
    Monochrome Images
    Bicubic Downsample at: 1200 ppi
    for images above: 1800 ppi
    Compression: CCITT Group 4
    Compress Text and Line Art: On
    Crop Image Data to Frames: On
    Marks and Bleeds
    Crop Marks: Off
    Bleed Marks: Off
    Registration Marks: Off
    Color Bars: Off
    Page Information: Off
    Page Mark Type: Default
    Weight: 0.25 pt
    Offset: 6 pt
    Use Document Bleed Settings: Off
    Bleed Top: 0 pt
    Bleed Bottom: 0 pt
    Bleed Left: 0 pt
    Bleed Right: 0 pt
    Include Slug Area: Off
    Output
    Color Conversion: Convert to Destination (Preserve Numbers)
    Destination: Document CMYK - U.S. Web Coated (SWOP) v2
    Profile Inclusion Policy: Don't Include Profiles
    Simulate Overprint: N/A
    Output Intent Profile Name: N/A
    Output Condition: N/A
    Output Condition Identifier: N/A
    Registry Name: N/A
    Advanced
    Subset Fonts Below: 100%
    Omit PDF: Off
    Omit EPS: Off
    Omit Bitmap Images: Off
    Transparency Flattener Preset: N/A
    Ignore Spread Overrides: N/A
    Security
    N/A
    Warnings

  • Compressing Video for DVD Burn Makes Text Look jagged

    Hello,
    I'm currently at the final steps of a lengthy video production project and am struggling to make the text elements of my finished video display correctly after compression prior to burning it to DVD.
    I create and produce music for a living and don't have nearly as much experience with video editing. I'm a bit new to all of this and am using FCE 4.0.1 to create my video & Compressor and DVD Studio Pro 2 to compress and author video for DVD.
    *My main issue is this:*
    I'm using an imported still image as the title card for my film. It's a mixture of large plain Helvetica Neu font text with some additional stylized lettering created in Photoshop (which is why I'm not using FCE's built-in text generators for the title card). The typography isn't very wild and crazy, it's basically big bold letters and a few gentle curves. I exported the image (1200x600) from Photoshop as a .png and imported it into FCE.
    When I export my finished video file (.png title card and all) out of FCE, I export it as a raw uncompressed Quicktime file:
    Apple Intermediate Codec 1440x1080i
    29.97 fps
    Pixel Aspect Ratio: HD (1440x1080) (Anamorphic not checked).
    Field Dominance: Upper (Odd).
    (It displays in quicktime at 1920x1080 though.)
    After initially exporting from FCE, the title card image and all the other text in my movie created from FCE's built-in text generators look fine. It's only after I compress the finished movie in DVD Studio Pro or Compressor that I get jagged looking edges on the curves of my letters, primarily the title card image (the text generated by FCE's generators holds up okay).
    In compressor I'm using the "MPEG-2 6.2 Mbps 2-pass settings for DVD" preset and in DVD Studio Pro. Using '2 pass VBR', 'Best' motion tracking, 'best' and 'highest quality' on all the compression settings I can find. I'm encoding at a total rate of 6.5Mb/sec max and 6Mb/sec average. These are standards for compressing to DVD and since I'm preparing a master for reproduction, I've been told I shouldn't increase the data rate over this or I'll run into player compatibility issues down the line.
    Any ideas on how I can make this text image last through the compression process and still look clean and crisp without having to increase the data rate of compression? I'm going to play with different file formats for now, but it that doesn't work I don't know where to go from there.
    Thank you for any help insights you can provide.

    I started with a variety of HD raw footage (most of it gathered on Canon 5D Mkii SLR Digital camera in the form of: H.624 1920x1080) but converted all my raw footage prior to editing into:
    Apple Intermediate Codec 1440x1080i
    29.97 fps
    Pixel Aspect Ratio: HD (1440x1080) (Anamorphic not checked).
    Field Dominance: Upper (Odd).
    I edited everything in Final Cut Express 4.0.1 using the AVCHD Apple Intermediate Codec 1440x1080i60 at 29.97 fps sequence preset.
    When I finished editing all my video I exported it as a raw uncompressed quicktime file which is also:
    Apple Intermediate Codec 1440x1080i
    29.97 fps
    Pixel Aspect Ratio: HD (1440x1080) (Anamorphic not checked).
    Field Dominance: Upper (Odd).
    But when played in quicktime this finished video displays at 1920x1080, which I'm happy with. (I'm assuming this is the proper behavior of Apple Intermediate Codec? It seemed to take 1920x1080 footage, converted it to 1440x1080, and then spit it back out as 1920x1080 after the whole editing process.)
    But seeing as how my issue is with an image file I'm creating in Photoshop and importing into my video sequence, I don't quite understand how the rest of my footage would really effect it. I've made sure to create the image using the same dimensions and pixel aspect ratio as my sequence frames by using one of the standard Photoshop screen templates (HD widescreen 1440x1080). I save my title card image as a non-interlaced .png file and import it into FCE.
    When I place the imported image on the timeline, FCE doesn't resize it because it matches the frame dimensions of the sequence. When I view the image at 100% in FCE's viewer all of the image's lines, curves, and shapes display properly as they appear in my original photoshop file.
    But for some reason FCE treats this imported .png image file as a 'rendered proxy.' So while it looks fine in FCE prior to rendering and exporting, when I export the video sequence containing this newly imported title card image, the resulting uncompressed quicktime file contains jagged horizontal lines across some of the characters in the title card image. It almost looks as if there's some interlacing issue going on.
    However after much experimentation and trial and error I landed on a custom compression setting in Compressor that seemed to take care of this issue. I did as you recommended and selected a high quality 7.5 Mbps encoding preset (7.5 Mbps max/6.4 Mbps average), but noticed a 2 pass VBR rendered better results. What really seemed to do the trick was adding a deinterlace filter to the compression preset, and that miraculously seemed to eliminate the jagged lines in my title card image, restoring it to its original appearance (at least during my initial inspection in Compressor's preview mode).
    After letting Compressor crank away, I looked at the finished compressed video in quicktime and the jagged interlaced-looking lines in my title card image have returned. Compressor's preview was somehow misguided.
    Now my plan is to burn this compressed video to a DVD and view it on a TV to see if maybe these jagged lines in the final compressed version are only being caused by viewing on my computer's monitor. I'm hoping this is the case, otherwise I'm at a loss of what to do next.
    If you need any more details please let me know. Otherwise I hope this is enough to give you a better idea of what issues I'm dealing with.
    Thanks again for your insights.

Maybe you are looking for

  • ZCM and Windows 8

    Hi all, I have ZCm 11.2.3a running nicely with my Windows 7 workstations. Management is now on the move and wants to deploy Windows 8.1 on our devices. So far, I have stalled this move as ZCM does not support 8.1, but they want to know when we can ex

  • Data Collection in APS

    Hi, We have both the APS and OPM applications on the same instance. We have run data pull program. The required data such as organizations, items & formulas are coming into APS. But, item forecasts entered in Forecasting form of OPM Process Planning

  • Asset postings through PO

    Friends, we have purchased one asset through PO, but in PO we forget to give the transaction and asset number, now this cycle is completed and we have utilised the excise also. user not able to reverse the entire transaction. how to capture this asse

  • Sync Inventory Database

    I'm running ZFD32 SP3 on a 51SP7 server. To sync the inventory database with the nds one I ran startser ndslookupfordb which ran fine and created a lok file. When I ran the dbdelete command and looked at the log, I found that there were about 10 entr

  • Can someone help me with my Zen Mi

    ok i have a problem. this just started recently. when i plug my Zen Micro into My computer, it used to recognize it and i could put songs on it. after using it in Removeable Disk Mode, i plug it in (to put songs on it) and it wont even recognize it.