Articles in this section
Category / Section

How to convert TIFF to PDF in C#, VB

2 mins read

How to convert small TIFF to PDF

You can get TIFF images frame by frame using the PdfBitmap class. Frames can be drawn using the DrawImage method in PdfGraphics at the size of the TIFF image's PhysicalDimension.

Please refer to the code snippet to draw the TIFF images frame by frame:

C#:

// Get the image stream and draw frame by frame
using (var tiffImage = new PdfBitmap(docStream))
{
int frameCount = tiffImage.FrameCount;
 
for (int i = 0; i < frameCount; i++)
{
// Add the page
var page = document.Pages.Add();
// Page settings
document.PageSettings.Margins.All = 0;
 
// Create graphics
var g = page.Graphics;
tiffImage.ActiveFrame = i;
 
// Draw tiff frame
g.DrawImage(tiffImage, 0, 0, tiffImage.PhysicalDimension.Width, tiffImage.PhysicalDimension.Height);
 
}
}

 

Sample Link:

https://www.syncfusion.com/downloads/support/directtrac/general/PdfTiffImage-215801194.zip


Note:

Starting with v16.2.0.x, if you reference Syncfusion&reg; assemblies from a trial setup or from the NuGet feed, include a license key in your projects. Refer to the link to learn about generating and registering the Syncfusion&reg; license key in your application to use the components without a trial message.

 

Conclusion

I hope you enjoyed learning about How to convert TIFF to PDF in C#, VB.

You can refer to our PDF feature tour page to learn about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied