Hi
I am using Amyuni pdf converter version 4 and I need to set the printer settings "Fit to Page" in the code.
I am unable to find any such properties in the cdintfnet dill.
Request to suggest me the code snippet to have "Fit to page" setting.
Thanks
Tharangini
How to set "Fit to Page" printer settings
Re: How to set "Fit to Page" printer settings
Hi Tharangini,
Sorry but I am not totally following your question? Can you elaborate slightly on what you are trying to achieve?
thanks
Sorry but I am not totally following your question? Can you elaborate slightly on what you are trying to achieve?
thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
-
- Posts: 4
- Joined: Thu May 07 2015
Re: How to set "Fit to Page" printer settings
Hi Jose
I am using the following code to convert the given excel file in to pdf.
cdiNet.EnablePrinter(_company, _code);
// Set FileNameOptions and output file name.
cdiNet.FileNameOptions = Convert.ToInt32(NoPrompt + UseFileName + EmbedFonts + MultilingualSupport + EmbedStandardFonts + EmbedLicensedFonts);
//cdiNet.FileNameOptions = Aveva.EI.Utilities.ConvertNice.ToIntegerInvariant(NoPrompt + UseFileName + EmbedFonts + MultilingualSupport + EmbedStandardFonts + EmbedLicensedFonts);
cdiNet.DefaultFileName = OutputFilePathName;
//set the paper to A4
cdiNet.SetPaperSize = 9;
// Set the PDF Printer as Default, this is needed only if you can not print to a specific printer
cdiNet.SetDefaultPrinter();
// Call the actual printmethod
PrintMethod();
// Reset the default printer to whatever it was before
cdiNet.RestoreDefaultPrinter();
How ever some times if there is only one sheet in the excel file, its been printed in to two pages (the content is divided and printed in to 2 pages of pdf file)
In my excel sheet i have 47 rows and columns up to "P" (16 columns)
This sheet is printed upto 9 columns in first pdf file and rest of the columns are going to 2nd pdf page.
I have set the all the columns correclty in "Page break preview" of excel file, then also they are getting divided in pdf file.
In AMyuni printer properties if we set the "Fit to page" property manually, then pdf file is generating proprly.
This setting i need to do in c# coding rather than doing it manually.
The corresponding c# property i am unable to find, where i need some help.
Hope this explanation is sufficient to understand the problem i am facing.
I am using the following code to convert the given excel file in to pdf.
cdiNet.EnablePrinter(_company, _code);
// Set FileNameOptions and output file name.
cdiNet.FileNameOptions = Convert.ToInt32(NoPrompt + UseFileName + EmbedFonts + MultilingualSupport + EmbedStandardFonts + EmbedLicensedFonts);
//cdiNet.FileNameOptions = Aveva.EI.Utilities.ConvertNice.ToIntegerInvariant(NoPrompt + UseFileName + EmbedFonts + MultilingualSupport + EmbedStandardFonts + EmbedLicensedFonts);
cdiNet.DefaultFileName = OutputFilePathName;
//set the paper to A4
cdiNet.SetPaperSize = 9;
// Set the PDF Printer as Default, this is needed only if you can not print to a specific printer
cdiNet.SetDefaultPrinter();
// Call the actual printmethod
PrintMethod();
// Reset the default printer to whatever it was before
cdiNet.RestoreDefaultPrinter();
How ever some times if there is only one sheet in the excel file, its been printed in to two pages (the content is divided and printed in to 2 pages of pdf file)
In my excel sheet i have 47 rows and columns up to "P" (16 columns)
This sheet is printed upto 9 columns in first pdf file and rest of the columns are going to 2nd pdf page.
I have set the all the columns correclty in "Page break preview" of excel file, then also they are getting divided in pdf file.
In AMyuni printer properties if we set the "Fit to page" property manually, then pdf file is generating proprly.
This setting i need to do in c# coding rather than doing it manually.
The corresponding c# property i am unable to find, where i need some help.
Hope this explanation is sufficient to understand the problem i am facing.
-
- Posts: 4
- Joined: Thu May 07 2015
Re: How to set "Fit to Page" printer settings
Hi Jose
Any update in this issue?
Any update in this issue?
Re: How to set "Fit to Page" printer settings
Hi,
Sorry but I am following where in the Amyuni printer properties you are setting the "Fit to page" property manually. Can you send a screen shot to support@amyuni.com?
Thanks
Sorry but I am following where in the Amyuni printer properties you are setting the "Fit to page" property manually. Can you send a screen shot to support@amyuni.com?
Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Re: How to set "Fit to Page" printer settings
Hello,
I took a closer look at this and I believe you may need to handle this in the code where you print your XLS file.
The link below points MSDN where the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall Properties are explained.
https://msdn.microsoft.com/EN-US/librar ... 94365.aspx
Thanks
I took a closer look at this and I believe you may need to handle this in the code where you print your XLS file.
The link below points MSDN where the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall Properties are explained.
https://msdn.microsoft.com/EN-US/librar ... 94365.aspx
Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
-
- Posts: 4
- Joined: Thu May 07 2015
Re: How to set "Fit to Page" printer settings
Thanks for the update Jose, I will try the code as you suggested.
However I was under the impression that fit to page properties are also available for amyuni pdf converter dll, if any such properties exists do let me know.
Regards
Tharangini
However I was under the impression that fit to page properties are also available for amyuni pdf converter dll, if any such properties exists do let me know.
Regards
Tharangini
-
- Posts: 9
- Joined: Wed Apr 10 2013
Re: How to set "Fit to Page" printer settings
Hello Jose,
is this option available in the amyuni-dll-version as well?
https://www.amyuni.com/WebHelp/Amyuni_P ... cument.htm
ScaleToPrinter
I have the following problem and it seems to fit in this thread.
I know some scanner creating a pdf with smaller than A4 dimensions.
For example you scan a page with only a pair of circles and lines on it, the scanner appplication creates a A4 document but not with 210mm x 297mm (as you expected) but with the dimension 204mm x 297mm.
So I need a function where I can print it into a real A4 document with the right dimensions.
And this "fit to page" or scale to printer feature could help at this point.
I played around with PrintPdfDocument( "c:\temp\doc1.pdf", "Amyuni Printer Driver" ,1, 999, 1 );
But this is not the solution.
The document has the same dimension after this procedure.
(you are doing a great job with your printer driver - we have found the turbo-button)
Best regards,
Thomas
is this option available in the amyuni-dll-version as well?
https://www.amyuni.com/WebHelp/Amyuni_P ... cument.htm
ScaleToPrinter
I have the following problem and it seems to fit in this thread.
I know some scanner creating a pdf with smaller than A4 dimensions.
For example you scan a page with only a pair of circles and lines on it, the scanner appplication creates a A4 document but not with 210mm x 297mm (as you expected) but with the dimension 204mm x 297mm.
So I need a function where I can print it into a real A4 document with the right dimensions.
And this "fit to page" or scale to printer feature could help at this point.
I played around with PrintPdfDocument( "c:\temp\doc1.pdf", "Amyuni Printer Driver" ,1, 999, 1 );
But this is not the solution.
The document has the same dimension after this procedure.
(you are doing a great job with your printer driver - we have found the turbo-button)
Best regards,
Thomas
Re: How to set "Fit to Page" printer settings
Hi,
I believe you can accomplish this using the scaling option of the PDF Converter. You can set this option in the PDF Converter and reprint your scanned PDF file to the Amyuni printer.
I have included below a link to our online help below and a code snippet which illustrates how to implement this option.
http://www.amyuni.com/WebHelp/Amyuni_Do ... Option.htm
//SIO_SCALE ==> scale by a percentage (ScalingPercent)
SetScalingOption(hPrinter, SIO_SCALE);
//scale out-put 10%
SetScalingPercent(hPrinter, 10);
//Apply changes
SetDefaultConfig(hPrinter);
Hope this helps?
I believe you can accomplish this using the scaling option of the PDF Converter. You can set this option in the PDF Converter and reprint your scanned PDF file to the Amyuni printer.
I have included below a link to our online help below and a code snippet which illustrates how to implement this option.
http://www.amyuni.com/WebHelp/Amyuni_Do ... Option.htm
//SIO_SCALE ==> scale by a percentage (ScalingPercent)
SetScalingOption(hPrinter, SIO_SCALE);
//scale out-put 10%
SetScalingPercent(hPrinter, 10);
//Apply changes
SetDefaultConfig(hPrinter);
Hope this helps?
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite