JYP
May 3, 2024, 8:22am
1
Hi Asad
Please see attached a sample.
DOCX.Save(“doc.pdf”) is not Wysiwyg on page 8, using the simple code
var doc = new words.Document(@".\088714862406R002.docx");
doc.Save(@".\088714862406R002_Base.pdf");
Dealing with PdfSaveFormatOptions param don’t changed anything… or maybe we didn’t do the good combination ?
Please how can we ensure that outputed pdf will be Wysiwyg ?
Is there a “magical all-in-one option” nevermind the inputed doc ?
Many thanks.
NB :
both DOCX and PDF were rendered using Aspose.Words for .Net v23.1,
testing the same with the lastest v24.4 don’t changed anything.
saving this DOCX as PDF with Word2016 renders a well formatted PDF !
088714862406R002.docx (113.9 KB)
088714862406R002.pdf (190.9 KB)
088714862406R002_Word2016.pdf (934.8 KB)
JYP
May 3, 2024, 8:30am
2
No better results with these options
(exhaustive list of availables options, mainly defaults values were used)
Please which ones of them are responsible of the wisywig output for this docx ?
var pdfOptions = new words.Saving.PdfSaveOptions();
pdfOptions.AdditionalTextPositioning = true;
pdfOptions.AllowEmbeddingPostScriptFonts = true;
pdfOptions.CacheBackgroundGraphics = true;
pdfOptions.ColorMode = words.Saving.ColorMode.Normal;
pdfOptions.Compliance = words.Saving.PdfCompliance.PdfA4;
pdfOptions.CreateNoteHyperlinks = true;
pdfOptions.CustomPropertiesExport = words.Saving.PdfCustomPropertiesExport.Standard;
pdfOptions.CustomTimeZoneInfo = TimeZoneInfo.Local;
pdfOptions.DefaultTemplate = string.Empty;
//pdfOptions.DigitalSignatureDetails = new words.Saving.PdfDigitalSignatureDetails();
pdfOptions.DisplayDocTitle = true;
pdfOptions.Dml3DEffectsRenderingMode = words.Saving.Dml3DEffectsRenderingMode.Advanced;
pdfOptions.DmlEffectsRenderingMode = words.Saving.DmlEffectsRenderingMode.None;
pdfOptions.DmlRenderingMode = words.Saving.DmlRenderingMode.DrawingML;
//pdfOptions.DownsampleOptions = new words.Saving.DownsampleOptions();
pdfOptions.EmbedAttachments = false;
pdfOptions.EmbedFullFonts = true;
//pdfOptions.EncryptionDetails = new words.Saving.PdfEncryptionDetails();
pdfOptions.ExportDocumentStructure = true;
pdfOptions.ExportGeneratorName = true;
pdfOptions.ExportLanguageToSpanTag = true;
pdfOptions.ExportParagraphGraphicsToArtifact = true;
pdfOptions.FontEmbeddingMode = words.Saving.PdfFontEmbeddingMode.EmbedAll;
pdfOptions.HeaderFooterBookmarksExportMode = words.Saving.HeaderFooterBookmarksExportMode.All;
pdfOptions.ImageColorSpaceExportMode = words.Saving.PdfImageColorSpaceExportMode.Auto;
pdfOptions.ImageCompression = words.Saving.PdfImageCompression.Auto;
pdfOptions.ImlRenderingMode = words.Saving.ImlRenderingMode.InkML;
pdfOptions.InterpolateImages = true;
pdfOptions.JpegQuality = 100;
pdfOptions.MemoryOptimization = true;
//pdfOptions.MetafileRenderingOptions = new words.Saving.MetafileRenderingOptions();
pdfOptions.NumeralFormat = words.Saving.NumeralFormat.European;
pdfOptions.OpenHyperlinksInNewWindow = true;
pdfOptions.OptimizeOutput = false;
//pdfOptions.OutlineOptions = new words.Saving.OutlineOptions();
pdfOptions.PageLayout = words.Saving.PdfPageLayout.SinglePage;
pdfOptions.PageMode = words.Saving.PdfPageMode.UseNone;
//pdfOptions.PageSavingCallback=;
//pdfOptions.PageSet = new words.Saving.PageSet();
pdfOptions.PreblendImages = false;
pdfOptions.PreserveFormFields = false;
pdfOptions.PrettyFormat = false;
//pdfOptions.ProgressCallback=;
pdfOptions.SaveFormat = words.SaveFormat.Pdf;
//pdfOptions.TempFolder=;
pdfOptions.TextCompression = words.Saving.PdfTextCompression.None;
pdfOptions.UpdateCreatedTimeProperty = false;
pdfOptions.UpdateFields = false;
pdfOptions.UpdateLastPrintedProperty = false;
pdfOptions.UpdateLastSavedTimeProperty = false;
pdfOptions.UseAntiAliasing = false;
pdfOptions.UseBookFoldPrintingSettings = false;
pdfOptions.UseCoreFonts = false;
pdfOptions.UseHighQualityRendering = false;
pdfOptions.ZoomBehavior = words.Saving.PdfZoomBehavior.FitPage;
//pdfOptions.ZoomFactor = 100;
doc.Save(@".\088714862406R002_pdfOptions.pdf", pdfOptions);
@JYP
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies .
Issue ID(s): WORDSNET-26939
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
JYP
May 7, 2024, 4:12pm
4
Hi Alexey
Hope you will found a patch for a future next release
Many thanks
1 Like