Quantcast
Channel: Aspose.Pdf Product Family
Viewing all 3131 articles
Browse latest View live

Tiff to PDF (multiple pages tiff, some portrait, others landscape)

$
0
0
Hi,
Ive been searching the forums, but im unable to find an answer.

Problem:
I have a TIFF file which I need to convert to PDF.
The TIFF file consists of pages of both portrait and landscape format.

When I only have 1 page in my TIFF I have been doing the following:

Dim sec As Section = pdf1.Sections.Add()
Dim myimage As New Bitmap(ms)

        If myimage.Width > myimage.Height Then
          sec.IsLandscape = True
        Else
          sec.IsLandscape = False
        End If

But how can I loop through the TIFF pages and (maybe?) add a new section for each page and at the same time determine if the page should be "landscape" or not.

Sample JPEG produces blank PDF

$
0
0
We use Aspose.PDF for converting various image files to PDF. Most all images we convert have no problem. But we've recently encountered a couple of .jpg image files that will not convert.
The files do open successfully in MS Paint and Windows Photo Viewer.

I've attached one of those for your testing (wont_convert.jpg).
Oddly enough, I have taken that same attached file and (using MS Paint) converted it to:
- .tif
- .png
- .bmp
Those all successfully convert to PDF using Aspose.PDF.

Finally, if I re-convert the .png back to .jpg (again using MS Paint), the resulting .jpg file successfully converts to PDF with Aspose.PDF.

So it appears there is something in the initial format of these troublesome files that Aspose is not recognizing.

Here's a snippet of code showing how we use Aspose.PDF for image conversion:

//Instantiate a Pdf object by calling its empty constructor
Aspose.Pdf.Generator.Pdf pdfGen = new Aspose.Pdf.Generator.Pdf();

//Create a section in the Pdf object
Aspose.Pdf.Generator.Section sec1 = pdfGen.Sections.Add();

//Create an image object in the section
Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image(sec1);

//Add image object into the Paragraphs collection of the section
sec1.Paragraphs.Add(image1);

//Set the path of image file
image1.ImageInfo.File = file;

//Set the type of image using ImageFileType enumeration
string ext = Path.GetExtension(file).ToUpper();
switch (ext)
{
case "TIFF":
case "TIF":
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Tiff; break;
case "BMP":
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Bmp; break;
case "GIF":
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Gif; break;
case "JPG":
case "JPEG":
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Jpeg; break;
case "PNG":
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Png; break;
}
pdfGen.Save(targetFile);

Thanks,
Jeff

TextBox With Arabic Support

$
0
0
Hi,

I'm new to Aspose.PDF , I wonder if it supports filling Text Box  in Arabic in Forms ? a sample would be highly appreciated..


Thanks in Advance
Emad

Feature Request

$
0
0
Older API,

http://www.aspose.com/docs/display/pdfnet/Aspose.Pdf.Generator.Segment.Segment+Hyperlink+Property

Newer API,

http://www.aspose.com/docs/display/pdfnet/Aspose.Pdf.Text.TextSegment+Class


I used to use ActivePDF but on my recommendation I made my manager agree on using ASPOSE API, we already bought few licenses. Now I am stuck at this point, i must need to add hyper links to segments without providing dimensions of text segments.

It would be nice if we can add hyperlink to page number that don't exist yet.

Now my manager is after me for a release date of product, if you can't provide me with a date for this request then I unfortunately - need to roll back and use newer ActivePDF API.


Another thing holding our project is using document.Save() method and keeping reference to objects + getting right number of pages.

Doesn't matter how long you say, just reply back with a date for above features please/

If no date will be provided till Tuesday 29th then unfortunately I will have to drop this project and stick to ActivePDF for future developments.

Much Appreciated

SVG to PDF

$
0
0
Hi Team,

I am trying to create a PDF with header and footer and a content.
Header - Will have a text.
Footer - Will have an Image aligned to right
Content - will have the SVG.

I was able to generate the header and footer.
But the SVG file width is more than the width of my PDF. How can shrink my SVG so that it fits my pdf doc width.

Below is the code which creates the pdf.
I have attached my svg file for your reference.

string headerText = GetHeaderTextForPDF(model, downloadableFileName);
 Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
 Aspose.Pdf.Generator.Section sec = pdf.Sections.Add();
sec.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.A4Height;
sec.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.A4Width;
sec.IsLandscape = true;
sec.PageInfo.PageBorder = new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.Bottom | (int)Aspose.Pdf.Generator.BorderSide.Top, 0.2F);
Aspose.Pdf.Generator.HeaderFooter hf = new Aspose.Pdf.Generator.HeaderFooter(sec);
 hf.DistanceFromEdge = 10f;
sec.OddHeader = hf;
sec.EvenHeader = hf;
Aspose.Pdf.Generator.Text text = new Aspose.Pdf.Generator.Text(hf);
hf.Paragraphs.Add(text);
Aspose.Pdf.Generator.TextInfo textInfo = new Aspose.Pdf.Generator.TextInfo { FontName = "Helvetica - Bold", FontSize = 12f };
Aspose.Pdf.Generator.Segment s1 = new Aspose.Pdf.Generator.Segment(headerText, textInfo);
s1.TextInfo.FontName = "Helvetica";
text.Segments.Add(s1);
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(pdf);
ImageStamp imageStamp = new ImageStamp(Server.MapPath(ApplicationSettings.IWLogoForPDF));
imageStamp.BottomMargin = 5;
imageStamp.RightMargin = 50;
imageStamp.HorizontalAlignment = HorizontalAlignment.Right;
imageStamp.VerticalAlignment = VerticalAlignment.Bottom;
foreach (Page page in doc.Pages)
{
     page.AddStamp(imageStamp);
}
var svgText = HttpUtility.UrlDecode(svg, Encoding.UTF8);
var svgFile = @"d:\VS 2008\svgfile.svg";
System.IO.File.WriteAllText(svgFile, svgText);
pdf.BindSvg(svgFile);
pdf.Save(@"d:\VS 2008\myPdf.pdf");

Please do the needful.

Regards,
Charan M G

Very Urgent - TextFragmentAbsorber not absorbing multiple text

$
0
0
Creating a object like this,

 var textFragmentAbsorber = new Aspose.Pdf.Text.TextFragmentAbsorber("ExampleText");

it works good but only when text is on single line but it ignores the text if it's on multi-line.

Very urgent.

Cheers

Adding headers to existing PDF documents.

$
0
0

I have a great many pdf document to add a header to. Aspose seems the ideal product to accomplish this monumental task. I downloaded the trial, got the 30 day license, installed it, wrot a console app in C# to recure thru a directory structure of PDFs. I seems to be working when all the pages in a document are in portait mode. Some of the pages in the documents are rotated 90 degrees clokwise and for these it dose not process them at all. Is there something esle I need to do rotated pages? Also, does there have to be a certain amount of space for the header of a page to be modified and if there is not, is there a way to detect the header size?

 

Page ColorType incorrect for page containing a color chart

$
0
0
Following the example here, the reported color type for the first (and only) page of the attached PDF is ColorType.BlackAndWhite.  However, the PDF clearly has colors (blue, orange, and gray) in the chart.

Trail versus purchase

$
0
0

Hi:

Does anybody know if there is a limitation on the number of PDF documents you can process with the tral version? If so, do you know what that limit is?

 

printing issue on page

$
0
0
While iterating list data and printing on pdf 
i have attached cos.pdf in this productcame in one page and product related data come on next page.

i want a solution if current page have very less space then whole data print in a new page

Please found issue on attached pdf.

extract pdf fields including checkboxes

$
0
0
Hi There,

I am trying to get all Pdf fields (textbox, checkbox, date etc). When I tried following code I am  getting 4 fields only. Am I missing something?

Aspose.Pdf.dll
Version: 9.9.0.0

Code:
 public static void Main(string[] args)
        {
            Document pdfDocument = new Aspose.Pdf.Document("..//template.pdf");
            //get values from all fields
            foreach (Field formField in pdfDocument.Form)
            {
                Console.WriteLine("Field name : {0} ", formField.PartialName);
            }

            Console.ReadLine();
        }
Result:
Filed name: Petitioner
Filed name: Respondent
Filed name: No
Filed name: Calendar

I have attached template.pdf file.

Thanks
John

System.Drawing

$
0
0
I have a requirement to combine multiple PDF documents into one PDF document to be downloaded from a web application by a user. I believe your product offers this functionality. However, the environment that our application is hosted in does not support/allow the System.Drawing namespace. Does your product use System.Drawing in the background?
This message was posted using Banckle Live Chat 2 Forum

TIFF to PDF convert - PDF filesize getting over 3 times as big

$
0
0
Hi, im trying to convert the attached TIFF to PDF using the following code:

        Dim pdf1 As Pdf = New Pdf()
        Dim sec As Section = pdf1.Sections.Add()

        Dim ms As MemoryStream = New MemoryStream(<File>)
        Dim myimage As New Bitmap(ms)

        Dim imageht As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec)
        imageht.ImageInfo.ImageFileType = ImageFileType.Tiff
        imageht.ImageInfo.ImageStream = ms
        imageht.ImageInfo.IsBlackWhite = false
        sec.Paragraphs.Add(imageht)

        Dim tifstream = New MemoryStream()
        pdf1.Save(tifstream)

---

The tif size is 285 kb
The converted PDF file is 954kb

When I set the "IsBlackWhite" to "true", the PDF filesize drops to 300kb.
But im not intererested in converting the tiff to BlackWhite.

How can I convert the TIFF to PDF without the filesize getting much bigger?

PDF files much larger with Aspose

$
0
0
My company is planning on purchasing your product for an upcoming project. We will be converting a single TIFF and multiple JPEG files into a PDF. I am using the DEMO version of Aspose to test this. We are currently doing the same task with freeware ghostwriter software. I was able to successfully convert using Aspose but the issue is the images are much larger when created by Aspose instead of ghostwriter, gswin32c. One PDF image created by ghostwriter was 1,101 KB but 6,057 KB when created by Aspose. I tried to add optimization code that I found posted on your site but it did not reduce the pdf size. Can you give me any suggestions on how to reduce the size of the PDF file generated by Aspose? I stripped out the code and created standalone vb.net code of what I am doing and it is attached.

Are the pdfs created by Aspose PDF for java 508 compatible

$
0
0
Hi,

I wanted to check if Aspose.pdf for java is 508 compatible or not. We create tables using Aspose.pdf and wanted to confirm if the tables or other components are 508 compatible.

Regards,
Rajeev

pdf to tiff conversion with highlight annotation

$
0
0
Hi!

I'm trying to render a PDF document to Tiff. When the PDF has any kind of highlight annotation like text,drop downs, the text behind it is blanked in Tiff doc. Is there anything I can do to correct this?

Thanks!

HTML conversion to PDF

$
0
0

We have to convert HTML to PDF.  Attached is the HTML and the PDF we are generating with aspose.pdf.  We are using the latest version.

The text within tables is not flowing correctly.  What needs to be done to convert the HTML as close as possible to a PDF?

J

Optimize for Web

$
0
0
I have a pdf given to me by our drafting department.  It is 1112KB in size.  If I open the document in Acrobat and take the option to "Optimize Pdf" and take the standard settings the doc is reduced to 805KB.

Whe I use Aspose PDF and use either optimize() or optimizeResources() there is no size change.

When I use optimizeResources with an OptimizationOptions class set to remove everything and compress images I can get the size as low as 1009KB if I set the imageQuality to 5...

I tried using the ximage method and the file increased to 8000KB...

All I need this to do is the same thing Acrobat does and optimize the file for the web, but all of the examples provided on the forum fall far short of this goal.

What do I need to do?

Jon

Converting PDF to Tiff file Size

$
0
0

Good Morning,

I am using the Aspose.Pdf Product Family for converting PDF To TIFF files.
During my testing I have found that after converting PDF file to tiff file , the size of tiff file in more than PDF file.
Is there any way we can reduce the size of tiff during conversion. The size of tiff is 5-6 times more than PDF file.
Please advice

Thanks,
Sachin

How to use BindFO with XslFoLoadOptions

$
0
0

How do I use the Aspose.Pdf.XslFoLoadOptions with the Aspose.Pdf.BindFO() method?

I have a complex XSL-FO style sheet that uses advanced features, and I want to tell Aspose not to use the old FO formatting engine.  From reading other forum posts, I understand that I need to create the XslFoLoadOptions, and set .UseOldXslFoEngine to "false", but I don't see any example that use the .BindFO() method.

 

Is this possible? 

 

 

 

 

 

 

Viewing all 3131 articles
Browse latest View live