Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 526567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:47:26+00:00 2026-05-13T08:47:26+00:00

We are using a product called DynamicPDF to generate PDF’s on the fly from

  • 0

We are using a product called DynamicPDF to generate PDF’s on the fly from dynamic data from a database. Their documentation says that their software leaves the image bytes intact and doesn’t make any changes. Despite this, we have observed that the images we add seem to have quality loss on the resulting PDF output (at least that’s how they look). So my question is what do I need to do with the DynamicPDF API to ensure that the image quality output is equal or close to what I put in?

We are using Version 5.1.2 Build 13650, below is the code that we use to add the image.

private void plcImageMain_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
{
 if (e.LayoutWriter.RecordSets.Current.HasData)
 {
         string productId = e.LayoutWriter.RecordSets.Current["ProductId"].ToString();
         string imgUrl = base.SetImageUrlParams(e.LayoutWriter.RecordSets.Current["ImageUrl"] as string, e.ContentArea.Width, e.ContentArea.Height);

         System.Drawing.Bitmap bm = base.GetBitmap(imgUrl);

         ceTe.DynamicPDF.PageElements.Image img = new ceTe.DynamicPDF.PageElements.Image(bm, 0, 0);
         img.Height = e.ContentArea.Height;
         img.Width = e.ContentArea.Width;
         e.ContentArea.Add(img);
 }
}

/// <summary>
/// Gets a bitmap from the requested image url
/// </summary>
/// <param name="imgCtrl"></param>
/// <param name="imgUrl"></param>
protected System.Drawing.Bitmap GetBitmap(string imgUrl)
{
 // TODO: Add some validation to ensure the url is an image.
 System.Net.WebRequest httpRequest = System.Net.HttpWebRequest.Create(imgUrl);

 using (System.Net.HttpWebResponse httpResponse = httpRequest.GetResponse() as System.Net.HttpWebResponse)
 using (Stream imgStream = httpResponse.GetResponseStream())
 {
    System.Drawing.Bitmap bm = System.Drawing.Bitmap.FromStream(imgStream) as System.Drawing.Bitmap;
    return bm;
 }
}

[Edit]

Here is the before and after screenshot.

[Edit]

Code using GetImage (why so slow?)

protected ceTe.DynamicPDF.Imaging.ImageData GetImageData(string imgUrl)
{
   ImageData imgData = null;
   using (System.Net.WebClient wc = new System.Net.WebClient())
   {
     imgData = ImageData.GetImage(wc.DownloadData(imgUrl));
   }
  return imgData;
}

GetImageData ("http://s7d2.scene7.com/is/image/SwissArmy/cm_vm_53900E--111mm_sol_front_a?fmt=jpeg&wid=400&hei=640");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:47:26+00:00Added an answer on May 13, 2026 at 8:47 am

    You were both right that it was Acrobat that was causing the fuzzy display. There is a setting in preferences called resolution, instead of using the System dpi setting by default Acrobat decided to use a custom dpi setting of 110 (I have no idea why!?!?). After setting it to system (in my case 96dpi) the images were crystal clear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 309k
  • Answers 309k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's not perfect, but you could probably do something like… May 13, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer Android provides its own API and only a subset of… May 13, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer Solr is built for searching - it is optimized for… May 13, 2026 at 9:54 pm

Related Questions

We are using CruiseControl.net and we are looking into moving to team city but
I have a COM inproc DLL that we are using in our product. Now
We are using VS2008 native Installer to set up our product. During both installation
Is it possible to generate a report from Visual Studio 2008's integrated unit tests?
Lets say you have an action method to display products in a shopping cart

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.